31 lines
415 B
Bash
31 lines
415 B
Bash
#!/usr/bin/env bash
|
|
|
|
# 需要在所有的节点执行
|
|
|
|
hostnamectl set-hostname master-node
|
|
|
|
sed -i "/search/ a nameserver 223.5.5.5" /etc/resolv.conf
|
|
|
|
echo "AllowTcpForwarding yes" >> /etc/ssh/sshd_config
|
|
systemctl restart sshd
|
|
|
|
cat >> /etc/hosts << EOF
|
|
10.100.2.121 master-node
|
|
10.100.2.122 worker-1
|
|
10.100.2.116 storage-1
|
|
EOF
|
|
|
|
ping worker-1
|
|
|
|
yum clean all && yum makecache
|
|
|
|
|
|
root
|
|
|
|
10.100.2.121
|
|
|
|
SuperCyy.123
|
|
|
|
|
|
|