Skip to content

Commit 92384ce

Browse files
committed
更新脚本
1 parent dc457ef commit 92384ce

4 files changed

Lines changed: 37 additions & 28 deletions

File tree

codes/linux/ops/soft/README.md

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# 服务安装配置
22

3-
## JDK 安装
3+
## JDK8 安装
44

55
说明:
66

@@ -11,11 +11,11 @@ JDK8 会被安装到 `/usr/lib/jvm/java` 路径。
1111
执行以下任意命令即可执行安装脚本。
1212

1313
```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
14+
curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/jdk8-install.sh | bash
15+
wget -qO- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/jdk8-install.sh | bash
1616
```
1717

18-
## Maven 安装
18+
## Maven 安装配置
1919

2020
说明:
2121

@@ -50,15 +50,27 @@ wget -qO- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux
5050

5151
说明:
5252

53-
下载 redis `5.0.4` 并解压安装到 `/opt/redis` 路径下。
53+
下载 redis `5.0.4` 并解压安装到 `/opt/redis` 路径下。
5454

5555
使用方法:
5656

5757
执行以下任意命令即可执行安装脚本。
5858

5959
```sh
60-
curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/service/redis-install.sh | bash
61-
wget -qO- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/service/redis-install.sh | bash
60+
curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/redis-install.sh | bash
61+
wget -qO- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/redis-install.sh | bash
6262
```
6363

64+
## Tomcat8 安装
65+
66+
说明:
67+
68+
下载 tomcat `8.5.28` 并解压安装到 `/opt/tomcat` 路径下。
69+
70+
使用方法:
71+
72+
```sh
73+
curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/tomcat8-install.sh | bash
74+
wget -qO- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/tomcat8-install.sh | bash
75+
```
6476

codes/linux/ops/soft/main.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ do
1616
path=$(cd "$(dirname "$0")"; pwd)
1717
case ${item} in
1818
"git") yum install -y git ;;
19-
"jdk") curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/service/jdk8-install.sh | bash ;;
19+
"jdk") curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/jdk8-install.sh | bash ;;
2020
"maven") wget -qO- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/maven-install.sh | bash ;;
2121
"nodejs") curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/nodejs-install.sh | bash ;;
22-
"redis") curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/service/redis-install.sh | bash ;;
22+
"redis") curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/redis-install.sh | bash ;;
2323
*)
2424
echo -e "输入项不支持!"
2525
main

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

Lines changed: 0 additions & 15 deletions
This file was deleted.
Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,28 @@
11
#!/usr/bin/env bash
22

3+
cat << EOF
4+
35
###################################################################################
46
# 安装 Tomcat 脚本
57
# 适用于所有 linux 发行版本。
68
# Author: Zhang Peng
79
###################################################################################
810
9-
echo -e "\n>>>>>>>>> install tomcat"
11+
EOF
1012

11-
# 下载并解压 redis
12-
root=/opt/tomcat
1313
version=8.5.28
14+
if [[ -n $1 ]]; then
15+
version=$1
16+
fi
17+
18+
root=/opt/tomcat
19+
if [[ -n $2 ]]; then
20+
root=$2
21+
fi
22+
23+
echo -e "\n>>>>>>>>> download tomcat"
1424
mkdir -p ${root}
1525
wget -O ${root}/apache-tomcat-${version}.tar.gz https://archive.apache.org/dist/tomcat/tomcat-8/v${version}/bin/apache-tomcat-${version}.tar.gz
16-
tar zxvf apache-tomcat-${version}.tar.gz
26+
27+
echo -e "\n>>>>>>>>> install tomcat"
28+
tar zxvf ${root}/apache-tomcat-${version}.tar.gz -C ${root}

0 commit comments

Comments
 (0)