需要修改兩處:一處是/etc/sysconfig/network,另一處是/etc/hosts
修改完兩個檔案後執行命令

hostname XX.COM
然後重啓輸入命令
uname -n

完成!