关闭防火墙和selinux
防火墙
Centos6.5
临时:service iptables stop
开机自启关闭:chkconfig iptables off
Centos7.5
systemctl status firewalld(查看:信息中enabled表示自启,disabled表示不自启)
systemctl stop firewalld(临时关闭)
systemctl disable firewalld(永久关闭,再次开机不自启)
systemctl enable firewalld(开机自启)
systemctl list-unit-files|grep firewalld(查看防火墙状态)
selinux
getenforce(查看状态,显示为Enforcing时表示启动)
setenforce 0(临时变为警告模式Permissive)
想要永久修改需要修改配置文件:/etc/selinux/config
将SELINUX=enforcing 改为SELINUX=disabled,之后重启机器即可