---restore content starts---
sudo apt-get install update
Su Root
1. Install MySQL
sudo apt-get install mysql-server mysql-client
2. Install PHP
sudo add-apt-repository ppa:Ondrej/php5 sudo apt-get update sudo apt -Get
sudo apt-get install php5
This is a post-installation upgrade.
3, Installation Apache2
sudo apt-get install apache2
Test after installation, enter http://localhost/or HTTP://127.0.0.1/in the browser
If an "It works!" appears, you've made it.
4. Let Apache support PHP
sudo apt-get install php5 libapache2-mod-php5
If this step is not installed, open a PHP page that lets you download the file instead of opening it in the browser
Restart Apache server after installation is complete
Sudo/etc/init.d/apache2 restart
5. Check if you can open PHP file
Then go to Apache's www folder (default in/Var), create the phpinfo.php file
Cd/var/www
Ls
VI phpinfo.php
and write it in the phpinfo.php file.
<?php
Phpinfo ();
?>
Save, open http://localhost/phpinfo.php, you can see the information of PHP
6, install the corresponding other modules PHP
sudo apt-get install php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5- Ming Php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl
After the visit, we open http://localhost/phpinfo.php again, we can see some other phpinfo information
7, Installation phpMyAdmin
sudo apt-get install phpMyAdmin
Since the default phpmyadmin is in/usr/share/phpmyadmin/, we will move to/var/www below
Mv/usr/share/phpmyadmin/var/www
If you are lucky, you can see the phpMyAdmin page, if there is a lack of mysqli extension information, we can solve the problem by the way
Modify in/etc/php5/apache2/php.ini
; Extension=php_mysqli.dll
Remove the preceding semicolon, and then restart Apache to be OK.
---restore content ends---
Setting up a lamp frame under Ubuntu