linux IP的设置 修改DNS 解析 hosts生效
vim /etc/sysconfig/network-scripts/ifcfg-eth0DEVICE=eth0BOOTPROTO=staticIPADDR=192.168.42.11NETMASK=255.255.255.0GATEWAY=192.168.42.1ONBOO=yes
·
修改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
更多推荐
已为社区贡献1条内容
所有评论(0)