关闭 firewalld:
systemctl stop firewalld #临时关闭 systemctl disable firewalld #永久关闭,即设置开机的时候不自动启动
————————————–
关闭 selinux:
[root@localhost html]# getenforce #查看selinux状态 Permissive [root@localhost html]# setenforce 0 #临时关闭 [root@localhost html]# vim /etc/sysconfig/selinux #永久关闭
永久关闭selinux可以使用vi命令打开/etc/sysconfig/selinux 文件将SELINUX=(disable或permissive)
##重启服务
[root@localhost html]# shutdown -r now (或者reboot简单粗暴)。
##附
setenforce 1 设置SELinux 成为enforcing模式 setenforce 0 设置SELinux 成为permissive模式
总结
以上就是
为各位朋友分享的 相关内容。想要了解更多Linux相关知识记得关注公众号“良许Linux”,或扫描下方二维码进行关注,更多 等着你!