Nginx Quick Installation Manual and how to modify the port number

Source: Internet
Author: User
Tags manual modify openssl port number

Installing the OPENSSL-0.9.8E.TAR.GZ Package

./configure--prefix=/usr/local/openssl
Make &&make Install

2 Install pcre-8.12.tar.gz software package (can install CD inside Pcre and Pcre-devel,prce library support Nginx httprewrite module)
./configure--prefix=/usr/local/prce
Make &&make Install

3) Install Nginx Package
Useradd david-s/sbin/nologin

./configure

--user=david--group=david/designated Nginx users and groups running Nginx

--prefix=/usr/local/nginx/
--with-http_stub_status_module--with-openssl=/usr/local/openssl
--with-pcre=/usr/local/pcre/
Make && make install

More Wonderful content: http://www.bianceng.cnhttp://www.bianceng.cn/Servers/web/

Test whether the Nginx service was successfully installed
/usr/local/nginx/sbin/nginx-t
Nginx:the configuration file/usr/local/nginx//conf/nginx.conf syntax is OK
Nginx:configuration file/usr/local/nginx//conf/nginx.conf Test is successful

5) Start Nginx Service

/usr/local/nginx/sbin/nginx

6 to see if the Nginx is open (that is, to see if the Nginx port is in listen)

Netstat-antl

7) Close Nginx Service

[Root@nagios ~]# ps-auxw |grep "Nginx" |grep-v "grep"
Warning:bad syntax, perhaps a bogus '-'? See/usr/share/doc/procps-3.2.7/faq
Root 5115 0.0 0.0 4112 456? Ss 21:42 0:00 Nginx:master Process/usr/local/nginx/sbin/nginx
David 5116 0.0 0.2 4284 1072? S 21:42 0:00 Nginx:worker Process
Kill-9 Process Number

8) Modify the Nginx port number
server {
Listen It's OK to change it.
}

This article from the "Simple Dreamer" blog, please be sure to retain this source http://sfzhang88.blog.51cto.com/4995876/851994

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.