Installation and deployment of CentOS under Nginx

Source: Internet
Author: User
Tags openssl library
System: CentOS

First of all, install gcc,gcc-c++, make and other compile tools

Y um install XXXX

Installation of Nginx

Module Dependencies Nginx need to rely on the following 3 a bag

1. Gzip module requires zlib library (Download:/ http/ www.zlib.net/ )

2. Rewrite module requires pcre library (download : http:/ /www.pcre.org/ )

3. The SSL function requires the OpenSSL library (Download:/ http/ www.openssl.org/ )

nginx Package Download: http://mirrors.sohu.com/nginx/

the dependent package installation order is: OpenSSL, zlib , Pcre, then install Nginx Package .

Illustrated tutorials

First step: Download and install the required packages

Download zlib Dependency Packages


Download the Pcre dependency package


Download OpenSSL Dependency Packages


Download Nginx Package

Select the stable version of the


ready-to-Complete installation packages :

openssl-fips-2.0. 9 . tar.gz

zlib-1.2. 8 . tar.gz

pcre-8. + . tar.gz

nginx-1. 9.1 . tar.gz

Step Two :

Install in sequence openssl-fips-2.0. 9 . tar.gz, zlib-1.2. 8 . tar.gz, pcre-8. + . tar.gz, nginx-1. 9.1 . tar.gz

1. Installation openssl-fips-2.0. 9 . tar.gz

[Root@localhost mrms]# TAR-ZXVF openssl-fips-2.0.9.tar.gz

[Root@localhost mrms]# CD openssl-fips-2.0.9

[Root@localhost openssl-fips-2.0.9]#./config

[Root@localhost openssl-fips-2.0.9]# make

[Root@localhost openssl-fips-2.0.9]# make install

2. Installation zlib-1.2. 8 tar.gz

[Root@localhost mrms]# TAR-ZXVF zlib-1.2.8.tar.gz

[Root@localhost mrms]# CD zlib-1.2.8

[Root@localhost zlib-1.2.8]#./configure

[Root@localhost zlib-1.2.8]# make

[Root@localhost zlib-1.2.8]# make install

3. Installation pcre-8. + . tar.gz

[Root@localhost mrms]# TAR-ZXVF pcre-8.32.tar.gz

[Root@localhost mrms]# CD pcre-8.32

[Root@localhost pcre-8.32]#./configure

[Root@localhost pcre-8.32]# make

[Root@localhost pcre-8.32]# make install

4. Installation nginx-1.9.1. tar.gz

[Root@localhost mrms]# TAR-ZXVF nginx-1.9.1.tar.gz

[Root@localhost mrms]# CD nginx-1.9.1

[Root@localhost nginx-1.9.1]#./configure--sbin-path=/usr/local/nginx/nginx \

--conf-path=/usr/local/nginx/nginx.conf \

--pid-path=/usr/local/nginx/nginx.pid \

--with-pcre=/usr/local/src/pcre-8.32 \

--with-zlib=/usr/local/src/zlib-1.2.8 \

--with-openssl=/usr/local/src/openssl-fips-2.0.9

[Root@localhost nginx-1.9.1]# make

[Root@localhost nginx-1.9.1]# make install

so far Nginx the installation is complete !

Detect if the installation was successful

[root@localhost nginx-1.9.1]# cd/usr/local/nginx/

[Root@localhost sbin]#./nginx-t



, indicating Nginx Installation Successful .

Start Nginx

[Root@localhost sbin]#./nginx


View ports

[Root@localhost sbin]# NETSTAT-NTLP


Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

The above describes the CentOS installation deployment, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.

  • 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.