File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -61,6 +61,21 @@ curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/
6161wget -qO- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/nodejs-install.sh | bash
6262```
6363
64+ ## MongoDB 安装
65+
66+ 说明:
67+
68+ 下载 mongodb ` 4.0.9 ` 并解压安装到 ` /opt/mongodb ` 路径下。
69+
70+ 使用方法:
71+
72+ 执行以下任意命令即可执行安装脚本。
73+
74+ ``` sh
75+ curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/mongodb-install.sh | bash
76+ wget -qO- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/mongodb-install.sh | bash
77+ ```
78+
6479## Redis 安装
6580
6681说明:
@@ -115,4 +130,16 @@ curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/
115130wget -qO- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/rocketmq-install.sh | bash
116131```
117132
118- 脚本会下载解压 kafka 到 ` /opt/kafka ` 路径下。
133+ ## ZooKeeper 安装
134+
135+ 说明:
136+
137+ 下载 zookeeper ` 3.4.12 ` 并解压安装到 ` /opt/zookeeper ` 路径下。
138+
139+ 使用方法:执行以下任意命令即可执行脚本。
140+
141+ ``` sh
142+ curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/zookeeper-install.sh | bash
143+ wget -qO- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/zookeeper-install.sh | bash
144+ ```
145+
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" " kafka" " rocketmq"
14+ select item in " git" " zsh" " jdk" " maven" " nodejs" " mongodb " " redis" " tomcat" " kafka" " rocketmq" " zookeeper "
1515do
1616path=$( cd " $( dirname " $0 " ) " ; pwd)
1717case ${item} in
@@ -20,10 +20,12 @@ case ${item} in
2020 " jdk" ) curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/jdk8-install.sh | bash ;;
2121 " maven" ) curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/maven-install.sh | bash ;;
2222 " nodejs" ) curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/nodejs-install.sh | bash ;;
23+ " mongodb" ) curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/mongodb-install.sh | bash ;;
2324 " redis" ) curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/redis-install.sh | bash ;;
2425 " tomcat" ) curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/tomcat8-install.sh | bash ;;
2526 " kafka" ) curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/kafka-install.sh | bash ;;
2627 " rocketmq" ) curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/rocketmq-install.sh | bash ;;
28+ " zookeeper" ) curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/zookeeper-install.sh | bash ;;
2729 * )
2830 echo -e " 输入项不支持!"
2931 main
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
3+ cat << EOF
4+
35###################################################################################
46# 安装 mongodb 脚本
5- # 适用于所有 linux 发行版本。
7+ # @system: 适用于所有 linux 发行版本。
68# @author: Zhang Peng
79###################################################################################
810
9- echo -e " \n>>>>>>>>> install mongodb"
11+ EOF
12+
13+ version=4.0.9
14+ if [[ -n $1 ]]; then
15+ version=$1
16+ fi
1017
11- # 下载并解压 mongodb
1218root=/opt/mongodb
13- version=3.6.3
19+ if [[ -n $2 ]]; then
20+ root=$2
21+ fi
22+
23+ echo -e " \n>>>>>>>>> download mongodb"
1424mkdir -p ${root}
1525wget -O ${root} /mongodb-linux-x86_64-${version} .tgz https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-${version} .tgz
16- cd ${root}
17- tar zxf mongodb-linux-x86_64-${version} .tgz
18- mv mongodb-linux-x86_64-${version} mongodb-${version}
1926
27+ echo -e " \n>>>>>>>>> install mongodb"
28+ tar zxf ${root} /mongodb-linux-x86_64-${version} .tgz -C ${root}
2029mkdir -p /data/db
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
4+
35###################################################################################
46# 安装 zookeeper 脚本
5- # 适用于所有 linux 发行版本。
7+ # @system: 适用于所有 linux 发行版本。
68# @author: Zhang Peng
79###################################################################################
810
9- echo -e " \n>>>>>>>>> install zookeeper "
11+ EOF
1012
11- root=/opt/zookeeper
1213version=3.4.12
14+ if [[ -n $1 ]]; then
15+ version=$1
16+ fi
17+
18+ root=/opt/zookeeper
19+ if [[ -n $2 ]]; then
20+ root=$2
21+ fi
22+
23+ echo -e " \n>>>>>>>>> download zookeeper"
1324mkdir -p ${root}
1425wget -O ${root} /zookeeper-${version} .tar.gz http://mirrors.hust.edu.cn/apache/zookeeper/zookeeper-${version} /zookeeper-${version} .tar.gz
15- cd ${root}
16- tar -zxf zookeeper- ${version} .tar.gz
17- cd zookeeper-${version}
26+
27+ echo -e " \n>>>>>>>>> install zookeeper"
28+ tar zxf ${root} / zookeeper-${version} .tar.gz -C ${root }
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments