官术网_书友最值得收藏!

Setting up host resolution

Before we start with the installations, it is important to make sure that the host resolution is configured and working properly.

Getting ready

Choose any appropriate hostnames the user wants for his or her Linux machines. For example, the hostnames could be master1.cluster.com or rt1.cyrus.com or host1.example.com. The important thing is that the hostnames must resolve.

This resolution can be done using a DNS server or by configuring the/etc/hosts file on each node we use for our cluster setup.

The following steps will show you how to set up the resolution in the/etc/hosts file.

How to do it...

  1. Connect to the Linux machine and change the hostname to master1.cyrus.com in the file as follows:
    How to do it...
  2. Edit the/etc/hosts file as follows:
    How to do it...
  3. Make sure the resolution returns an IP address:
    # getent hosts master1.cyrus.com
    
  4. The other preferred method is to set up the DNS resolution so that we do not have to populate the hosts file on each node. In the example resolution shown here, the user can see that the DNS server is configured to answer the domain cyrus.com:
    # nslookup master1.cyrus.com
    Server: 10.0.0.2
    Address: 10.0.0.2#53
    
    Non-authoritative answer:
    Name: master1.cyrus.com
    Address: 10.0.0.104
    

How it works...

Each Linux host has a resolver library that helps it resolve any hostname that is asked for. It contacts the DNS server, and if it is not found there, it contacts the hosts file. Users who are not Linux administrators can simply use the hosts files as a workaround to set up a Hadoop cluster. There are many resources available online that could help you to set up a DNS quickly if needed.

Once the resolution is in place, we will start with the installation of Hadoop on a single-node and then progress to multiple nodes.

主站蜘蛛池模板: 高州市| 涞水县| 体育| 哈尔滨市| 河津市| 铅山县| 渝北区| 嘉祥县| 轮台县| 泗阳县| 汝城县| 行唐县| 井冈山市| 衡阳县| 和政县| 长岭县| 洱源县| 榕江县| 穆棱市| 清水河县| 云南省| 肇源县| 任丘市| 北海市| 加查县| 乐山市| 来安县| 江都市| 富民县| 古蔺县| 杭锦旗| 万载县| 海南省| 石林| 闻喜县| 鄂伦春自治旗| 德惠市| 宜都市| 渝中区| 昌平区| 密云县|