From 4cd8db7735e871e8fcc6b1f26a1bfa4c986c7f29 Mon Sep 17 00:00:00 2001 From: Zhang Peng Date: Sat, 29 Sep 2018 18:28:47 +0800 Subject: [PATCH] =?UTF-8?q?:bookmark:=20Nginx=20rpm=20=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- codes/deploy/tool/nginx/install-nginx-by-rpm.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 codes/deploy/tool/nginx/install-nginx-by-rpm.sh diff --git a/codes/deploy/tool/nginx/install-nginx-by-rpm.sh b/codes/deploy/tool/nginx/install-nginx-by-rpm.sh new file mode 100644 index 0000000..1ea43f4 --- /dev/null +++ b/codes/deploy/tool/nginx/install-nginx-by-rpm.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +################################################################################### +# 安装 nginx 脚本 +# 仅适用于 centos 发行版本。 +# Author: Zhang Peng +################################################################################### + +echo -e "\n>>>>>>>>> install nginx" + +# Centos7 rpm 地址:http://nginx.org/packages/rhel/7/x86_64/RPMS/ +# CentOS6 rpm 地址:http://nginx.org/packages/rhel/6/x86_64/RPMS/ + +mkdir -p /opt/nginx +wget -O /opt/nginx/nginx.rpm http://nginx.org/packages/rhel/7/x86_64/RPMS/nginx-1.14.0-1.el7_4.ngx.x86_64.rpm +rpm -ivh /opt/nginx/nginx.rpm +nginx -v