更新脚本
parent
cf0fe82090
commit
5ef7e1b11e
|
@ -6,7 +6,7 @@
|
|||
|
||||
安装 [oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh)
|
||||
|
||||
使用方法:
|
||||
使用方法
|
||||
|
||||
执行以下任意命令即可执行安装脚本。
|
||||
|
||||
|
@ -89,3 +89,30 @@ curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/
|
|||
wget -qO- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/tomcat8-install.sh | bash
|
||||
```
|
||||
|
||||
## Kafka 安装
|
||||
|
||||
说明:
|
||||
|
||||
下载 kafka `2.2.0` 并解压安装到 `/opt/kafka` 路径下。
|
||||
|
||||
使用方法:执行以下任意命令即可执行脚本。
|
||||
|
||||
```sh
|
||||
curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/kafka-install.sh | bash
|
||||
wget -qO- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/kafka-install.sh | bash
|
||||
```
|
||||
|
||||
## RocketMQ 安装
|
||||
|
||||
说明:
|
||||
|
||||
下载 rocketmq `4.5.0` 并解压安装到 `/opt/rocketmq` 路径下。
|
||||
|
||||
使用方法:执行以下任意命令即可执行脚本。
|
||||
|
||||
```sh
|
||||
curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/rocketmq-install.sh | bash
|
||||
wget -qO- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/rocketmq-install.sh | bash
|
||||
```
|
||||
|
||||
脚本会下载解压 kafka 到 `/opt/kafka` 路径下。
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
cat << EOF
|
||||
|
||||
###################################################################################
|
||||
# 安装 Kafka 脚本
|
||||
# @system: 适用于所有 linux 发行版本。
|
||||
# @author: Zhang Peng
|
||||
###################################################################################
|
||||
|
||||
EOF
|
||||
|
||||
version=2.2.0
|
||||
if [[ -n $1 ]]; then
|
||||
version=$1
|
||||
fi
|
||||
|
||||
root=/opt/kafka
|
||||
if [[ -n $2 ]]; then
|
||||
root=$2
|
||||
fi
|
||||
|
||||
echo -e "\n>>>>>>>>> download kafka"
|
||||
mkdir -p ${root}
|
||||
wget -O ${root}/kafka_2.12-${version}.tgz http://mirrors.tuna.tsinghua.edu.cn/apache/kafka/${version}/kafka_2.12-${version}.tgz
|
||||
|
||||
echo -e "\n>>>>>>>>> install kafka"
|
||||
tar zxf ${root}/kafka_2.12-${version}.tgz -C ${root}
|
|
@ -1,12 +0,0 @@
|
|||
# 脚本使用说明
|
||||
|
||||
## 安装 Kafka
|
||||
|
||||
使用方法:执行以下任意命令即可执行脚本。
|
||||
|
||||
```sh
|
||||
curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/kafka/install-kafka.sh | bash
|
||||
wget -qO- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/kafka/install-kafka.sh | bash
|
||||
```
|
||||
|
||||
脚本会下载解压 kafka 到 `/opt/kafka` 路径下。
|
|
@ -1,17 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
###################################################################################
|
||||
# 安装 kafka 脚本
|
||||
# 适用于所有 linux 发行版本。
|
||||
# @author: Zhang Peng
|
||||
###################################################################################
|
||||
|
||||
# 下载并解压 kafka
|
||||
echo -e "\n>>>>>>>>> install kafka"
|
||||
|
||||
root=/opt/kafka
|
||||
version=2.11-1.1.0
|
||||
mkdir -p ${root}
|
||||
wget -O ${root}/kafka_${version}.tgz http://mirrors.shu.edu.cn/apache/kafka/1.1.0/kafka_${version}.tgz
|
||||
cd ${root}
|
||||
tar -xzf kafka_${version}.tgz
|
|
@ -11,7 +11,7 @@ EOF
|
|||
|
||||
path=$(cd "$(dirname "$0")"; pwd)
|
||||
PS3="Please select script type: "
|
||||
select item in "git" "zsh" "jdk" "maven" "nodejs" "redis" "tomcat"
|
||||
select item in "git" "zsh" "jdk" "maven" "nodejs" "redis" "tomcat" "kafka" "rocketmq"
|
||||
do
|
||||
path=$(cd "$(dirname "$0")"; pwd)
|
||||
case ${item} in
|
||||
|
@ -22,6 +22,8 @@ case ${item} in
|
|||
"nodejs") curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/nodejs-install.sh | bash ;;
|
||||
"redis") curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/redis-install.sh | bash ;;
|
||||
"tomcat") curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/tomcat8-install.sh | bash ;;
|
||||
"kafka") curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/kafka-install.sh | bash ;;
|
||||
"rocketmq") curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/rocketmq-install.sh | bash ;;
|
||||
*)
|
||||
echo -e "输入项不支持!"
|
||||
main
|
||||
|
|
|
@ -14,7 +14,7 @@ version=3.6.3
|
|||
mkdir -p ${root}
|
||||
wget -O ${root}/mongodb-linux-x86_64-${version}.tgz https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-${version}.tgz
|
||||
cd ${root}
|
||||
tar zxvf mongodb-linux-x86_64-${version}.tgz
|
||||
tar zxf mongodb-linux-x86_64-${version}.tgz
|
||||
mv mongodb-linux-x86_64-${version} mongodb-${version}
|
||||
|
||||
mkdir -p /data/db
|
||||
|
|
|
@ -22,7 +22,7 @@ nginxVersion=1.12.2
|
|||
mkdir -p ${ngixnRoot}
|
||||
wget -O ${ngixnRoot}/nginx-${nginxVersion}.tar.gz http://nginx.org/download/nginx-${nginxVersion}.tar.gz
|
||||
cd ${ngixnRoot}
|
||||
tar zxvf nginx-${nginxVersion}.tar.gz
|
||||
tar zxf nginx-${nginxVersion}.tar.gz
|
||||
|
||||
# 编译
|
||||
cd nginx-${nginxVersion}
|
||||
|
|
|
@ -16,7 +16,7 @@ version=$2
|
|||
mkdir -p ${root}
|
||||
wget -O ${root}/pcre-${version}.tar.gz http://downloads.sourceforge.net/project/pcre/pcre/${version}/pcre-${version}.tar.gz
|
||||
cd ${root}
|
||||
tar zxvf pcre-${version}.tar.gz
|
||||
tar zxf pcre-${version}.tar.gz
|
||||
cd pcre-${version}
|
||||
|
||||
# 编译
|
||||
|
|
|
@ -28,7 +28,7 @@ mkdir -p ${root}
|
|||
wget -O ${root}/redis-${version}.tar.gz http://download.redis.io/releases/redis-${version}.tar.gz
|
||||
|
||||
echo -e "\n>>>>>>>>> install redis"
|
||||
tar zxvf ${root}/redis-${version}.tar.gz -C ${root}
|
||||
tar zxf ${root}/redis-${version}.tar.gz -C ${root}
|
||||
cd ${root}/redis-${version}
|
||||
make & make install
|
||||
cd -
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
cat << EOF
|
||||
|
||||
###################################################################################
|
||||
# 安装 rocketmq 脚本
|
||||
# @system: 适用于所有 linux 发行版本。
|
||||
# @author: Zhang Peng
|
||||
###################################################################################
|
||||
|
||||
EOF
|
||||
|
||||
version=4.5.0
|
||||
if [[ -n $1 ]]; then
|
||||
version=$1
|
||||
fi
|
||||
|
||||
root=/opt/rocketmq
|
||||
if [[ -n $2 ]]; then
|
||||
root=$2
|
||||
fi
|
||||
|
||||
echo -e "\n>>>>>>>>> download rocketmq"
|
||||
mkdir -p ${root}
|
||||
wget -O ${root}/rocketmq-all-${version}-bin-release.zip http://mirrors.tuna.tsinghua.edu.cn/apache/rocketmq/${version}/rocketmq-all-${version}-bin-release.zip
|
||||
|
||||
echo -e "\n>>>>>>>>> install rocketmq"
|
||||
unzip -o ${root}/rocketmq-all-${version}-bin-release.zip -d ${root}/rocketmq-all-${version}/
|
|
@ -1,9 +0,0 @@
|
|||
# 安装 RocketMQ
|
||||
|
||||
使用方法:
|
||||
|
||||
```sh
|
||||
curl -o- https://raw.githubusercontent.com/dunwu/os-tutorial/master/codes/linux/ops/soft/rocketmq/install-rocketmq.sh | bash
|
||||
```
|
||||
|
||||
脚本会下载解压 RocketMQ 到 `/opt/rocketmq` 路径下。
|
|
@ -1,17 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
###################################################################################
|
||||
# 安装 rocketmq 脚本
|
||||
# 适用于所有 linux 发行版本。
|
||||
# @author: Zhang Peng
|
||||
###################################################################################
|
||||
|
||||
# 下载并解压 rocketmq
|
||||
echo -e "\n>>>>>>>>> install rocketmq"
|
||||
|
||||
root=/opt/rocketmq
|
||||
version=4.2.0
|
||||
mkdir -p ${root}
|
||||
wget -O ${root}/rocketmq-all-${version}-bin-release.zip http://mirrors.hust.edu.cn/apache/rocketmq/${version}/rocketmq-all-${version}-bin-release.zip
|
||||
cd ${root}
|
||||
unzip -o rocketmq-all-${version}-bin-release.zip -d rocketmq-all-${version}/
|
|
@ -25,4 +25,4 @@ mkdir -p ${root}
|
|||
wget -O ${root}/apache-tomcat-${version}.tar.gz https://archive.apache.org/dist/tomcat/tomcat-8/v${version}/bin/apache-tomcat-${version}.tar.gz
|
||||
|
||||
echo -e "\n>>>>>>>>> install tomcat"
|
||||
tar zxvf ${root}/apache-tomcat-${version}.tar.gz -C ${root}
|
||||
tar zxf ${root}/apache-tomcat-${version}.tar.gz -C ${root}
|
||||
|
|
Loading…
Reference in New Issue