Centos 7 permanently close the firewall and selinux

Turn off firewall

systemctl stop firewalld

Disable firewall self-start after boot

systemctl disable firewalld

Set to temporarily close selinux

setenforce 0

Set to permanently close selinux

vim /etc/sysconfig/selinux 

Modify the content of line 7 as follows,
Insert picture description here
you can also use the sed command to modify

sed -i '/^SELINUX/s/enforcing/disabled/' /etc/selinux/config

After modifications are complete using the rebootcommand to restart the server

Guess you like

Origin blog.csdn.net/m0_46674735/article/details/112982644