修改IP地址

vim /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
IPADDR=192.168.42.11
NETMASK=255.255.255.0
GATEWAY=192.168.42.1
ONBOOT=yes
修改DNS 解析

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.42.21   hadoop1
hosts生效

sudo /etc/init.d/networking restart
Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐