centos7永久更改主机名 查看主机名:hostname 第一种方式: hostnamectl set-hostname 主机名 第二种方式: vim /etc/hostname,将里面内容替换为自己的主机名