Centos7修改主机名与Centos6不一样
# hostnamectl set-hostname ipa7.example.com
文件为 /etc/hostname cat /etc/hostname ipa7.example.com
# hostname
ipa7.example.com