I. Installing Apache 1. Open Terminal: ctrl+alt+t
sudo apt-get update
2. Install Apache by Apt-get:
sudo apt-get install apache2//enter Y to confirm
Detects if the installation was successful: in Browser input: 127.0.0.1 or locahost. The content appears on the browser and has it works. Instructions to install successfully!
Note:
A.apache in Ubuntu the default root directory is:/var/www
B. The Master profile directory is:/etc/apache2/apache2.conf
C. The virtual machine configuration directory is:/etc/apache2/sites-enabled
Two. Install PHP5 3. Install PHP5 and APACHEPHP5 modules
sudo apt-get install php5 libapache2-mod-php5//actually LIBAPACHE2-MOD-PHP5 can not write, the new version of the source has been brought in
Once installed, restart Apache:
/etc/init.d/apache2 restart
4. Build a probe page to test if PHP is installed successfully
Create a new PHP file under var/www/:
sudo vim test.php<?phpphinfo ();? >
Browser input: locahost/test.php The following screen appears to indicate success.
Three. Install MySQL 5. Terminal input:
sudo apt-get install Mysql-server
The following tips will appear halfway through:
Set the MySQL password.
6. Test if MySQL is installed successfully
Open a new terminal input:
Mysql-uroot-p Password
No prompt error correctly entered indicates successful installation.
7. Install MySQL extensions and other extensions for PHP.
View all extensions:
sudo apt-cache search php5
Find the module name you want to install, enter the command in the format as follows
sudo apt-get install php5-mysql php5-curl PHP5-GD
Restart Apache. Enter localhost/test.php. You can see if the module has been installed successfully.
Four. Install phpMyAdmin 8. Download phpMyAdmin
sudo apt-get install phpMyAdmin
Note: phpMyAdmin will be installed automatically under/usr/share/phpmyadmin, you need to copy the phpMyAdmin folder to the/var/www/html directory
Use the command:
sudo ln-s/usr/share/phpmyadmin//var/www/html/
Browser input Localhost/phpmyadmin You can see the interface of the management database.
Ubuntu 14.04 lamp Installation and configuration