Showing posts with label MAC OS X. Show all posts
Showing posts with label MAC OS X. Show all posts

Monday, April 18, 2011

How to install Apache, PHP and MySQL on Linux: Part 2

How to install Apache, PHP and MySQL on Linux: Part 2 | laffers.net

Setup access privileges

Don’t forget to setup Apache access privileges to your www directories:

1chown -R apache2:www <em>/foo/path_to_your_www_documents_root</em>
2chmod -R 750 <em>/foo/path_to_your_www_documents_root</em>

“apache2″ and “www” are the user and user group I have previously created (see Prerequisites)

Start and stop apache server

After everything is set up, start Apache:

1/usr/local/apache2/bin/apachectl start

Similarly, if you wish to stop Apache, type:

1/usr/local/apache2/bin/apachectl stop

Automatic startup

It’s a good idea to let your Apache server start automatically after each system reboot. To setup Apache automatic startup, do:

1cp /usr/local/apache2/bin/apachectl /etc/init.d
2chmod 755 /etc/init.d/apachectl
3chkconfig --add apachectl
4chkconfig --level 35 apachectl on