redhat更改主机名

来源:互联网 发布:报喜鸟 男装 知乎 编辑:程序博客网 时间:2024/06/06 12:53

REDHAT更改主机名需要修改以下两个文件:

/etc/hosts

/etc/sysconfig/network

需要注意的是主机名的格式应该以hostname.localdomain的方式设置,比如主机名为redhat,则在network文件中的主机名设置为redhat.localdomain

在hosts文件中的主机名设置为redhat.localdomain redhat  后面的redhat是主机别名,即在命令行中命令提示符前的主机名。

具体原因见博文:

http://www.slyar.com/blog/linux-sendmail-sm-client.html

原创粉丝点击