#!/usr/bin/env bash

# 需要在所有的节点执行

hostnamectl set-hostname service-

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
134.80.124.6 master-1
134.80.124.7 master-2
134.80.124.8 master-3
134.80.124.9 worker-1
134.80.124.10 worker-2
134.80.124.11 worker-3
134.80.124.12 worker-4
134.80.124.13 worker-5
134.80.124.14 worker-6
134.80.124.15 service-1
134.80.124.16 service-2
134.80.124.17 service-3
134.80.124.18 service-4
134.80.124.19 database-1
134.80.124.20 database-2
134.80.124.21 nfs-1
134.80.124.22 nfs-2
EOF



ping worker-1

yum clean all && yum makecache

Pa_r8m#Ij0Io(b





