Install lamp environment in ubuntu 12.04 1) install LAMP> sudo apt-get install apache2 mysql-server mysql-client php5 php5-gd php5-mysql to configure the MYSQL-SERVER password. 1.1 after the installation is complete, the configuration file directory of APACHE:/etc/apache2 PHP:/etc/php5 MYSQL configuration file directory:/etc/mysql 2) configure APACHE 2.1 to create the apache directory in the/home/directory: mkdir apache 2.2 cd apache to create the etc and www directories: mkdir etc www 2.3 to modify the/home/apache directory permissions: sudo chown user: user-R/home/apache 2.4 COPY the default configuration file to/home/etc/cp-R/etc/apache2/sites-*/home/apache/etc 2.5 Modify/etc find/apache2/apache2.conf vi/etc/apache2/apache2.conf 2.6: include sites-enabled/modify To: Include/home/apache/etc/sites-enabled/2.7 restart APACHE sudo apachectl restart 2.8 to configure the default site: vi/home/apache/etc/sites-available/default 2.9 found: DocumentRoot/var/www changed to: DocumentRoot/home/apache/www/default.com 2.10 found: <Directory/var/www/>: <Directory/home/apache/www/default.com> 2.11 create/home/apache/www/default.com sudo mkdir/home/apache/www/default.com 2.12 create/home/apache/www/ default.com/inde Input the sudo gedit/home/apache/www/default.com/index.php file in the x. php file: <? Php echo "hello word! ";?> Save and exit 2.13 for the configuration to take effect: Enter http: // localhost/In The sudo apachectl graceful 2.14 Browser: hello word!