修改IP地址
vim /etc/sysconfig/network-scripts/ifcfg-eth0DEVICE=eth0BOOTPROTO=staticIPADDR=192.168.42.11NETMASK=255.255.255.0GATEWAY=192.168.42.1ONBOOT=yes
修改DNS 解析
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4::1 localhost localhost.localdomain localhost6 localhost6.localdomain6192.168.42.21 hadoop1
hosts生效
sudo /etc/init.d/networking restart