Getting the easy question out of the way: yes, an iMac running Server.app and add-on eCommerce software can do this.
Now for the tougher question: should you? You're signing on for maintaining and updating and troubleshooting and potentially site remediation and decontamination after issues or security attacks. You are also signing up for PCI compliance, if you're not working with another entity for credit-card processing. (Anything with credit card data is a target for attacks; there's money involved.)
There're the more germane aspects, too: ensuring your (static IP) network links have bandwidth, availability and latency (eg: ISP bandwidth, pingdom or other uptime checks, et al), and maintaining your servers against crashes and corruptions and hardware failures (eg: RAID, possibly redundant systems); maintaining site access against the usual sorts of outages. Software updates for OS X and for the ecommerce software and whatever other dependencies are involved, too. Regular backups are most definitely required.
Or alternatively: getting somebody to maintain this stuff for you, either hosted, or dedicated to and on your server(s) and your network links, or on your own co-lo servers.
All this in addition to running your business, and writing (good, frequently updated) content that'll draw in the search engine ranking and/or buying search keywords or whatever you're doing for advertising that'll draw in potential customers, and dealing with the finances and the rest.
Servers are somewhat different from clients, in terms of system management, too. Servers involve more than one user when they're out, and so you're not rebooting or reconfiguring them nearly as often as client systems can be modified. Servers can also tend to chew up bandwidth, if you're successful.
Key to running a business is figuring out what you don't need to do (either at all, or that you can outsource or host or whatever, or hire out for, etc), so that you can focus on what you do need to do to make the business successful... If you're just getting going and not into system administration and programming payment gateways and the rest of running a server, I'd suggest hosting the ecommerce stuff, at least to start with. Unless you want to learn how to run an ecommerce site, that is...