Environment: centos7+nginx1.9.3
1 Installing a dependent class library
[email protected] ~]# Yum install zlib zlib-devel OpenSSL openssl-devel pcre pcre-devel
2 Download Nginx
[Email protected] ~]# wget http://nginx.org/download/nginx-1.9.4.tar.gz
3 Installing Nginx
[[email protected] src]# TAR-ZXVF nginx-1.9.4.tar.gz-c/src[[email protected] src]# CD Nginx-1.9.4/[[email protected] Ng inx-1.9.4]#./configure--prefix=/usr/local/nginx--with-http_stub_status_module[[email protected] nginx-1.9.4]# Make && make install
4 nginx Boot
[Email protected] nginx-1.9.4]#/usr/local/nginx/sbin/nginx-c/usr/local/nginx/conf/nginx.conf
5 starting firewall port service
Firewall-cmd--permanent--zone=public--add-service=http
6 Nginx Common commands
/usr/local/nginx/sbin/nginx-s reload/usr/local/nginx/sbin/nginx-s stop/usr/local/nginx/sbin/nginx-t-c/usr/local/ Conf/nginx.cnf
This article is from the "Watch the world on the shoulders of Giants" blog, please be sure to keep this source http://lixiaotao.blog.51cto.com/985722/1690243
CentOS 7 + Nginx 1.9.4