1.sudo apt-get Update
2.sudo Apt-get Install Apache2
3. Check if the installation was successful: Apache2-v
4.sudo apt-get Update php5
Error occurred: Package PHP5 has no installation candidate
Solve:
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php5.6
5, check Apache2 support file for PHP exists: cat/etc/apache2/mods-enabled/php5.6.load
If you see a hint at the end of libphp5.6.so that means support
6, installation Mysql:sudo Apt-get install Mysql-server
Enter Password two times
Of course, there will be some unexpected problems when installing, like this way.
Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
Baidu Solution: sudo rm var/lib/dpkg/lock
7. Check that the parser is installed successfully between Php-mysql: Cat/etc/php/5.6/cli/conf.d/20-mysql.ini
If prompted at the end: Extension = mysql.so can be
Note: Different system, different version of the file whose default path may not be the same, all installed detection directory self-tuning
All installations can be resolved with a single command.
sudo apt-get install apache2 php5.6 mysql-server php5.6-mysql
Install lamp under Unbuntu server (Linux system)