I. Installation of APACHE2
sudo apt-get install apache2
Second, test Apache2
Enter the following address in the Address bar and appear as shown in the picture, which means the installation was successful
Third, restart the Apache2 service
Sudo/etc/init.d/apache2 Restart//' restart '-> ' stop ' off service; ' Restart '-> ' start ' service
Four, install PHP
sudo apt-get install php5 libapache2-mod-php5
'
0x03. Test php
' cmd
sudo vim/var/www/html/ info.php
Content is the following code, the successful appearance of the following picture indicates success
V. Installation of MySQL
Enter the following command to install, the installation process will let you fill in the MySQL username and password
sudo apt-get install mysql-server
sudo apt-get install mysql-client
Vi. installation of phpMyAdmin
During the installation process, select Apache2, and the next step is to configure the database and enter a password.
sudo apt-get install phpMyAdmin
Seven, Test phpMyAdmin
Execute the following command
sudo ln-s/usr/share/phpmyadmin/var/www
Then the address bar enters the following address, the landing interface indicates success, as shown in
Http://localhost/phpmyadmin
If the 404 interface appears, execute the following statement
sudo vim/etc/apache2/apache2.conf
Add the following line at the end
Include/etc/phpmyadmin/apache.conf
Eight, install other modules
sudo apt-get install libapache2-mod-php5
sudo apt-get install libapache2-mod-auth-mysql
sudo apt-get install Php5-mysql
sudo apt-get install PHP5-GD
Ix. Modification of/var/www/html permissions
sudo chmod 777/var/www/html
Ten, summary
The above is the entire content of this article, I hope to everyone in the Linux (Ubuntu) to build a PHP environment can help, if there are questions you can leave a message to discuss.