vim /etc/udev/rules.d/70-persistent-net.rules
三件事:
- 删掉一行
- 复制物理地址
- eth1改为eth0
vim /etc/sysconfig/network-scripts/ifcfg-eth0
两件事:
- 修改物理地址 HWADDR=
- 修改IP地址 IPADDR=
前提:
- ONBOOT=yes
- BOOTPROTO=static
文件里内容:
IPADDR=192.168.229.101
GATEWAY=192.168.229.2
DNS1=192.168.229.2
vim /etc/sysconfig/network
修改主机名
vim /etc/hosts
192.168.229.100 hadoop100
192.168.229.101 hadoop101
192.168.229.102 hadoop102