Build the LAMP environment in ubuntu12.04 (for contianer-based PaaS)

Source: Internet
Author: User
Objective: to start a ubuninerinstance with ubuntu12.04-amd64 installed through lxc, and then build a LAMP (Linux + Apache + Mysql + PHP) environment in this instance. specific steps: www.2cto.com (1) install mysql: sudoapt-getinst...
Objective: to start a ubuntu INER instance with ubuntu 12.04-amd64 through lxc, and then set up the LAMP (Linux + Apache + Mysql + PHP) environment in this instance. specific steps: www.2cto.com (1) install mysql: sudo apt-get install mysql-server mysql-client (2) install Apache2 sudo apt-get install apache2 to test whether apache works properly. enter http in the browser: // ip/(3) install PHP sudo apt-get install php5 libapache2-mod-php5 restart Apache and let it load the PHP module sudo/etc/init. d/apache2 restart
Install phpMyAdmin sudo apt-get install phpmyadmin on www.2cto.com (4) and connect phpmyadmin to apache2. take my example: the www directory is in/var/www, phpmyadmin is in the/usr/share/phpmyadmin directory, so run the command: sudo ln-s/usr/share/phpmyadmin/var/www to establish a connection. Enter http: // ip/phpmyadmin/in the browser to test whether phpmyadmin works properly! If you can see the phpmyadmin logon interface, enter the username and password of the mysql database to verify that the user can log on normally. The result is as follows. (5) If you want to remotely access the mysql database through other mysql clients, see ubuntu mysql remote connection problem solution through the following configuration. (6) phpmyadmin requires php-mcrypt extension. In most cases, you do not need to install phpmyadmin independently. if a warning is displayed at the bottom of the page after you log on to phpmyadmin, follow these steps: run the code on the terminal: the sudo apt-get install php5-mcrypt prompts that www.2cto.com will be installed automatically if it is not installed. if it prompts that it has been installed, proceed to the next step: Edit the php configuration file and run: code in the terminal: sudo gedit/etc/php5/apache2/php. ini found the extension help documentation and syntax in the pop-up interface, followed by: Code: extension = php5-mcrypt.so
 
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.