需要修改两处:一处是/etc/sysconfig/network,另一处是/etc/hosts
修改完两个档案后执行命令

hostname XX.COM
然后重启输入命令
uname -n

完成!