安装nginx软件脚本(编译安装)
yum install -y pcre-devel openssl-devel
useradd www -s /sbin/nologin/ -M
cd /server/tools
wget http://nginx.org/download/nginx-1.12.2.tar.gz
tar xf nginx-1.12.2.tar.gz
cd /server/tools/nginx-1.12.2
./configure --prefix=/application/nginx-12.2 --user=www --group=www -- with-http_ssl_module --with-http_stub_status_module
echo $?
make
echo $?
make install
cd /application/
cd nginx-12.2/
ln -s /application/nginx-12.2/ /application/nginx
启动命令 /application/nginx/sbin/nginx

检查服务 ps -ef|grep nginx
测试 网页输入安装了nginx机器的ip地址,打开:welcome to nginx
停止命令 /application/nginx/sbin/nginx -s stop