#!/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
20.47.129.116 master-node
20.47.129.117 worker-1
20.47.129.118 worker-2
20.47.129.119 worker-3
20.47.129.120 storage-1
EOF

yum clean all && yum makecache


root

20.47.129.116

LYGapp_2023!


