CentOS7 更改主机名方法

CentOS7 更改主机名方法

日期:2019年5月5日 下午2:29 分类:centos

要修改centos 的主机名为master, 有两处需要修改

/etc/sysconfig/network
$ sudo vim /etc/sysconfig/network
# 最终结果为
# Created by anaconda
NETWORKING=yes
HOSTNAME=master
/etc/hosts
将如下内容

$ sudo vim /etc/hosts

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
修改为

127.0.0.1 localhost master localhost4 localhost4.localdomain4
::1 localhost master localhost6 localhost6.localdomain6


为您推荐


版权声明:

fm0898.com小部分文章引用或者参考了网络上传播的部分开源开放代码,我站采用的这部分代码仅供用于学习和交流,请勿用于商业用途。如有侵权、不妥之处,请 联系我们并出示版权证明以便删除 !

文章讨论


  • higo.vn
    2020-01-13 14:42:01回复

    I have read so many articles or reviews on the topic of the blogger lovers but this paragraph is in fact a good post, keep it up.

  • Hotnews Populer
    2020-01-14 9:54:32回复

    My brother recommended I might like this website. He was entirely right. This post actually made mmy day. You can not imgine simply how much time I had spemt for this info! Thanks!

  • спортпит
    2020-01-14 20:13:12回复

    Hi! I'm at work browsing your blog from my new iphone 3gs! Just wanted to say I love reading your blog and look forward to all your posts! Keep up the excellent work!

  • situs website bandar bandar66 resmi
    2020-01-14 23:41:38回复

    Ꭺn intriguing discussion іs definitely worth commеnt. There'ѕ no doubt thаt that yߋu ѕhould publish more on this issue, it may not be a taboo subject Ьut usualⅼy folks don't talk aƄoᥙt these issues. To the next! Aⅼl thе bеst!!

  • van escort bayan
    23:16回复

    Hello, this content is very nice. We are van escort web site about new company. Thank for this content, i will share this content to my social network accounts. Van escort bayan is here for new members.