Apache2, PHP 4.0 and MYSQL on Gentoo Install Guide
Last updated: 12/13/2004
| 1. Installing Apache, php and MYSQL |
|
emerge apache emerge php mod_php emerge mysql |
| 2a. Configuring Apache |
|
vim /etc/conf.d/apache APACHE_OPTS="-D PHP4" //uncomment this line and modify it vim /etc/apache2/conf/apache2.conf [code from apache2.conf] ServerName 127.0.0.1 //change the ip to your domain name #parse php in html #add this line to the bottom of the conf file AddType application/x-httpd-php .php .html .htm #for directory views, directory access and vhosts see the example above. [/code] /etc/init.d/apache2 start //start apache2 rc-update add apache2 default //start apache2 on boot |
| 2b. Configuring MYSQL |
|
/etc/init.d/mysql start you will get a specific error message telling you to run a mysqladmin command. do it. rc-update add mysql default php 4.0 has no configuration requirements. |
| 3. Testing your LAMP setup |
|
browse to http://localhost/ and you'll see apache's test page the default webroot is /var/www/localhost/htdocs installation is complete. |