临时关闭selinux:
setenforce 0 //设置SELinux 成为permissive模式
彻底禁用selinux:
使用root用户,vim /etc/sysconfig/selinux,将SELINUX=enforcing修改成SELINUX=disabled。
重启后才能生效。
临时关闭防火墙:
service iptables stop
永久关闭防火墙:
chkconfig iptables off
本文介绍如何在Linux系统中临时及永久禁用SELinux和防火墙的方法。包括使用setenforce命令临时关闭SELinux,通过编辑配置文件彻底禁用SELinux;以及使用service命令临时关闭防火墙,通过chkconfig命令实现防火墙的永久关闭。
临时关闭selinux:
setenforce 0 //设置SELinux 成为permissive模式
彻底禁用selinux:
使用root用户,vim /etc/sysconfig/selinux,将SELINUX=enforcing修改成SELINUX=disabled。
重启后才能生效。
临时关闭防火墙:
service iptables stop
永久关闭防火墙:
chkconfig iptables off
1270
2055
1481

被折叠的 条评论
为什么被折叠?