Lamp Environment Construction ubunt14.04

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.