Skip to content

Commit 4cd8db7

Browse files
committed
🔖 Nginx rpm 安装脚本
1 parent 68e9bb7 commit 4cd8db7

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env bash
2+
3+
###################################################################################
4+
# 安装 nginx 脚本
5+
# 仅适用于 centos 发行版本。
6+
# Author: Zhang Peng
7+
###################################################################################
8+
9+
echo -e "\n>>>>>>>>> install nginx"
10+
11+
# Centos7 rpm 地址:http://nginx.org/packages/rhel/7/x86_64/RPMS/
12+
# CentOS6 rpm 地址:http://nginx.org/packages/rhel/6/x86_64/RPMS/
13+
14+
mkdir -p /opt/nginx
15+
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
16+
rpm -ivh /opt/nginx/nginx.rpm
17+
nginx -v

0 commit comments

Comments
 (0)