Would like to install LAMP in Linux. Is it possible to install and run Apache, MySQL as a normal unix user (no root)?. Default port 80 is not needed and its okay for apache to bind to any port.
migrated from stackoverflow.com Oct 4 '12 at 3:26
This question came from our site for professional and enthusiast programmers.
It sounds like you have the right idea: permissions and privileged ports are the biggest concerns here. Consider the permissions on miscellaneous things like PID files, "data" directories (like Apache's web root or MySQL's datadir), where .conf files are read, etc. Also, keep in mind that many services will simply die with no error if it cannot write to a log file.
A good place to start would be official init scripts for your distro; copy these to a directory of your choice and edit them to your liking. Apache usually starts as root, then descends to a lesser-privileged user, so there may be some tweaking involved. MySQL normally starts as a limited user, so I have the feeling MySQL will be very easy.