|
Occurrence:
Since learning Hadoop, so I want to quickly build out a cluster. So directly on the Windows operating system with VMware installed CentOS operating system, configured hadoop good development environment, the use of cloning feature directly cloned two additional virtual machines.
But when I use the ifconfig command to modify the virtual machine to modify the ip address, tell me eth0 not found. Directly modify the configuration file / etc / sysconfig / network-scripts / ifcfg-eth0, restart the system after it is.
Check with ifconfig only to find no eth0, only eth2. So it should be to create a virtual time machine, re-create a card. When the system finds the card with the system configuration is not uniform when re-creating a new network interface.
Solution: eth0 configuration back
Modify /etc/udev/rules.d/70-persistent-net.rules file
The PCI device 0x1022: 0x2000 (vmxnet) with a # comment, the PCI device 0x1022: 0x2000 (vmxnet) modify the eth2 eth0, remember that MAC address ATTR {address} == "00: 0c: 29: ab: c5: 2c ", save the exit.
Modify the network card configuration file / etc / sysconfig / network-scripts / ifcfg-eth0
Modify ip address: IPADDR = 192.168.0.102 (because I use host-only link mode, it is a static ip), modify the MAC address HWADDR = 00: 0C: 29: AB: C5: 2c, quit saving.
Modify / etc / sysconfig / network file hostname HOSTNAME = hadoop2
Run: service network restart, a message will appear eth0 effect.
Bringing up interface eth0: Active connection state: activating
Active connection path: / org / freedesktop / NetworkManager / ActiveConnection / 1
state: activated
Connection activated
Best reboot restart it.
[Root @ hadoop2 ~] # ifconfig
eth0 Link encap: Ethernet HWaddr 00: 0C: 29: AB: C5: 2C
inet addr: 192.168.0.102 Bcast: 192.168.0.255 Mask: 255.255.255.0
inet6 addr: fe80 :: 20c: 29ff: feab: c52c / 64 Scope: Link
UP BROADCAST RUNNING MULTICAST MTU: 1500 Metric: 1
RX packets: 177 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 61 errors: 0 dropped: 0 overruns: 0 carrier: 0
collisions: 0 txqueuelen: 1000
RX bytes: 17634 (17.2 KiB) TX bytes: 7611 (7.4 KiB)
Interrupt: 19 Base address: 0x2024 |
|
|
|