CentOS installation Nginx

Source: Internet
Author: User

First, download unzip

Official: http://nginx.org/en/download.html

Download package: nginx-1.8.1.tar.gz, unzip

tar xvf nginx-1.8. 1. tar. gz

The extracted files are as follows

Second, installation dependence

Nginx requires GCC, pcre, OpenSSL, zlib dependent packages, install or update in turn

Installing the GCC compiler

Yum Install GCC

Installing the Pcre Library

Yum Install pcre*

Installing the OpenSSL tools and libraries

Yum Install openssl*

Installing the Zlib Library

Yum Install zlib*
Third, install Nginx

Enter the root directory after the Nginx decompression, configure the Nginx installation path and modules.

--prefix=/usr/java/nginx --with-http_ssl_module--with-http_spdy_module--with-http_stub_status_module-- With-pcre--with-http_gzip_static_module

Run again after success

 Make  Make Install

Installation complete, enter Nginx directory, start Nginx

cd/usr/java/nginx/sbin. /nginx

The browser input address (192.168.253.128 is my demo with the CentOS virtual machine address), displays the following information indicating that the installation was successful.

Nginx start, stop, and restart commands

./Nginx. /nginx-s stop. /nginx-s Reload

CentOS installation Nginx

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.