- Turn off firewall
# temporarily
systemctl stop firewalld
# permanently
systemctl disable firewalld
- Turn off selinux
# temporarily
sed -i 's/enforcing/disabled/' /etc/selinux/config
# permanently
setenforce 0
- Turn off swap
# temporarily
swapoff -a
# permanently
vim /etc/fstab
- Configure hostname
systemctl set-hostname [hostname]
- Synchronize time across cluster nodes
systemctl start chronyd
systemctl enable chronyd
oryum install ntpdate -y
ntpdate time.windows.com
-
Configure static IP
vi /etc/sysconfig/network-scripts/ifcfg-ens32
BOOTPROTO="static" IPADDR=192.168.8.20 PREFIX0=24 GATEWAY=192.168.8.2 DNS1=114.114.114.114 DNS2=8.8.8.8
-
Add information of hosts on the master node
cat >> /etc/hosts << EOF 192.168.8.20 master01 192.168.8.21 worker01 192.168.8.22 worker02