1. Open the terminal, input "sudo apt-get install apache2", carriage return; (Install apache2.0) |
2. If you have the password, please re-enter the Administrator password, enter
|
4.apache2.0 Installation Complete |
5. Verify apache2.0 If the installation is complete, open http://localhost/or http://127.0.0.1 in the browser. If the IT works! appears to prove successful;
|
6. Open the terminal, input "sudo apt-get install php5", carriage return; (this is installed PHP)
|
7. Enter "Y", carriage return; |
8. The following image is the installation process and requires a certain waiting time |
9. Input "sudo apt-get install libapache2-mod-php5", enter; (this is configured apache+php)
|
enter "sudo/etc/init.d/apache2 restart", carriage return; (This is the restart Apache)
|
11. See the following diagram of the interface after the description of the installation of PHP has been completed;
|
12. Enter "Gksudo gedit/var/www/testphp.php", return; (This is the test of the installation results of PHP) |
then randomly enter something (I entered http://www.cnblogs.com/LiteraturePan/) and save it.
|
Enter http://127.0.0.1/testphp.php or http://localhost/testphp.php in the browser, if the display of what you enter is a success;
|
15. In the terminal input "sudo apt-get install mysql-server", carriage return; (this is installed MySQL) |
16. Enter "Y", carriage return; |
18. In the terminal input "sudo apt-get install libapache2-mod-auth-mysql", carriage return; (This is for Apache, PHP to support MySQL) |
19. In the terminal input "sudo apt-get install php5-mysql", carriage return; |
In the terminal input "sudo/etc/init.d/apache2 restart", enter;
|
The apache2+php 5+MYSQL5 environment is configured to succeed.