37
37
38
38
#### 特别说明
39
39
40
- - ** 5 台 8C32G 服务器 CentOS 7.5,内存推荐 16G 或以上。**
40
+ - ** 4 台 8C32G 服务器 CentOS 7.5,内存推荐 16G 或以上。**
41
41
- ** 为了方便,所有服务器都已经关闭防火墙,并且在云服务上设置安全组对外开通所有端口**
42
42
- ** 全程 root 用户**
43
43
- 整体部署结构图:
@@ -55,7 +55,6 @@ hostnamectl --static set-hostname linux01
55
55
hostnamectl --static set-hostname linux02
56
56
hostnamectl --static set-hostname linux03
57
57
hostnamectl --static set-hostname linux04
58
- hostnamectl --static set-hostname linux05
59
58
```
60
59
61
60
- 给所有服务器设置 hosts:` vim /etc/hosts `
@@ -65,7 +64,6 @@ hostnamectl --static set-hostname linux05
65
64
172.16.0.92 linux02
66
65
172.16.0.133 linux03
67
66
172.16.0.159 linux04
68
- 172.16.0.184 linux05
69
67
```
70
68
71
69
- 在 linux01 生成密钥对,设置 SSH 免密登录
@@ -88,7 +86,6 @@ ssh-copy-id -i ~/.ssh/id_rsa.pub -p 22 root@linux03(根据提示输入 linux03
88
86
89
87
ssh-copy-id -i ~/.ssh/id_rsa.pub -p 22 root@linux04(根据提示输入 linux04 密码)
90
88
91
- ssh-copy-id -i ~/.ssh/id_rsa.pub -p 22 root@linux05(根据提示输入 linux05 密码)
92
89
93
90
在 linux01 上测试
94
91
ssh linux01
@@ -98,8 +95,6 @@ ssh linux02
98
95
ssh linux03
99
96
100
97
ssh linux04
101
-
102
- ssh linux05
103
98
```
104
99
105
100
- 安装基础软件:` yum install -y zip unzip lrzsz git epel-release wget htop deltarpm `
@@ -116,8 +111,6 @@ linux03
116
111
[kafka-host]
117
112
linux04
118
113
119
- [wh-host]
120
- linux05
121
114
```
122
115
123
116
- 测试 Ansible:` ansible all -a 'ps' ` ,必须保证能得到如下结果:
@@ -135,12 +128,6 @@ linux02 | CHANGED | rc=0 >>
135
128
10603 pts/1 00:00:00 python
136
129
10604 pts/1 00:00:00 ps
137
130
138
- linux05 | CHANGED | rc=0 >>
139
- PID TTY TIME CMD
140
- 10573 pts/0 00:00:00 sh
141
- 10586 pts/0 00:00:00 python
142
- 10587 pts/0 00:00:00 ps
143
-
144
131
linux03 | CHANGED | rc=0 >>
145
132
PID TTY TIME CMD
146
133
10586 pts/1 00:00:00 sh
@@ -242,8 +229,6 @@ scp -r /opt/jdk-8u191-linux-x64.tar.gz root@linux02:/opt
242
229
scp -r /opt/jdk-8u191-linux-x64.tar.gz root@linux03:/opt
243
230
244
231
scp -r /opt/jdk-8u191-linux-x64.tar.gz root@linux04:/opt
245
-
246
- scp -r /opt/jdk-8u191-linux-x64.tar.gz root@linux05:/opt
247
232
```
248
233
249
234
- 在 linux01 创建脚本文件:` vim /opt/jdk8-playbook.yml `
0 commit comments