1、hostname 主机名(必须不同!Rancher Server和各Node主机名都不能重复)
2、hosts文件 (必须配置!把Server和各Node的IP和主机名都配置到文件中)
3、IP/DNS参数设置(IP不能冲突,能正常解析域名)
4、检查防火墙 (关闭!实验环境下关闭,生产环境下需配防火墙,Centos默认开启)
systemctl status firewalld查看当前防火墙状态。 systemctl stop firewalld关闭当前防火墙。 systemctl disable firewalld开机防火墙不启动。
5、检查SELinux (关闭!Centos默认开启)
5.1、关闭iptables
#service iptables stop
5.2、关闭SELinux
#vi /etc/selinux/config
将文件中的SELINUX="" 为 disabled ,然后重启。
如果不想重启系统,使用命令setenforce 0注:setenforce 1 设置SELinux 成为enforcing模式
setenforce 0 设置SELinux 成为permissive模式
在lilo或者grub的启动参数中增加:selinux=0,也可以关闭selinux
6、IPV4转发 (必须开启!Centos默认关闭)
echo "1" > /proc/sys/net/ipv4/ip_forward
ip_forward 配置文件当前内容为 0,表示禁止数据包转发,将其修改为 1 表 示允许
7、Swap交换分区 (关闭!Ubuntu默认未配置)
临时禁用:swapoff -a
永久禁用:sed -i.bak '/swap/s/^/#/' /etc/fstab ##注释掉 swap 那一行 作用就是修改/etc/fstab 配置

