One of the basic series of Hadoop 0: Building Linux clusters under virtual machines

Source: Internet
Author: User

After nearly two years of Hadoop learning and use, it is necessary to make a summary of the study of Hadoop, the best way is to summarize the way to blog, both to re-comb the previous study can also communicate with peers, starting today will be launched the Hadoop 0 basic series of articles,

Of course, the summary process will refer to relevant information books, and some examples will be directly from the network and books, I will be listed in the article cited

Considering that beginners are in a single-machine environment to learn, so we use virtual machines to build a Linux cluster, this article we first set up the Linux cluster, the host system I adopt the system is Win7 flagship version

1. Virtual Machine software VMware

With the VMware version vmware-workstation-full-11.x.x, the specific installation process is omitted.

Before installing VMware, make sure that support virtualization is set up in the real host bios (very important)

2.centos6.5 Installation

The reason to choose CentOS6.5, is because of stability, now the enterprise with the most version of it, we use a streamlined mode installation, do not install the graphical interface

Hostname requires a different host name for each machine, we recommend that you use Node1,node2,.... As the host name.

3. Host and virtual Machine network configuration

Virtual machine (Linux) and host (Win7) directly with the NAT network connection mode, which is the default network connection by VMware, the advantage is that as long as the host can surf the Internet, the virtual machine can not be configured to network.

Beginners recommend this approach, but be sure

VMware NAT service startup (default boot)

VMware DHCP servie boot (default boot)

However, this is the way to build a cluster that needs to be set up in VMware.

VMware is set up in the following ways:

Subnet IP This setting is important, and this setting determines the network segment of your Linux cluster's IP address. In addition, the network IP is set to fixed IP, even if your computer restarts, the computer IP address replacement, will not affect the Linux cluster

Start the Linux virtual machine and log in as root user

Vi/etc/sysconfig/network-scripts/ifcfg-eth0

Device=eth0

Type=ethernet

Onboot=yes #Linux启动时就激活网卡

Nm_controlled=yes

Bootproto=static #采用静态IP地址设置, default is DHCP (auto get)

ipaddr=192.168.61.13 #IP地址, self-setting, the value of 3-255 can be

netmask=255.255.255.0 #子网掩码

gateway=192.168.61.2 #网关

(If you do not use the VI editor, please self-Baidu)

After editing, restart the network, using the following command:

Service Network restart

Next you set up DNS

Vi/etc/resolv.conf

NameServer 192.168.61.2

Note that many on the Internet when setting up DNS, let everyone set 8.8.8.8 and so on, in fact, it is not necessary, this is set as a virtual machine gateway IP

At this point, the Linux system can access the extranet, you can ping the Linux to see if the network connectivity

Ping www.baidu.com

3. Install additional virtual machines

After installing a virtual machine, you can install it in a cloned manner,

After cloning, you need to modify the clone generated virtual machine configuration, because the clone machine and the mother machine is the same, there is the same MAC address and IP address, this is not network.

You need to modify the configuration on the cloned machine

Vi/etc/sysconfig/network-scripts/ifcfg-eth0

Hwaddr= ...

Uuid= ...

And then:

Rm-rf/etc/udev/rules.d/70-persistent-net.rules

Let the computer automatically generate MAC addresses, and the resulting MAC address is unique worldwide.

The virtual machine needs to be restarted before it takes effect

Here a Linux cluster is initially established. Because when writing a blog, although as far as possible to check, but there is no guarantee that the middle of anything missing

If there is a problem during the installation process can leave a message. I will answer them all.

One of the basic series of Hadoop 0: Building Linux clusters under virtual machines

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.