LNMP environment in Ubuntu

Source: Internet
Author: User

To ensure the Internet connection, you can directly install the tool at http://lnmp.org/install.htmland use the following example as the original document:

{

1. Use putty or similar SSH tools to log on to VPS or server;

Run after login:Screen-S lnmp

If the screen: command not found command does not exist, run: yum install screen or apt-get install screen.

2. download and install the one-click installation package of LNMP:

You can choose to use the downloaded version (recommended for foreign or U.S. VPS) or the full version (recommended for domestic VPS). There is no difference between the two.

Before executing the installation program, you need to confirm your Linux release. You can run: cat/etc/issue to check whether it is CentOS, Debian or Ubuntu, you can also view it on the control panel provided by the VPS service provider. After confirming, select the following system installation command:

Run the following command in CentOS:Wget-c http://soft.vpser.net/lnmp/lnmp1.0-full.tar.gz & tar zxvf lnmp1.0-full.tar.gz & cd lnmp1.0-full &./centos. sh

Run the following command in the Debian system:Wget-c http://soft.vpser.net/lnmp/lnmp1.0-full.tar.gz & tar zxvf lnmp1.0-full.tar.gz & cd lnmp1.0-full &./debian. sh

Run the following command in Ubuntu:Wget-c http://soft.vpser.net/lnmp/lnmp1.0-full.tar.gz & tar zxvf lnmp1.0-full.tar.gz & cd lnmp1.0-full &./ubuntu. sh

In addition, you can use soft2.vpser.net and soft3.vpser.net to download two foreign images: http://lnmp.org/faq/lnmp-download-source.html.

To Install Version 0.9, visit the http://old.lnmp.org/install.html

After executing the preceding command, the following prompt is displayed:
(Note: If it is a Debian system, the system will prompt Where are your servers located? Asia, america, europe, oceania or africa. Select the continent where the server/VPS is located. Generally, the VPS is in the United States. Press enter. If it is in China, enter asia and press Enter. If the input is incorrect, press Ctrl and then press the Backspace key to delete the file. You can delete the file by using this method below .)

In this step, you need to set the MySQL root Password. Enter the password and press enter to go to the next step, as shown in:

Check whether MySQL InnoDB is enabled. If you are not sure whether y is enabled, you can disable it in the MySQL file. Enter y to enable y, and enter n to disable MySQL. Enter y or n and press enter to go to the next step. The following information is displayed:

This step is to select the php version. You can select PHP 5.3.17 or PHP 5.2.17. If you install PHP 5.3.17, enter y, install PHP 5.2.17, enter n, enter y or n, and press Enter, select the next MySQL version, for example:

You can select MySQL 5.5.27 or 5.1.60. Input y if MySQL 5.5.27 is installed, input n if MySQL 5.1.60 is installed, enter y or n, and press enter to complete the selection.

Prompt "Press any key to start...", Press enter to confirm installation.
The LNMP script automatically installs and compiles software Nginx, MySQL, PHP, phpMyAdmin, and Zend Optimizer.

The installation time may be several minutes to several hours, mainly because the network speed configured on the machine may affect the installation.

3. Installation Complete
If the following page is displayed:

The installation is successful.
Next, pressAdd VM tutorial, Add a VM, upload a website through sftp or ftp server, resolve the domain name to the VPS or server IP address, the resolution takes effect to use.

4. Installation failed

}

 

[Solve the problem that 503/PHP cannot be used after the installation is complete]:

Generally, the root permission is required to execute System File Installation and other operations. In Ubuntu, you must first perform a quick permission switch: sudo su

Go to the root directory: cd

Enter the directory of the downloaded installation package: cd home/weichen

Ls can see the download package lnmp1.0-full and lnmp1.0-full.tar.gz, enter the package Directory: cd lnmp1.0-full

Ls can see all the files and Upgrade PHP: bash upgrade_php.sh (bash is the default shell of the linux Standard and sh is the default shell of the UNIX standard, both of which can be used here)

After completion, go to localhost/phpmyadmin to check whether it can run.

 

[How to add the apt-get command]:

Apt-get is the package management tool of debian and ubuntu, which is similar to the yum tool of Red Hat series,

The apt-get command generally requires the root permission for execution, so the sudo command must be added.

Usage: apt-get [Option] command

Apt-get [Option] source package1 [package2]

 

Command: apt-get install pageagename (install a software package)

Apt-get remove packagename (Uninstall a software package and keep the configuration document)

Apt-get remove -- purge packagename (uninstall an installed software package and delete the configuration document)

Apt-get autoremove packagename (delete a package and its dependent packages)

Apt-get autoremove -- purge packagename (delete the package and its packages and configuration files)

Dpkg -- force-all -- purge pageagename (force uninstall, usually use with caution when force is added)

Apt-get autoclean (apt will back up installed and unloaded software on the hard disk and use this command to delete the deleted software)

Apt-get clean (Delete backup of installed software)

Apt-get upgrade (update package) and apt-get-u upgrade (this allows APT to display the complete list of updatable packages)

Apt-get dist-upgrade (upgrade the system to the new version)

Apt-cache search string (search for strings in the package list)

Apt-cache show pkgs (show package Records)

Apt-cache pknames (print the name of any package in the package list)

Dpkg-S file (which package is installed in this document)

Dpkg-L package (list any documents in the package)

Dpkg-l (list all installed software packages)

Apt-file search filename (search for software packages containing specific documents)

Apt-get autoclean (run this command regularly to clear packages that have been uninstalled. Deb Documentation)

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.