selinux
利用selinux程序对root用户权限进行约束 如何关闭selinux程序 永久关闭: 修改配置文件 第一个历程: 修改配置文件 vim /etc/selinux/config ####底行输入:set nu 7 SELINUX=disabled enforcing - SELinux security policy is enforced. --selinux安全策略处于开启状态 permissive - SELinux prints warnings instead of enforcing. --selinux处于临时关闭状态 会有警告提示 disabled - No SELinux policy is loaded. --selinux安全策略彻底关闭 第二个历程: 配置文件生效方法 永久关闭: 重启服务器 临时关闭: [root@oldboy-xiaodao.com.cn ~]# setenforce usage: setenforce [ Enforcing | Permissive | 1 | 0 ] [root@oldboy-xiaodao.com.cn ~]# setenforce 0 设置 [root@oldboy-xiaodao.com.cn ~]# getenforce 检查 Permissive
firewalld(centos7)
临时关闭: systemctl stop firewalld.service 检查 systemctl status firewalld.service systemctl is-active firewalld.service 永久关闭: systemctl disable firewalld.service [root@oldboy-xiaodao.com.cn ~]# systemctl disable firewalld.service Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service. Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service. [root@oldboy-xiaodao.com.cn ~]# systemctl enable firewalld.service Created symlink from /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service to /usr/lib/systemd/system/firewalld.service. Created symlink from /etc/systemd/system/multi-user.target.wants/firewalld.service to /usr/lib/systemd/system/firewalld.service. 检查 systemctl status firewalld.service systemctl is-enabled firewalld.service
iptables(centos6)
临时关闭 /etc/init.d/iptables stop 检查 /etc/init.d/iptables status 永久关闭 chkconfig iptables off 检查 chkconfig --list|grep ipt
服务器防火墙运行状态建议