1、禁用IPv6
sudo vim /etc/sysctl.conf
添加以下内容
#disable ipv6net.ipv6.conf.all.disable_ipv6=1net.ipv6.conf.default.disable_ipv6=1net.ipv6.conf.lo.disable_ipv6=1
执行
sudo sysctl -p
备注:vim /etc/sysctl.conf后执行sysctl -p 报错
error: "net.bridge.bridge-nf-call-ip6tables" is an unknown keyerror: "net.bridge.bridge-nf-call-iptables" is an unknown keyerror: "net.bridge.bridge-nf-call-arptables" is an unknown key
解决方法如下:
sudo modprobe bridgesudo lsmod|grep bridge
2、关闭防火墙
即时生效,重启后失效
sudo service iptables stop
重启后永久生效
sudo chkconfig iptables off
3、关闭SELinux
即时生效,重启后失效
sudo setenforce 0
重启后永久生效
sudo vim /etc/sysconfig/selinux #修改SELINUX=disabled