8
如何在CentOS 6.5上更改主机名?
我似乎无法更改CentOS 6.5主机上的主机名。我正在按照在这里找到的说明进行操作:http : //www.rackspace.com/knowledge_center/article/centos-hostname-change 我让我/etc/hosts喜欢... [root@mig-dev-006 ~]# cat /etc/hosts 127.0.0.1 localhost localhost.localdomain 192.168.32.128 ost-dev-00.domain.com ost-dev-00 192.168.32.129 ost-dev-01.domain.com ost-dev-01 ...然后我/etc/sysconfig/network像这样制作我的文件... [root@mig-dev-006 ~]# cat /etc/sysconfig/network NETWORKING=yes HOSTNAME=ost-dev-00.domain.com NTPSERVERARGS=iburst ...然后我hostname像这样奔跑... [root@mig-dev-006 ~]# hostname ost-dev-00.domain.com ...然后我运行bash,一切似乎都很好... [root@mig-dev-006 ~]# bash ...但是当我重新启动网络时,旧的主机名又回来了: [root@ost-dev-00 ~]# /etc/init.d/network restart Shutting down interface eth0: Device state: 3 (disconnected) [ OK …