mirror of
https://github.com/dunwu/linux-tutorial.git
synced 2024-04-15 19:55:24 +08:00
更新脚本
This commit is contained in:
parent
bb807fb123
commit
0e296c65d2
@ -1,14 +0,0 @@
|
||||
# 脚本使用说明
|
||||
|
||||
## 安装 Git
|
||||
|
||||
执行 yum install -y git 即可。
|
||||
|
||||
## 安装 Gitlab
|
||||
|
||||
使用方法:执行以下任意命令即可执行脚本。
|
||||
|
||||
```sh
|
||||
curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/git/install-gitlab.sh | bash
|
||||
wget -qO- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/git/install-gitlab.sh | bash
|
||||
```
|
@ -1,11 +0,0 @@
|
||||
# 安装 Jenkins
|
||||
|
||||
## 安装 Jenkins8
|
||||
|
||||
使用方法:
|
||||
|
||||
```sh
|
||||
curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/jenkins/install-jenkins.sh | bash
|
||||
```
|
||||
|
||||
脚本会下载解压 Jenkins 到 `/opt/jenkins` 路径下。
|
41
codes/linux/ops/soft/nginx-install.sh
Normal file
41
codes/linux/ops/soft/nginx-install.sh
Normal file
@ -0,0 +1,41 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
cat << EOF
|
||||
|
||||
###################################################################################
|
||||
# 安装 nginx 脚本
|
||||
# nginx 会被安装到 /opt/nginx 路径。
|
||||
# 注意:安装 nginx 需要依赖以下库,需预先安装:
|
||||
# zlib zlib-devel gcc-c++ libtool openssl openssl-devel
|
||||
# @system: 适用于所有 linux 发行版本。
|
||||
# @author: Zhang Peng
|
||||
###################################################################################
|
||||
|
||||
EOF
|
||||
|
||||
version=1.12.2
|
||||
if [[ -n $1 ]]; then
|
||||
version=$1
|
||||
fi
|
||||
|
||||
root=/opt/nginx
|
||||
if [[ -n $2 ]]; then
|
||||
root=$2
|
||||
fi
|
||||
|
||||
echo -e "\n>>>>>>>>> install libs"
|
||||
yum install -y zlib zlib-devel gcc-c++ libtool openssl openssl-devel
|
||||
|
||||
# 首先要安装 PCRE,PCRE 作用是让 nginx 支持 Rewrite 功能
|
||||
curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/pcre-install.sh | bash
|
||||
|
||||
echo -e "\n>>>>>>>>> download nginx"
|
||||
mkdir -p ${root}
|
||||
wget -O ${root}/nginx-${version}.tar.gz http://nginx.org/download/nginx-${version}.tar.gz
|
||||
|
||||
# 编译
|
||||
tar zxf ${root}/nginx-${version}.tar.gz -C ${root}
|
||||
cd ${root}/nginx-${version}
|
||||
./configure --with-http_stub_status_module --with-http_ssl_module --with-pcre=${pcreRoot}/pcre-${pcreVersion}
|
||||
nginx -v
|
||||
cd -
|
33
codes/linux/ops/soft/pcre-install.sh
Normal file
33
codes/linux/ops/soft/pcre-install.sh
Normal file
@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
cat << EOF
|
||||
|
||||
###################################################################################
|
||||
# 安装 pcre 脚本
|
||||
# @system: 适用于所有 linux 发行版本。
|
||||
# @author: Zhang Peng
|
||||
###################################################################################
|
||||
|
||||
EOF
|
||||
|
||||
version=8.35
|
||||
if [[ -n $1 ]]; then
|
||||
version=$1
|
||||
fi
|
||||
|
||||
root=/opt/pcre
|
||||
if [[ -n $2 ]]; then
|
||||
root=$2
|
||||
fi
|
||||
|
||||
echo -e "\n>>>>>>>>> donwload pcre"
|
||||
mkdir -p ${root}
|
||||
wget -O ${root}/pcre-${version}.tar.gz http://downloads.sourceforge.net/project/pcre/pcre/${version}/pcre-${version}.tar.gz
|
||||
|
||||
echo -e "\n>>>>>>>>> install pcre"
|
||||
tar zxf ${root}/pcre-${version}.tar.gz -C ${root}
|
||||
cd ${root}/pcre-${version}
|
||||
./configure
|
||||
make && make install
|
||||
pcre-config --version
|
||||
cd -
|
@ -30,5 +30,5 @@ wget -O ${root}/redis-${version}.tar.gz http://download.redis.io/releases/redis-
|
||||
echo -e "\n>>>>>>>>> install redis"
|
||||
tar zxf ${root}/redis-${version}.tar.gz -C ${root}
|
||||
cd ${root}/redis-${version}
|
||||
make & make install
|
||||
make && make install
|
||||
cd -
|
||||
|
Loading…
Reference in New Issue
Block a user