老版本 /etc/hosts /etc/sysconfig/network hostname [new hostname] CentOS7 # hostnamectl set-hostname [new hostname] 修改完需要重启服务 # syst……