Step1. Install Apache
Enter a command in terminal
Copy Code code as follows:
sudo apt-get install apache2
Open the browser, enter in the Address bar: 127.0.0.1, if there is "It works!", indicating the successful installation
Step2. Install PHP5
Enter in Terminal:
Copy Code code as follows:
sudo apt-get install php5 libapache2-mod-php5 php5-mysql
Reboot apache2:
Copy Code code as follows:
Sudo/etc/init.d/apache2 restart
Note: If you want to turn off the Apache service, you can execute the following command:
Sudo/etc/init.d/apache2 stop
If you want to turn on the Apache service, you can execute the following command:
Sudo/etc/init.d/apache2 start
MySQL reboot, shutdown, start command is similar to the APACHE2 command
Test whether the PHP5 is installed successfully:
Copy Code code as follows:
sudo gedit/var/www/testphp.php
In the file that opens the file, enter the following PHP code:
Copy Code code as follows:
Save and close the file, enter the following IP address in the browser address bar: 127.0.0.1/testphp.php, if there is information about PHP, the PHP installation is successful
Step3. installing MySQL
Enter the following command in terminal and execute:
Copy Code code as follows:
sudo apt-get install mysql-server mysql-client
In the course of installation, the user will be given a password to the root of MySQL interface, follow the prompts to do the line
Step4. Install phpMyAdmin
Enter the following command in terminal and execute
Copy Code code as follows:
sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin
Adjust the permissions of the/VAR/WWW directory to facilitate future editing of Web site files.
Copy Code code as follows:
The above mentioned is the entire content of this article, I hope you can enjoy.