Installing Apache2
sudo apt-get install apache2 Apache2-doc
To verify that the installation is successful, open the browser address bar and enter localhost
Successfully see "It works"
Install MySQL
Apt-get Install Mysql-server mysql-client
Password required during installation
Install PHP
Apt-get install php5 php-pear php5-mysql php5-dev libapache2-mod-php5 php5-dev php5-curl php5-gd php5-imagick php5-mcrypt
Simple settings for Apache
1. Change the default folder path
sudo vim/etc/apache2/sites-enabled/000-default.conf settings
2. Change/var/www/folder permissions
sudo chmod-r 777/var/www
3. Enable the Mod_rewrite module
sudo a2enmod rewrite
sudo service apache2 restart
4. Set Apache support. htm. html. php
sudo gedit/etc/apache2/apache2.conf
Add the following sentence: AddType application/x-httpd-php. php. htm. html
Restart Apache
5. Add servername
sudo gedit/etc/apache2/apache2.conf
Add a sentence servername localhost:80
Restart Apache
Lamp Environment Construction ubunt14.04