centos 关闭防火墙及hostname设置

来源:互联网 发布:人工智能主要研究方向 编辑:程序博客网 时间:2024/06/05 01:20

关闭防火墙

  1. /etc/init.d/iptables stop 临时
  2. chkconfig –level 35 iptables off 永久

  3. setenforce 0 临时

  4. 修改/etc/selinux/config,
    SELINUX=enforcing改为SELINUX=disabled

设置hostname

  1. hostname master临时设置
  2. 修改/etc/sysconfig/network文件,设置为HOSTNAME=master永久修改
  3. 修改本机dns——文件/etc/hosts ,增加记录
    192.168.31.10 master
0 0
原创粉丝点击