Reprint: http://www.jb51.net/article/29843.htm
Ubuntu needs to update the system before
Process notes:
1. Open the terminal and enter the "sudo apt-get install apache2", carriage return; (Install apache2.0)
2. If you have a password, please enter the administrator password again.
3. Enter "Y" and return
4.apache2.0 Installation Complete
5. Verify that the apache2.0 installation is complete, and open http://localhost/or http://127.0.0.1 in the browser. If it works! appears that proves successful;
6. Open the terminal and enter the "sudo apt-get install php5", carriage return; (this is to install PHP)
7. Enter "Y", carriage return;
8. For the installation process, a certain waiting time is required
9. Type "sudo apt-get install libapache2-mod-php5" and enter; (This is configuration apache+php)
10. Input "sudo/etc/init.d/apache2 restart", enter; (This restarts Apache)
11. See the following interface to indicate that PHP has been installed;
12. Input "Gksudo gedit/var/www/testphp.php", enter; (This is the result of testing the PHP installation)
13. Then randomly enter something (I entered the http://www.jb51.net/) and save it.
14. Enter http://127.0.0.1/testphp.php or http://localhost/testphp.php in the browser, if it shows what you entered is a success;
15. In terminal input "sudo apt-get install Mysql-server", enter; (this is to install MySQL)
16. Enter "Y", carriage return;
17. Set the root password;
18. Enter "sudo apt-get install Libapache2-mod-auth-mysql" in the terminal; (this is to let Apache, PHP support MySQL)
19. In terminal input "sudo apt-get install Php5-mysql", enter;
20. In terminal input "sudo/etc/init.d/apache2 restart", enter;
The apache2+php 5+MYSQL5 environment has been successfully configured.
The simplest Linux apache+mysql+php installation