Skip to content

Commit 0e296c6

Browse files
committed
更新脚本
1 parent bb807fb commit 0e296c6

7 files changed

Lines changed: 75 additions & 26 deletions

File tree

codes/linux/ops/soft/git/README.md

Lines changed: 0 additions & 14 deletions
This file was deleted.
File renamed without changes.
File renamed without changes.

codes/linux/ops/soft/jenkins/README.md

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/usr/bin/env bash
2+
3+
cat << EOF
4+
5+
###################################################################################
6+
# 安装 nginx 脚本
7+
# nginx 会被安装到 /opt/nginx 路径。
8+
# 注意:安装 nginx 需要依赖以下库,需预先安装:
9+
# zlib zlib-devel gcc-c++ libtool openssl openssl-devel
10+
# @system: 适用于所有 linux 发行版本。
11+
# @author: Zhang Peng
12+
###################################################################################
13+
14+
EOF
15+
16+
version=1.12.2
17+
if [[ -n $1 ]]; then
18+
version=$1
19+
fi
20+
21+
root=/opt/nginx
22+
if [[ -n $2 ]]; then
23+
root=$2
24+
fi
25+
26+
echo -e "\n>>>>>>>>> install libs"
27+
yum install -y zlib zlib-devel gcc-c++ libtool openssl openssl-devel
28+
29+
# 首先要安装 PCRE,PCRE 作用是让 nginx 支持 Rewrite 功能
30+
curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/pcre-install.sh | bash
31+
32+
echo -e "\n>>>>>>>>> download nginx"
33+
mkdir -p ${root}
34+
wget -O ${root}/nginx-${version}.tar.gz http://nginx.org/download/nginx-${version}.tar.gz
35+
36+
# 编译
37+
tar zxf ${root}/nginx-${version}.tar.gz -C ${root}
38+
cd ${root}/nginx-${version}
39+
./configure --with-http_stub_status_module --with-http_ssl_module --with-pcre=${pcreRoot}/pcre-${pcreVersion}
40+
nginx -v
41+
cd -
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/usr/bin/env bash
2+
3+
cat << EOF
4+
5+
###################################################################################
6+
# 安装 pcre 脚本
7+
# @system: 适用于所有 linux 发行版本。
8+
# @author: Zhang Peng
9+
###################################################################################
10+
11+
EOF
12+
13+
version=8.35
14+
if [[ -n $1 ]]; then
15+
version=$1
16+
fi
17+
18+
root=/opt/pcre
19+
if [[ -n $2 ]]; then
20+
root=$2
21+
fi
22+
23+
echo -e "\n>>>>>>>>> donwload pcre"
24+
mkdir -p ${root}
25+
wget -O ${root}/pcre-${version}.tar.gz http://downloads.sourceforge.net/project/pcre/pcre/${version}/pcre-${version}.tar.gz
26+
27+
echo -e "\n>>>>>>>>> install pcre"
28+
tar zxf ${root}/pcre-${version}.tar.gz -C ${root}
29+
cd ${root}/pcre-${version}
30+
./configure
31+
make && make install
32+
pcre-config --version
33+
cd -

codes/linux/ops/soft/redis-install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,5 @@ wget -O ${root}/redis-${version}.tar.gz http://download.redis.io/releases/redis-
3030
echo -e "\n>>>>>>>>> install redis"
3131
tar zxf ${root}/redis-${version}.tar.gz -C ${root}
3232
cd ${root}/redis-${version}
33-
make & make install
33+
make && make install
3434
cd -

0 commit comments

Comments
 (0)