1、环境说明(安装时配置IP及主机名)
序号 | 主机IP | 主机名 | 系统 | 备注 |
1 | 192.168.3.114 | master | rockylinux8.6最小化安装 | 控制节点 |
2 | 192.168.3.115 | node1 | rockylinux8.6最小化安装 | 工作节点 |
3 | 192.168.3.116 | node2 | rockylinux8.6最小化安装 | 工作节点 |
2、关闭selinux,firewalld及swap分区(在三台设备上执行)
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
systemctl disable firewalld
swapoff -a
reboot
注:swapoff -a 为临时关闭swap分区。永久关闭swap分区,vi /etc/fstab 注释swap分区一行
3、修改/etc/hosts文件,增加如下三行(三台设备)
192.168.3.114 master
192.168.3.115 node1
192.168.3.116 node2
4、更改yum源为阿里云(三台设备执行)
sed -e 's|^mirrorlist=|#mirrorlist=|g' \
-e 's|^#baseurl=http://dl.rockylinux.org/$contentdir|baseurl=https://mirrors.aliyun.com/rockylinux|g' \
-i.bak \
/etc/yum.repos.d/Rocky-*.repo
dnf makecache
5、配置命令补全及vim工具(三台设备执行)
dnf install -y wget bash-completion vim