yum -y install gcc pcre pcre-devel zlib zlib-devel openssl openssl-devel
mkdir /tools && cd /tools
wget https://nginx.org/download/nginx-1.14.0.tar.gz
useradd www -s /sbin/nologin -M
tar xf nginx-1.14.0.tar.gz
cd nginx-1.14.0
mkdir -p /application/nginx
./configure --user=www --group=www --prefix=/application/nginx --sbin-path=/application/nginx/sbin/nginx --with-http_ssl_module --with-http_stub_status_module
make -j grep processor /proc/cpuinfo |wc -l
make install
/application/nginx/sbin/nginx 启动nginx
/application/nginx/sbin/nginx -s stop 停止nginx
/application/nginx/sbin/nginx -s reload 重载nginx
转载于:https://blog.51cto.com/7726736/2129962