具有dns解析的主机名
# vim /etc/sysconfig/network
...
HOSTNAME=webserver.mydomain.com
...
# hostname webserver.mydomain.com
# logout
没有dns解析的主机名
# 主机名按idcID-cabinetID-3rdIP-4thIP命名, 如bjyh-a1-48-81
# vim /etc/sysconfig/network
...
HOSTNAME=bjyh-a1-48-81
...
# vim /etc/hosts
...
192.168.48.81 bjyh-a1-48-81
...
# hostname bjyh-a1-48-81
# logout