Install the lamp environment in ubuntu 12.04

Source: Internet
Author: User

Install lamp environment in ubuntu 12.04 1) install LAMP> sudo apt-get install apache2 mysql-server mysql-client php5 php5-gd php5-mysql to configure the MYSQL-SERVER password. 1.1 after the installation is complete, the configuration file directory of APACHE:/etc/apache2 PHP:/etc/php5 MYSQL configuration file directory:/etc/mysql 2) configure APACHE 2.1 to create the apache directory in the/home/directory: mkdir apache 2.2 cd apache to create the etc and www directories: mkdir etc www 2.3 to modify the/home/apache directory permissions: sudo chown user: user-R/home/apache 2.4 COPY the default configuration file to/home/etc/cp-R/etc/apache2/sites-*/home/apache/etc 2.5 Modify/etc find/apache2/apache2.conf vi/etc/apache2/apache2.conf 2.6: include sites-enabled/modify To: Include/home/apache/etc/sites-enabled/2.7 restart APACHE sudo apachectl restart 2.8 to configure the default site: vi/home/apache/etc/sites-available/default 2.9 found: DocumentRoot/var/www changed to: DocumentRoot/home/apache/www/default.com 2.10 found: <Directory/var/www/>: <Directory/home/apache/www/default.com> 2.11 create/home/apache/www/default.com sudo mkdir/home/apache/www/default.com 2.12 create/home/apache/www/ default.com/inde Input the sudo gedit/home/apache/www/default.com/index.php file in the x. php file: <? Php echo "hello word! ";?> Save and exit 2.13 for the configuration to take effect: Enter http: // localhost/In The sudo apachectl graceful 2.14 Browser: hello word!

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.