The license must not restrict anyone from making use of the program in a specific field of endeavor. For example, it may not restrict the program from being used in a business, or from being used for genetic research. |
Then GPL is not really open source (and especially its AGPL variant), because it puts pretty serious restrictions on what you can do with the code - e.g. you can't include it in a closed-source product. True open source are BSD, MIT or Apache licenses. The only restriction is that you must not claim authorship of the code you're not author of (this is different from public domain, which doesn't have even this single restriction).
Methods of earning on open-source:
1. Charging for support and consulting.
2. Charging for additional documentation.
3. Not paying license fees to proprietary software vendors and using open-source software instead (e.g Linux instead of Windows / MaxOSX)
4. Charging for closed source software built on top of open-source ones / providing a "premium" or "enterprise" version
5. Accepting donations
6. Making money on conferences and other events related to open-source
7. Commercial ads on the project website
8. Charging for adapting your own or third parties open-source software to one's specific needs
9. Raising money from investors then selling the company.
10. Raising public money (e.g. scientific open-source projects)