Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question

migrated from stackoverflow.com Oct 4 '12 at 3:26

This question came from our site for professional and enthusiast programmers.

    
Yes, but are you sure you need the full LAMP stack? PHP 5.4's built-in webserver plus SQLite may do all you need. –  ceejayoz Oct 4 '12 at 3:30

1 Answer 1

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.