标签:dbus 开始 running 自启 setting module ocs cal res
CentOS7.X下:[root@localhost sunan]# systemctl status firewalld.service
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Docs: man:firewalld(1)
其中Active为inactive (dead)为关闭状态,active (running)为开启状态
[root@localhost sunan]# systemctl stop firewalld.service
[root@localhost sunan]# systemctl start firewalld.service
[root@localhost sunan]# 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@localhost sunan]# 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.
[root@localhost ~]# service iptables status
[root@localhost ~]# service iptables stop
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Flushing firewall rules: [ OK ]
iptables: Unloading modules: [ OK ]
[root@localhost ~]# service iptables start
iptables: Applying firewall rules: [ OK ]
[root@localhost ~]# chkconfig iptables off
[root@localhost ~]# chkconfig iptables on
[root@localhost sunan]# getenforce
Enforcing
selinux状态有三种模式:
enforcing:强制模式,代表selinux运行中,且已经正确的开始限制domain/type了。
permissive:宽容模式,代表selinux运作中,不过仅会有警告信息并不会实际限制domain/type的访问。这种模式可以用来作为selinux的debug之用
disabled:关闭,selinux没有实际运行。
命令设置SELinux,前提不能是disabled状态:
[root@localhost ~]# setenforce 0
[root@localhost ~]# getenforce
Permissive
其中setenforce 0|1
0:设置为premissive状态;
1:设置为enforcing状态;
此设置:重启系统后无效。
修改配置文件,设置selinux为disabled状态:
[root@localhost ~]# vim /etc/selinux/config
SELINUX=disabled
SELINUXTYPE=targeted
保存,重启系统生效。
标签:dbus 开始 running 自启 setting module ocs cal res
原文地址:https://blog.51cto.com/13486869/2444116