1. sudo apt-get update
sudo apt-get upgrade
2. Lamp-server
* One-click installation: Tasksel install Lamp-server, suitable for installing Ubuntu non-server version locally.
A) sudo apt-get install apache2
----Test http://localhost/or *.*.*.* in the browser
b) sudo apt-get install php5 libapache2-mod-php5
----sudo vim/var/www/test.php, add test statements
<?php phpinfo ();?>
Save exit. Test http://localhost/test.php in the browser
c) sudo apt-get install mysql-server mysql-client
d) sudo apt-get install phpMyAdmin
The following questions are asked during installation:
Web server to reconfigure automatically: <--apache2
Whether to configure the Web server automatically, yes, select Apache2
Configure database for phpMyAdmin with Dbconfig-common? <--No
Create a database for phpMyAdmin, no
e) sudo ln-s/usr/share/phpmyadmin/var/www
f) PHP in collaboration with MySQL
----$sudo Vim/etc/php5/apache2/php.ini
Remove Line "; Extension=mysql.so ", and restart Apache.
Sudo/etc/init.d/apache2 restart
----Test Http://localhost/phpmyadmin in the browser
Zero-based--ubuntu quick install lamp (PHP) (ii)