hostname周りをwww.example.comに変更します。
CentOS6
vim /etc/sysconfig/network --- HOSTNAME=www.example.com ---
echo "www.example.com" > /etc/hostname
hostname -F /etc/hostname
vim /etc/hosts
---
{eth0のアドレス} www.example.com
---
CentOS7
hostnamectl set-hostname www.example.com
vim /etc/hostname ---- www.example.com ---
vim /etc/hosts
---
{eth0のアドレス} www.example.com
---
確認
以下コマンドで確認
hostname hostname -f


