One or one-button installation Nginx script
#!/bin/bash
####################################
#Name: nginx_install.sh
#Author:d Oublelinux
#version: 1.1
#Date: 2017/08/19
####################################
Yum-y Install Pcre Pcre-devel
Yum-y Install OpenSSL Openssl-devel
Mkdir-p/home/qiu/tools
CD/
mkdir Application
Useradd nginx-s/sbin/nologin-m
Cd/home/qiu/tools
Wgethttp://nginx.org/download/nginx-1.6.3.tar.gz
Tar XF nginx-1.6.3.tar.gz
cd/home/qiu/tools/nginx-1.6.3
Ls
./configure--user=nginx--group=nginx--prefix=/application/nginx-1.6.3--with-http_stub_status_module--with-http _ssl_module
A= ' echo $? '
If [$a-eq 0];then
Make
Else
echo "Configure is worrong!"
Fi
B= ' echo $? '
If [$b-eq 0];then
Make install
Else
echo "Make is worrong!"
Fi
echo $?
Ln-s/application/nginx-1.6.3//application/nginx
/application/nginx/sbin/nginx-t
/application/nginx/sbin/nginx
netstat-lnt | grep 80
/etc/init.d/iptables stop
Setenforce 0
Getenforce
# # #test # #
A= ' Ifconfig|awk ' nr==2 ' |awk-f ' "' {print $} '
ECHO-E "Congratuation!!! Now "
Echo-e "Your IP is $a, now,you can testit!"
echo " Please enter the IP in the browser to test!" "
This article from "Doublelinux" blog, declined reprint!
One-click installation of shell scripts