更新脚本
parent
662fa67660
commit
a72a40b612
|
@ -0,0 +1,33 @@
|
|||
# 服务安装配置
|
||||
|
||||
## JDK 安装
|
||||
|
||||
说明:
|
||||
|
||||
JDK8 会被安装到 `/usr/lib/jvm/java` 路径。
|
||||
|
||||
使用方法:
|
||||
|
||||
执行以下任意命令即可执行安装脚本。
|
||||
|
||||
```sh
|
||||
curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/service/jdk8-install.sh | bash
|
||||
wget -qO- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/service/jdk8-install.sh | bash
|
||||
```
|
||||
|
||||
## Redis 安装
|
||||
|
||||
说明:
|
||||
|
||||
下载 `5.0.4` 版本的 redis 并解压安装到 `/opt/redis` 路径下。
|
||||
|
||||
使用方法:
|
||||
|
||||
执行以下任意命令即可执行安装脚本。
|
||||
|
||||
```sh
|
||||
curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/service/redis-install.sh | bash
|
||||
wget -qO- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/service/redis-install.sh | bash
|
||||
```
|
||||
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
# 脚本使用说明
|
||||
|
||||
## 安装 JDK
|
||||
|
||||
使用方法:执行以下任意命令即可执行脚本。
|
||||
|
||||
```sh
|
||||
curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/service/jdk/install-jdk8.sh | bash
|
||||
wget -qO- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/service/jdk/install-jdk8.sh | bash
|
||||
```
|
|
@ -1,11 +1,13 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
cat << EOF
|
||||
###################################################################################
|
||||
# 安装 JDK8 脚本
|
||||
# 仅适用于所有 CentOS 发行版本
|
||||
# JDK 会被安装到 /usr/lib/jvm/java 路径。
|
||||
# Author: Zhang Peng
|
||||
###################################################################################
|
||||
EOF
|
||||
|
||||
echo -e "\n>>>>>>>>> install jdk8"
|
||||
|
|
@ -1,23 +1,31 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
cat << EOF
|
||||
###################################################################################
|
||||
# 安装 Redis 脚本
|
||||
# 适用于所有 linux 发行版本。
|
||||
# 注意:安装 nginx 需要依赖以下库,需预先安装:
|
||||
# yum install -y zlib zlib-devel gcc-c++ libtool openssl openssl-devel tcl
|
||||
# Author: Zhang Peng
|
||||
###################################################################################
|
||||
EOF
|
||||
|
||||
echo -e "\n>>>>>>>>> install redis"
|
||||
version=5.0.4
|
||||
if [[ -n $1 ]]; then
|
||||
version=$1
|
||||
fi
|
||||
|
||||
# 下载并解压 redis
|
||||
root=/opt/redis
|
||||
version=4.0.8
|
||||
if [[ -n $2 ]]; then
|
||||
root=$2
|
||||
fi
|
||||
|
||||
echo -e "\n>>>>>>>>> install libs"
|
||||
yum install -y zlib zlib-devel gcc-c++ libtool openssl openssl-devel tcl
|
||||
|
||||
echo -e "\n>>>>>>>>> download redis"
|
||||
mkdir -p ${root}
|
||||
wget -O ${root}/redis-${version}.tar.gz http://download.redis.io/releases/redis-${version}.tar.gz
|
||||
cd ${root}systemctl
|
||||
tar zxvf redis-${version}.tar.gz
|
||||
|
||||
# 编译
|
||||
cd redis-${version}
|
||||
make
|
||||
echo -e "\n>>>>>>>>> install redis"
|
||||
tar zxvf ${root}/redis-${version}.tar.gz -C ${root}
|
||||
cd ${root}/redis-${version}
|
||||
make & make install
|
||||
cd -
|
|
@ -1,9 +0,0 @@
|
|||
# 安装 Redis
|
||||
|
||||
使用方法:
|
||||
|
||||
```sh
|
||||
curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/service/redis/install-redis.sh | bash
|
||||
```
|
||||
|
||||
脚本会下载解压 redis 到 `/opt/redis` 路径下。
|
Loading…
Reference in New Issue