How to build the lamp environment in ubuntu12.04amd64

Source: Internet
Author: User
This article describes how to build the lamp environment in ubuntu12.04amd64.

Required software:

Apache: http://httpd.apache.org/
Php: http://www.php.net/
Mysql: http://www.mysql.com/
Ubuntu: http://www.ubuntu.com/
Phpmyadmin: the http://www.phpmyadmin.net/


Installation:

In ubuntu, you need to use the root identity for operations. Therefore, use the following command to ensure that you log on as the root identity:


Copy codeThe code is as follows:
Sudo su

Install mysql


Copy codeThe code is as follows:
Apt-get install mysql-server mysql-client

You will be asked to provide the password of a mysql root user. we need to set the password in the red area.

Install apache2

Copy codeThe code is as follows:
Apt-get install apache2

Note: The default apache document root directory is the/var/www directory on ubuntu, and the configuration file is/etc/apache2/apache2.conf. Configure the sub-directories stored in the/etc/apache2 directory.


Install php5

Copy codeThe code is as follows:
Apt-get install php5 libapache2-mod-php5

Restart after installation

Copy codeThe code is as follows:
/Etc/init. d/apache2 restart

Test whether the installation is successful.

Copy codeThe code is as follows:
Vi/var/www/info. php

Enter


Copy codeThe code is as follows:
<? Php
Phpinfo ()
?>

Then access


Php5 is supported by mysol

For php to be supported in mysql, we can install the php-mysql software package. It is a good idea to install some other php5 modules and applications you may need:

Copy codeThe code is as follows:
Apt-cache search php5

You also need to install

Copy codeThe code is as follows:
Apt-get install php5-mysql php5-curl php5-gd php5-idn php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp

Restart apache

Copy codeThe code is as follows:
/Etc/init. d/apache2 restart

Install phpmyadmin

Copy codeThe code is as follows:
Apt-get install phpmyadmin

Automatically install phpMyAdmin under/usr/share/phpMyAdmin, copy phpmyadmin to the/var/www directory, and run http: // localhost/phpMyAdmin/

Related Article

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.