1. Install the necessary auxiliary software for nginx via yum or download the appropriate package: Pcre, Pcre-devel, OpenSSL, openssl-devel, make, GCC, gcc+
2. Unzip the downloaded Nginx package into the package. Example: Mkdir-p/home/nginx cd/home/nginx wget-q http://nginx.org/nginx-1.6.3.tar.gz
3. Add User Useradd Nginx-s/sbin/nologin-m
4. Tar XF nginx-1.6.3.tar.gz #解压文件
5. CD nginx-1.6.3
6. Pre-compilation configuration file./configure--user=nginx--group=nginx--prefix=/application/nginx-1.6.3/--with-http_stub_status_module- -with-http_ssl_module
#编译安装时可以使用./configure--help View the Help file for the compilation parameters.
7, compile and install make, made install, ln-s/appplication/nginx-1.6.3/application/nginx #创建软连接, production can be configured by accessing the address of the soft connection, You can also view the original installed Nginx version number.
8. View the installation directory and files: Ls/application|grep nginx ls-l/application/nginx/
9, start and check the installation results/application/nginx/sbin/nginx-t Check the service configuration is correct,/application/nginx/sbin/nginx-s Reload/start/stop can be reloaded, Start, stop the Nginx service.
10. Start Nginx Service/application/nginx/sbin/nginx
11. Check if the port for the service is started successfully lsof-i: Netstat-lnt|grep 80
12 Test results Open the IP address of the browser input server-side configuration For example: https:192.168.10.1 See if you can open the Web site, prompting: such as access through other clients, firewall and DNS resolution needs to be set up.
13 native test wget 127.0.0.1 or Curl 127.0.0.1
NIGNX Software Installation and commissioning