系统版本:CentOS Linux release 7.2.1511 (Core)
1、host文件
vim /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.8.210 weirdo20
192.168.8.211 weirdo21
192.168.8.212 weirdo22
192.168.8.213 weirdo23
service network restart
2、设置hostname
hostname=weirdo20
hostname=weirdo21
hostname=weirdo22
hostname=weirdo23