vi /etc/selinux/config
将SELINUX=enforcing改为SELINUX=disabled
centos 6
service iptable status
servcie iptables stop --临时关闭防火墙
chkconfig iptables off --永久关闭防火墙
centos 7
CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙步骤。
启动一个服务:
systemctl start firewalld.service
关闭一个服务:
systemctl stop firewalld.service
重启一个服务:
systemctl restart firewalld.service
显示一个服务的状态:
systemctl status firewalld.service
在开机时启用一个服务:
systemctl enable firewalld.service
在开机时禁用一个服务:
systemctl disable firewalld.service
来源:CSDN
作者:VIP099
链接:https://blog.csdn.net/VIP099/article/details/104358525