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

     
     
     
  • 相关阅读:
    java架构之路-(面试篇)Mysql面试大全
    web工程的路径问题详解
    SQL知识点总结
    Mybatis简介
    mysql大全
    配置心得
    spring4.1.3+springmvc+mybatis3.2.1整合
    jstl标签
    jstl标签库
    Java并发控制机制
  • 原文地址:https://www.cnblogs.com/yongdaiblog-201409/p/6799190.html
Copyright © 2011-2022 走看看