1)SHELL编程一键部署NginxWEB平台脚本(v2)版本
#!/bin/bash
#2021年10月16日12:39:21
#auto install nginx web
#by author www.jfedu.net
########################
NGX_VER="1.18.0"
NGX_YUM="yum install -y"
NGX_SRC="nginx-$NGX_VER"
NGX_DIR="/usr/local/nginx"
NGX_SOFT="nginx-$NGX_VER.tar.gz"
NGX_URL="http://nginx.org/download"
NGX_ARGS="--user=www --group=www --with-http_stub_status_module"
$NGX_YUM wget gzip tar make gcc
$NGX_YUM pcre pcre-devel zlib-devel
wget -c $NGX_URL/$NGX_SOFT -P /usr/src/
cd /usr/src/
ls -l $NGX_SOFT
tar -xzvf $NGX_SOFT
cd $NGX_SRC/
useradd -s /sbin/nologin www -M
./configure --prefix=$NGX_DIR/ $NGX_ARGS
make
make install
ls -l $NGX_DIR/
$NGX_DIR/sbin/nginx
ps -ef|grep nginx
netstat -tnlp|grep 80
setenforce 0
systemctl stop firewalld.service