#!/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 172.28.0.17 master-node 172.28.0.8 worker-1 172.28.0.21 worker-2 172.28.0.15 storage-1 EOF yum clean all && yum makecache uavroot 172.28.0.17