Step 1 Installation Lamp
sudo apt-get install lamp-server^
STEP2 Configuring the Apache Environment
/* Set default directory */
In systems such as CentOS, Apache profiles are typically/etc/httpd/conf/httpd.conf
In the Debian system, the configuration file is/etc/apache2/sites-enabled/000-default.conf
Edit the DocumentRoot in this file to set the default directory
After that reboot the Apache command is: sudo/etc/init.d/apache2 Restart (obviously also start and stop)
Will find an error: Could not reliably determine the server ' s fully qualified domain name, using 127.0.1.1. Set the ' ServerName ' directive globally to suppress this message
Because, Apache server can not determine the host domain name, so replace with IP127.0.1.1, the solution in the CentOS system add servername localhost:80 can, in the Debian system, looking for/etc/apache2/s Ites-available/default Add ServerName 127.0.0.1 at the top.
/* Set default home page */
In CentOS, find the DirectoryIndex in httpd.conf and change it to DirectoryIndex index.php index. HTML index.html This way, the default home page of your site directory is index.php, if no index.php system will automatically look for index.html, HTML.
STEP3 Installation phpMyAdmin
sudo apt-get install phpMyAdmin
phpMyAdmin generally installed in the/usr/share only, at this time, you must use a soft link, first switch to the root directory of our settings, and then sudo ln-s/usr/share/phpmyadmin phpmyadmin can be.
Ubuntu Configuration lamp Run Environment note