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

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.

主站蜘蛛池模板: 肇庆市| 淮阳县| 汶川县| 峡江县| 正安县| 繁峙县| 红河县| 喀喇| 阜南县| 城固县| 新民市| 兴隆县| 正宁县| 蓬莱市| 建平县| 嘉鱼县| 句容市| 安陆市| 琼海市| 武夷山市| 广汉市| 西畴县| 嵩明县| 渝北区| 蕲春县| 崇礼县| 新民市| 宣威市| 永春县| 张家川| 资中县| 玉山县| 双城市| 卓资县| 清丰县| 内黄县| 望都县| 治多县| 衡阳县| 馆陶县| 武宣县|