You can't take open source code and make it closed source. You can make your modifications be closed. Depending on the license of the original code
GPL will not let you do this.
Apache and BSD are much more supporting of commercialization. But IANAL. If you are serious about making serious money, you need to pay for legal opinions from someone qualified in the field. Be forewarned, not all lawyers know the ins and outs of intellectual propertly licensing. It will take serious money to get a real opinion.
Most(many?) commercial companies in the commercial space do not attempt to do this. What they do is keep the code open source, and sell support and consulting professional services. This is how IBM, RedHat, MySql, etc. work
I think all those licenses except the GPL allow you to do this. You will need to comply with the license rules regarding displaying copyright notices and attributions. But as Pat said, consult a lawyer specialized in IP on this. You can't base business decisions on hearsay picked up on the Internet, particularly on legal matters.
Apple uses a ton of BSD'd code in OSX. You could and probably should talk to a lawyer, however, some of those licenses are so short and simple, you really don't need to for some of them, especially BSD. You could try these websites for basic legal info: