zoukankan      html  css  js  c++  java
  • How to modify the host name in Redhat?

     

    1.Modify the configuration file

    #vim /etc/sysconfig/network

    ---------------------------------
    HOSTNAME=host6
    ---------------------------------
    then you need to restart your network
     
    #service network restart
     
    In order to connect ip address with the hostname,we need to add a record into /etc/hosts
    #vim   /etc/hosts 
    add a record on the first line :  192.168.8.206  host6
    Note:don't modify other setting
     
    ---------------------------------------------------------------------------------------------------------
    192.168.8.206  host6

    127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4

    ::1   localhost localhost.localdomain localhost6 localhost6.localdomain6

    ---------------------------------------------------------------------------------------------------------

     

    2.Otherwise,turn off the firewall

    #service iptables stop-----------stop firewall

    #service iptables status--------check

    #chkconfig iptables off       ----------disable the firewall to boot when startup

    #chkconfig --list | grep iptables--------check

    3.Restart your os ,check it's hostname

     
     
     
  • 相关阅读:
    函数是什么?
    设置mac笔记本为固定ip
    JMeter-充值-生成随机数
    JMeter_方案上架,遇到的问题及解决
    做有态度的测试做
    JMeter-标的上架调整与完成
    上标-担保机构
    JMeter已传值但是提示为空
    JMeter上架标的(yyb-csg)
    JMeter中的正则表达式的匹配
  • 原文地址:https://www.cnblogs.com/yongdaiblog-201409/p/6799190.html
Copyright © 2011-2022 走看看