File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66
77安装 [ oh-my-zsh] ( https://github.com/robbyrussell/oh-my-zsh )
88
9- 使用方法:
9+ 使用方法
1010
1111执行以下任意命令即可执行安装脚本。
1212
@@ -89,3 +89,30 @@ curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/
8989wget -qO- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/tomcat8-install.sh | bash
9090```
9191
92+ ## Kafka 安装
93+
94+ 说明:
95+
96+ 下载 kafka ` 2.2.0 ` 并解压安装到 ` /opt/kafka ` 路径下。
97+
98+ 使用方法:执行以下任意命令即可执行脚本。
99+
100+ ``` sh
101+ curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/kafka-install.sh | bash
102+ wget -qO- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/kafka-install.sh | bash
103+ ```
104+
105+ ## RocketMQ 安装
106+
107+ 说明:
108+
109+ 下载 rocketmq ` 4.5.0 ` 并解压安装到 ` /opt/rocketmq ` 路径下。
110+
111+ 使用方法:执行以下任意命令即可执行脚本。
112+
113+ ``` sh
114+ curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/rocketmq-install.sh | bash
115+ wget -qO- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/rocketmq-install.sh | bash
116+ ```
117+
118+ 脚本会下载解压 kafka 到 ` /opt/kafka ` 路径下。
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ cat << EOF
4+
5+ ###################################################################################
6+ # 安装 Kafka 脚本
7+ # @system: 适用于所有 linux 发行版本。
8+ # @author: Zhang Peng
9+ ###################################################################################
10+
11+ EOF
12+
13+ version=2.2.0
14+ if [[ -n $1 ]]; then
15+ version=$1
16+ fi
17+
18+ root=/opt/kafka
19+ if [[ -n $2 ]]; then
20+ root=$2
21+ fi
22+
23+ echo -e " \n>>>>>>>>> download kafka"
24+ mkdir -p ${root}
25+ wget -O ${root} /kafka_2.12-${version} .tgz http://mirrors.tuna.tsinghua.edu.cn/apache/kafka/${version} /kafka_2.12-${version} .tgz
26+
27+ echo -e " \n>>>>>>>>> install kafka"
28+ tar zxf ${root} /kafka_2.12-${version} .tgz -C ${root}
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1111
1212path=$( cd " $( dirname " $0 " ) " ; pwd)
1313PS3=" Please select script type: "
14- select item in " git" " zsh" " jdk" " maven" " nodejs" " redis" " tomcat"
14+ select item in " git" " zsh" " jdk" " maven" " nodejs" " redis" " tomcat" " kafka " " rocketmq "
1515do
1616path=$( cd " $( dirname " $0 " ) " ; pwd)
1717case ${item} in
@@ -22,6 +22,8 @@ case ${item} in
2222 " nodejs" ) curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/nodejs-install.sh | bash ;;
2323 " redis" ) curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/redis-install.sh | bash ;;
2424 " tomcat" ) curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/tomcat8-install.sh | bash ;;
25+ " kafka" ) curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/kafka-install.sh | bash ;;
26+ " rocketmq" ) curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/rocketmq-install.sh | bash ;;
2527 * )
2628 echo -e " 输入项不支持!"
2729 main
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ version=3.6.3
1414mkdir -p ${root}
1515wget -O ${root} /mongodb-linux-x86_64-${version} .tgz https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-${version} .tgz
1616cd ${root}
17- tar zxvf mongodb-linux-x86_64-${version} .tgz
17+ tar zxf mongodb-linux-x86_64-${version} .tgz
1818mv mongodb-linux-x86_64-${version} mongodb-${version}
1919
2020mkdir -p /data/db
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ nginxVersion=1.12.2
2222mkdir -p ${ngixnRoot}
2323wget -O ${ngixnRoot} /nginx-${nginxVersion} .tar.gz http://nginx.org/download/nginx-${nginxVersion} .tar.gz
2424cd ${ngixnRoot}
25- tar zxvf nginx-${nginxVersion} .tar.gz
25+ tar zxf nginx-${nginxVersion} .tar.gz
2626
2727# 编译
2828cd nginx-${nginxVersion}
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ version=$2
1616mkdir -p ${root}
1717wget -O ${root} /pcre-${version} .tar.gz http://downloads.sourceforge.net/project/pcre/pcre/${version} /pcre-${version} .tar.gz
1818cd ${root}
19- tar zxvf pcre-${version} .tar.gz
19+ tar zxf pcre-${version} .tar.gz
2020cd pcre-${version}
2121
2222# 编译
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ mkdir -p ${root}
2828wget -O ${root} /redis-${version} .tar.gz http://download.redis.io/releases/redis-${version} .tar.gz
2929
3030echo -e " \n>>>>>>>>> install redis"
31- tar zxvf ${root} /redis-${version} .tar.gz -C ${root}
31+ tar zxf ${root} /redis-${version} .tar.gz -C ${root}
3232cd ${root} /redis-${version}
3333make & make install
3434cd -
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ cat << EOF
4+
5+ ###################################################################################
6+ # 安装 rocketmq 脚本
7+ # @system: 适用于所有 linux 发行版本。
8+ # @author: Zhang Peng
9+ ###################################################################################
10+
11+ EOF
12+
13+ version=4.5.0
14+ if [[ -n $1 ]]; then
15+ version=$1
16+ fi
17+
18+ root=/opt/rocketmq
19+ if [[ -n $2 ]]; then
20+ root=$2
21+ fi
22+
23+ echo -e " \n>>>>>>>>> download rocketmq"
24+ mkdir -p ${root}
25+ wget -O ${root} /rocketmq-all-${version} -bin-release.zip http://mirrors.tuna.tsinghua.edu.cn/apache/rocketmq/${version} /rocketmq-all-${version} -bin-release.zip
26+
27+ echo -e " \n>>>>>>>>> install rocketmq"
28+ unzip -o ${root} /rocketmq-all-${version} -bin-release.zip -d ${root} /rocketmq-all-${version} /
You can’t perform that action at this time.
0 commit comments