Centos installation Nginx

Source: Internet
Author: User

one. Download Nginx

Download the latest version of Nginx from Nginx's official website (http://nginx.org/en/download.html), here i download nginx-1.9.12.

  

When the download is complete, get a compressed package as shown

  

Upload the Nginx tar package to the Linux server as shown in:

  

  

Two. Install Nginx2.1. Installation Prerequisites

Before installing Nginx, you need to make sure the system is installed with G++,GCC, Openssl-devel, Pcre-devel and Zlib-devel software.

1. Install the required software:yum -y install zlib zlib-devel openssl openssl--devel pcre pcre-devel

The installation process is as follows:

  

  

2.2. Install the Nginx dependency package:yum install GeoIP gd libXpm libxslt

The installation process is as follows:

  

  

2.2. Unzip the installation Nginx

Unzip the Nginx compression package into the directory where the Nginx installation package is located, as shown in:

  

  

Unzip complete, more than one nginx-1.9.12 directory, enter the nginx-1.9.12 directory to view the contents, as follows:

  

The installation of the source code generally consists of 3 steps: Configuration (Configure), compile (make), install (makes install)

  1.执行./configure

  

  

  ./configure命令执行成功

2. Perform the make operation as shown in:

  

  

The make operation completes.

3. Perform the Make install command.

2.3. Verify that the installation Nginx is successful

1. View Nginx Installation path (Whereis nginx)

  

2. Start Nginx

  

In the browser input http://centos server IP access Nginx, such as my server IP address is: 115.159.95.35, input http://115.159.95.35/Access installed Nginx, access results as shown:

  

Can see the Nginx Welcome page normally, it means that Nginx has been installed successfully.

Centos installation Nginx

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.