在虚拟机里面开启多个服务,对应多个端口,在防火墙开启的情况下,就要对外开放端口,这样客户端才能正常访问,但比较繁琐,关闭更直接点。

防火墙

  • 临时关闭防火墙

           systemctl stop firewalld

  • 永久防火墙开机自关闭

           systemctl disable firewalld

  • 临时打开防火墙

           systemctl start firewalld

  • 防火墙开机启动

           systemctl enable firewalld

  • 查看防火墙状态

          systemctl status firewalld

SELinux

  • 临时关闭SELinux 

     setenforce 0

  • 临时打开SELinux 

      setenforce 1

  • 查看SELinux状态 

       getenforce

  • 开机关闭SELinux 
    编辑/etc/selinux/config文件,将SELINUX的值设置为disabled

 

相关文章:

  • 2022-12-23
  • 2022-01-22
  • 2021-07-02
  • 2022-12-23
  • 2021-07-19
  • 2022-02-21
  • 2021-06-13
  • 2021-12-07
猜你喜欢
  • 2021-11-23
  • 2021-11-23
  • 2021-11-09
  • 2022-02-13
相关资源
相似解决方案