Skip to content

Commit b6d2f20

Browse files
committed
🔖 Kafka
1 parent 298fe6d commit b6d2f20

3 files changed

Lines changed: 30 additions & 0 deletions

File tree

codes/deploy/main.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ cat << EOF
5555
[tomcat] install tomcat8 [nginx] install nginx
5656
[nodejs] install node.js [elk] install elk
5757
[redis] install redis [mongodb] install mongodb
58+
[kafka] install kafka
5859
5960
【3 - Recommended Tools】
6061
[sdk] install sdkman
@@ -87,6 +88,7 @@ function chooseOper() {
8788
elk ) ${filepath}/tool/elk/install-elk.sh;;
8889
redis ) ${filepath}/tool/redis/install-redis.sh;;
8990
mongodb ) ${filepath}/tool/mongodb/install-mongodb.sh;;
91+
kafka ) ${filepath}/tool/kafka/install-kafka.sh;;
9092

9193
# 3 - Recommended Tools
9294
sdk ) ${filepath}/tool/sdk/install-sdk.sh;;

codes/deploy/tool/kafka/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# 安装 Kafka
2+
3+
使用方法:
4+
5+
```sh
6+
wget --no-check-certificate --no-cookies https://raw.githubusercontent.com/dunwu/linux/master/codes/deploy/tool/kafka/install-kafka.sh
7+
chmod -R 777 install-kafka.sh
8+
./install-kafka.sh
9+
```
10+
11+
脚本会下载解压 kafka 到 `/opt/software/kafka` 路径下。
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env bash
2+
3+
###################################################################################
4+
# 安装 kafka 脚本
5+
# 适用于所有 linux 发行版本。
6+
# Author: Zhang Peng
7+
###################################################################################
8+
9+
# 下载并解压 kafka
10+
echo -e "\n>>>>>>>>> install kafka"
11+
12+
root=/opt/software/kafka
13+
version=2.11-1.1.0
14+
mkdir -p ${root}
15+
wget -O ${root}/kafka_${version}.tgz http://mirrors.shu.edu.cn/apache/kafka/1.1.0/kafka_${version}.tgz
16+
cd ${root}
17+
tar -xzf kafka_${version}.tgz

0 commit comments

Comments
 (0)