File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 27
27
echo " 下载 Nginx"
28
28
29
29
cd /opt/setups
30
- wget https://nginx.org/download/nginx-1.12.2 .tar.gz
30
+ wget https://nginx.org/download/nginx-1.14.0 .tar.gz
31
31
32
- if [ ! -f " /opt/setups/nginx-1.12.2 .tar.gz" ]; then
32
+ if [ ! -f " /opt/setups/nginx-1.14.0 .tar.gz" ]; then
33
33
echo " Nginx 下载失败,结束脚本"
34
34
exit 1
35
35
fi
36
36
37
37
echo " Nginx 下载成功,开始解压 Nginx"
38
- tar -zxf nginx-1.12.2 .tar.gz
38
+ tar -zxf nginx-1.14.0 .tar.gz
39
39
40
- if [ ! -d " /opt/setups/nginx-1.12.2 " ]; then
40
+ if [ ! -d " /opt/setups/nginx-1.14.0 " ]; then
41
41
echo " Nginx 解压失败,结束脚本"
42
42
exit 1
43
43
fi
@@ -46,15 +46,17 @@ echo "安装源码安装依赖"
46
46
yum install -y gcc gcc-c++ pcre pcre-devel zlib zlib-devel openssl openssl-devel
47
47
48
48
echo " 开始安装 Nginx"
49
- cd nginx-1.12.2 /
49
+ cd nginx-1.14.0 /
50
50
51
51
./configure --prefix=/usr/local/nginx --pid-path=/var/local/nginx/nginx.pid --lock-path=/var/lock/nginx/nginx.lock --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --with-http_gzip_static_module --http-client-body-temp-path=/var/temp/nginx/client --http-proxy-temp-path=/var/temp/nginx/proxy --http-fastcgi-temp-path=/var/temp/nginx/fastcgi --http-uwsgi-temp-path=/var/temp/nginx/uwsgi --with-http_ssl_module --http-scgi-temp-path=/var/temp/nginx/scgi
52
52
make
53
53
make install
54
54
55
55
echo " 防火墙放行 80 端口"
56
+ systemctl restart firewalld.service
56
57
firewall-cmd --zone=public --add-port=80/tcp --permanent
57
58
firewall-cmd --reload
59
+ systemctl restart firewalld.service
58
60
59
61
echo " 启动 Nginx"
60
62
/usr/local/nginx/sbin/nginx
You can’t perform that action at this time.
0 commit comments