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