Ubuntu VPS Easy Install lamp tutorial _linux

Source: Internet
Author: User
Tags install php phpinfo administrator password vps phpmyadmin ubuntu vps
First, the host name and IP should be set correctly, and the external network can be connected normally.
1, enter the following command to get root permissions:
sudo su
2, install MySQL 5, enter the following command:
Aptitude Install Mysql-server Mysql-client
The MySQL database administrator password is required to be set during installation, and two new passwords are entered continuously.
3. Install Apache 2
Aptitude Install Apache2
After the installation is complete, enter the IP address of the VPS in the browser, if the installation is successful, display it works!
The default WWW directory for Apache is/var/www, the primary profile is/etc/apache2/apache2.conf, and other configuration files such as/etc/apache2/mods-enabled directory storage module settings,/etc/apache2 The/sites-enabled directory holds the virtual host settings.
4, enter the following command to install PHP 5:
Aptitude install PHP5 LIBAPACHE2-MOD-PHP5
and restart Apache.
/etc/init.d/apache2 restart
5. Test whether PHP is installed successfully
Create a new PHP file using the VI Editor
vi/var/www/env.php
Typing the following code and saving
Copy Code code as follows:

<?php
Phpinfo ();
?>

Open the browser and request this PHP file to the VPS, for example: http://192.168.100.100/env.php
(replace 192.168.100.100 with the IP address of the VPS)
6, the installation of PHP 5 other modules
Aptitude install Php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache PHP5-MHA SH php5-ming php5-ps Php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl Php5-json
Restart Apache
/etc/init.d/apache2 restart
Once again, open the Phpinfo page (env.php) and check to see if the pieces are installed successfully.
7. Installation phpMyAdmin
phpMyAdmin is a tool for managing MySQL databases through a web interface
Enter the following command:
Aptitude Install phpMyAdmin
The following questions are asked during installation:
Web server to reconfigure automatically: <--apache2
Whether to configure the Web server automatically, yes, select Apache2
Configure database for phpMyAdmin with Dbconfig-common? <--No
Create a database for phpMyAdmin, no
After the installation is complete, you can open the tool in the browser to manage MySQL:
Http://192.168.100.100/phpmyadmin (replaces 192.168.100.100 with the IP address of the VPS)
Enter the login name root and the previously set database password to log in to the admin database.

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.