File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # 服务安装配置
2+
3+ ## JDK 安装
4+
5+ 说明:
6+
7+ JDK8 会被安装到 ` /usr/lib/jvm/java ` 路径。
8+
9+ 使用方法:
10+
11+ 执行以下任意命令即可执行安装脚本。
12+
13+ ``` sh
14+ curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/service/jdk8-install.sh | bash
15+ wget -qO- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/service/jdk8-install.sh | bash
16+ ```
17+
18+ ## Redis 安装
19+
20+ 说明:
21+
22+ 下载 ` 5.0.4 ` 版本的 redis 并解压安装到 ` /opt/redis ` 路径下。
23+
24+ 使用方法:
25+
26+ 执行以下任意命令即可执行安装脚本。
27+
28+ ``` sh
29+ curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/service/redis-install.sh | bash
30+ wget -qO- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/service/redis-install.sh | bash
31+ ```
32+
33+
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
3+ cat << EOF
34###################################################################################
45# 安装 JDK8 脚本
56# 仅适用于所有 CentOS 发行版本
67# JDK 会被安装到 /usr/lib/jvm/java 路径。
78# Author: Zhang Peng
89###################################################################################
10+ EOF
911
1012echo -e " \n>>>>>>>>> install jdk8"
1113
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
3+ cat << EOF
34###################################################################################
45# 安装 Redis 脚本
5- # 适用于所有 linux 发行版本。
6- # 注意:安装 nginx 需要依赖以下库,需预先安装:
7- # yum install -y zlib zlib-devel gcc-c++ libtool openssl openssl-devel tcl
86# Author: Zhang Peng
97###################################################################################
8+ EOF
109
11- echo -e " \n>>>>>>>>> install redis"
10+ version=5.0.4
11+ if [[ -n $1 ]]; then
12+ version=$1
13+ fi
1214
13- # 下载并解压 redis
1415root=/opt/redis
15- version=4.0.8
16+ if [[ -n $2 ]]; then
17+ root=$2
18+ fi
19+
20+ echo -e " \n>>>>>>>>> install libs"
21+ yum install -y zlib zlib-devel gcc-c++ libtool openssl openssl-devel tcl
22+
23+ echo -e " \n>>>>>>>>> download redis"
1624mkdir -p ${root}
1725wget -O ${root} /redis-${version} .tar.gz http://download.redis.io/releases/redis-${version} .tar.gz
18- cd ${root} systemctl
19- tar zxvf redis-${version} .tar.gz
2026
21- # 编译
22- cd redis-${version}
23- make
27+ echo -e " \n>>>>>>>>> install redis"
28+ tar zxvf ${root} /redis-${version} .tar.gz -C ${root}
29+ cd ${root} /redis-${version}
30+ make & make install
31+ cd -
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments