preface

A computer, a pack of cigarettes, a tutorial to learn along the way, debugging along the way are wrong, want to send the author on the sky.

Creating a VM

Create three Linux CentOS VMS: HadoOP001, HadoOP002, and hadoop003

Network adapter here I don’t use the bridge, using the NAT model, is used to share the host’s IP address, in plain English can only be my own virtual machine installation of the current machine to access my virtual machine, you can use the bridge pattern, can and colleagues show it at the same local area network (LAN), but over a period of time don’t open the virtual machine, IP is changed, ah, The Internet is not so good. Ha ha…

Differences between bridge mode and NAT mode:

  1. Bridge mode: The virtual machine has a separate IP address from the host machine, but it stays on the same network segment as the host machine. The end result is that the VIRTUAL machine is added to the local area network (LAN) of the host machine, which has the same effect as adding the host machine to the changed LAN.
  2. NAT mode: Look from the surface, a virtual machine without its own IP address, but the IP address of the Shared hosting, but technology is essentially based on Host – the only way (i.e., the virtual machine or have their own independent IP address, the value but not put into use in actual), from the extranet attentive, can only see a Host Host, no new virtual local area network.

To get back to business, we first create a virtual machine hadoOP001 ha, the other two can be cloned has all five organs hadoop001, because my own virtual machine image is a pure version, to put it plain is nothing except the core, a lot of commands are not used, the head big……

Network Settings in NAT mode

Just like installing Windows, the first thing you need to do is connect to the Internet. A computer without a network is just a brick. This is really a headache for the idiot of the network. It’s good to have Baidu. The setting steps are as follows:

Auxiliary website: blog.csdn.net/qq\_4259961…

www.jb51.net/article/104…

  1. Example Set the local VMnet8

  2. Configure the VIRTUAL machine editor –> Virtual Network Editor Note: Configure VMnet8 as in step 1.

  3. To start the CentOS7 vm, perform the following operations: notice if BOOTPROTO is set to static, DHCP automatically obtains IP addresses. You can manually set IP addresses. And ifcfg-ENS33 ens33 is dynamic, each virtual machine is not the same, we do not find their own operation when ifcfg-ENS33 will give up ah, into the directory is the first file you want to edit oh. (I guess)

    TYPE=Ethernet PROXY_METHOD=none BROWSER_ONLY=no BOOTPROTO=static DEFROUTE=yes IPV4_FAILURE_FATAL=no IPV6INIT=yes IPV6_AUTOCONF=yes IPV6_DEFROUTE=yes IPV6_FAILURE_FATAL=no IPV6_ADDR_GEN_MODE=stable-privacy NAME=ens33 UUID= EC679fDB-509B-4163-9D2E - DA7e7A109CF4 DEVICE=ens33 ONBOOT=yes IPADDR=192.168.2.131 NETMASK=255.255.255.0 GATEWAY = 192.168.2.2 DNS1 = 192.168.2.2Copy the code
  4. After editing the above file, you need to do the following once

    Networkctl stop NetworkManager systemctl disable NetworkManager systemctl restart network You can ping www.baidu.com to check whether the network is connected. If not, Disable the firewall systemctl status firewalld.service systemctl stop firewalld.service systemctl disable firewalld.service Also need to be security subsystem SElinux close vi/etc/SElinux/config will SElinux a set to disabled finally restart the network service is no accident Congratulations your virtual machine can be connected to the Internet systemctl restart networkCopy the code

Install various common commands

Now that you can connect to the Internet, everything will be easy. Let’s install some common commands first.

Install vim

yum -y install vim
Copy the code

Install the ifconfig

Yum install nettools.x86_64 yum install nettools.x86_64Copy the code

Install the rz/sz command

yum install -y lrzsz
Copy the code

At this point, what command is missing to install what command, here is not repeated, later in the cluster building process found missing commands we will supplement.

Once the virtual machines are set up, the next step is to install the various environments required for the cluster. Next time I’ll break it down.

conclusion

I want to learn Hadoop on a whim. In order to urge my summary habit, I publish a summary to the nuggets every week. I hope I can persevere and the road to success is full of thorns.