#!/bin/sh
# -*- coding: utf-8 -*-
# Author: CIAS
# update 2020-12-08
#Define Nginx path variables
NGINX_URL=http://nginx.org/download
NGINX_FILE=nginx-1.18.0.tar.gz
NGINX_FILE_DIR=nginx-1.18.0
NGINX_PREFIX=/usr/local/nginx
NGINX_SYSTEMD=/usr/lib/systemd/system
#Install Nginx Soft
if [ ! -d ${NGINX_PREFIX} ];then
#Install Package
yum install pcre pcre-devel openssl openssl-devel zlib zlib-devel gcc gcc-c++ net-tools iptables tree libicu unzip wget -y
wget -c ${NGINX_URL}/${NGINX_FILE}
tar zxf ${NGINX_FILE}
cd ${NGINX_FILE_DIR}
useradd -s /sbin/nologin www
./configure --prefix=${NGINX_PREFIX} --user=www --group=www --with-http_stub_status_module --with-http_ssl_module --with-http_v2_module --with-http_gzip_static_module --with-http_realip_module --with-stream --with-str