Install Nginx in 5 minutes and nginx in 5 minutes
1. Install gcc (it is already provided after centos 7 and can be installed after Step 1 fails)Yum install gcc-c ++ 2. Install pcreYum install-y pcre-devel3. Install zlibYum install-y zlib-devel4. Install opensslYum install-y openssl-devel5. Download and decompress Nginx (then go to the Nginx directory)Wget http://nginx.org/download/nginx-1.12.2.tar.gz6. Compile Nginx (load common modules such as ssl)./Configure -- prefix =/usr/local/nginx -- with-http_stub_status_module -- with-http_gzip_static_module -- with-http_ssl_module7. Install NginxMake & make install 8. Start/Usr/local/nginx/sbin/nginx9. Stop/Usr/local/nginx/sbin/nginx-s stop (reload indicates restart)10. Access the IP address of the machine where Nginx is located in the browser to verify that Nginx is successfully started.Http ://Yourhost/Note: Nginx configuration file location/Usr/local/nginx/conf/nginx. conf