Linux Build Nginx

Source: Internet
Author: User

1.Nginx Installation

1.1 Pcre

(1) Download the compilation package http://www.pcre.org/(note that PCCE is required, not pcre2)

(2) TAR-ZXVF pcre-8.36.tar.gz decompression

1.2 OpenSSL

(1) Download the compilation package http://www.openssl.org/source/

(2) TAR-ZXVF openssl-1.0.0s.tar.gz decompression

1.3 zlib

(1) Download the compilation package http://www.openssl.org/source/

(2) TAR-ZXVF zlib-1.2.8.tar.gz decompression

1.4 Nginx

(1) Download the compilation package http://nginx.org/

(2) TAR-ZXVF nginx-1.6.3.tar.gz decompression

(3) Enter the nginx-1.6.3/execution./configure, where prefix is the Nginx installation directory, With-pcre for Pcre extract directory With-openssl for the decompression directory of OpenSSL With-zlib for zlib extract directory,

Subsequent commands to turn on the Ssl/flv/gzip module

./configure--prefix=/home/tu/nginx--with-pcre=/home/tu/package/pcre-8.38 --with-openssl=/home/tu/ package/openssl-1.0. 2e--with-zlib=/home/tu/package/zlib-1.2. 8 --with-http_ssl_module--with-http_flv_module--with-http_gzip_static_module

, all libraries are found, execution succeeds

  

(4) Execute the Make && make install command to complete Nginx installation

2. Start Nginx

2.1 Start

(1) Enter nginx/sbin/,./nginx can start, need to pay attention to its startup permissions issues

(2) You can use the command ps-ef|grep nginx view Nginx main process and work process

(3) The same network segment using HTTP://IP:80 can access its default page, note If Nginx is started, but the same network segment access page display 404, you can see whether Linux 80 port is turned on

Linux Build 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.