Build PHP Environment under Ubuntu (LAMP)
1 Installing the APACHE2 server
?? sudo apt-get install apache2
?? After installation, open in Firefox:
?? http://localhost/, the prompt indicates successful installation.
? Note: Modify the/VAR/WWW permission for external access sudo chmod 777/var/www
?
??? sudo service apache2 start
??? sudo service apache2 stop
??? sudo service apache2 restart
2 Installing the MySQL database
?? sudo apt-get install mysql-server5.5
?
?? This step may take some time to download the database in the library, the download is completed automatically after the installation, will be prompted to enter the data name and password
?? after successful installation, the terminal link database, Mysql-uroot-p
?? After a successful link is displayed, MySQL version 3 installs PHP
?? sudo apt-get install php5
?? Test if the PHP5 is installed successfully
?? sudo gedit/var/www/index.php content is as follows:
??
?? Display PHP version information stating that the installation is correct
4 Installing phpMyAdmin
?? sudo apt-get install phpMyAdmin
?? At this point on the browser input: Http://localhost/phpmyadmin found not found
?? So we have to move the installation to the phpMyAdmin folder to/var/www/below.
?? sudo ln-s/usr/share/phpmyadmin//var/www/
?? Execute the above to command, we have moved the phpMyAdmin folder to the destination, or you can copy the phpMyAdmin directly to the???? The/var/www/folder is also available below.
??? We again entered on the browser: http://localhost/phpmyadmin return When we found the familiar interface back
?
? Summary:
????? Apache configuration file Path/etc/apache2/apache2.conf
????? PHP.ini Path/etc/php5/apache2/php5.ini
????? MySQL configuration file path/etc/mysql/my.cnf
????? phpMyAdmin configuration file path/etc/phpmyadmin/apache.conf
????? Site root directory/var/www