1. Download nginx-1.10.3

  • Switch to the directory you want to download
  • Wget download: http://220.112.193.197/files/9182000003CA673D/nginx.org/download/nginx-1.10.3.tar.gz
  • Decompress: tar -zxvf nginx-1.10.3.tar.gz
  • Enter the directory nginx-1.10.3
  • Run the following configuration commands: ./configure –user=www –group=www –prefix=/usr/local/nginx –with-http_stub_status_module –with-http_ssl_module –with-http_realip_module
  • Yum -y install openssl openssl-devel
  • /configure: error: C compiler cc is not found yum -y install GCC GCC – C ++ autoconf automake make
  • Compiler: make
  • Install: make install
  • Run the following command to check whether the installation is successful: CD /usr/local/nginx/sbin; . / nginx -t results showed that install nginx success: the configuration file/usr/local/nginx/conf/nginx. Conf syntax is ok nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
  • Execute the command: / usr/local/nginx/sbin/nginx – c/usr/local/nginx/conf/nginx. Conf
  • Acquisition process number: ps – ef | grep nginx
  • Stop Nginx gracefully: kill-quit master process ID
  • Stop Nginx quickly: kill -term master process ID
  • Forcibly stopping Nginx: kill -9 master process ID
  • Acquisition process number: ps – ef | grep nginx
  • Run the kill -hup master process ID

Nginx startup, restart, and shutdown operations under nginx centos./configure Common parameters