参考
https://www.cnblogs.com/kevingrace/p/6249028.htmlhttp://blog.csdn.net/kkdelta/article/details/39780611 (*)
修改ip
[root@ha1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0HWADDR=5E:49:72:C7:52:58
TYPE=Ethernet
UUID=58d9edc7-569d-4e61-a364-53221ff81a4b
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=static
IPADDR=192.168.30.73
NETMASK=255.255.255.0
GATEWAY=192.168.30.1
DNS1=114.114.114.114
[root@ha1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1HWADDR=C6:FB:0E:02:6C:4C
TYPE=Ethernet
UUID=53c01f3b-bf6b-41d9-a22d-730ed56464f0
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=static
IPADDR=192.168.40.73
NETMASK=255.255.255.0
/etc/init.d/network restart 或 ifdown ifup
修改主机名
查看:uname -n 或 hostname
[root@ha1 ~]# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=ha1
[root@ha1 ~]# cat /etc/hosts
192.168.30.73 ha1
192.168.30.74 ha2
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
restart -f