Nginx source installation configuration

Nginx web server Profile

  Nginx ( "engine x") is a high-performance HTTP and  reverse proxy  server, IMAP, POP3, SMTP  server . Nginx by Igor Sysoev to Russia visited the second site development Rambler.ru, the first public version 0.1.0 was released in 2004 October 4. It will be the source code to BSD license issued in the form, because of its stability, rich feature set, simple configuration files and low system resource consumption is known.

 

Nginx management commands:

/usr/local/nginx/sbin/nginx 启动nginx

/ Usr / local / nginx / sbin / nginx -t detection nginx configuration file is correct

/usr/local/nginx/sbin/nginx -s stop 关闭nginx

/ Usr / local / nginx / sbin / nginx -s reload nginx smooth start (in the case of non-stop service nginx nginx reload configuration file)

 

Nginx installation configuration

(1) Download the source package Nginx

cd /usr/src

wget -c nginx.org/download/nginx-1.14.0.tar.gz

(2) Extract Source Package Nginx

 tar xf nginx-1.14.0.tar.gz

 (3) into the Nginx source unpack directory; create a user www

cd nginx-1.14.0

 useradd www

 (4) install pcre library openssl library gcc compiler

yum install pcre-devel pcre openssl-devel gcc-c++ -y

 (5) pre-compiled Nginx

./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module

 (6) make the compiler

make

(7) make install installation

 make install

 This Nginx web server has been installed

----------------------------------------------------------------------------------------------------------------------------------

Start Nginx 

/usr/local/nginx/sbin/nginx

 See if Nginx process started

SELinux temporarily closed

setenforce 0

 Close firewalld firewall (you can also write the firewall to allow port 80 through rules)

systemclt stop firewalld

 By default browser to access the test page Nginx

 

 

Guess you like

Origin www.cnblogs.com/yang821/p/10964377.html