配置linux和freebsd的hostname 笔记

[linux]

1,vi /etc/sysconfig/network,修改HOSTNAME一行为"HOSTNAME=主机名"(没有这行?那就添加这一行吧)

2, 运行命令 " hostname 主机名"

3, 一般还要修改/etc/hosts文件中的主机名。

 

 

[freebsd]

1, 修改/etc/rc.conf 

找到hostname那一项作修改,比如:hostname="bbs_11" 

2, /etc/hosts中加入新的hostname和对应的ip 

10.217.17.11 bbs_11

3, hostname bbs_11

 

参考

http://www.linuxsir.org/bbs/archive/index.php/t-210468.html

猜你喜欢

转载自sofire.iteye.com/blog/1337650