Big Data 4 min read

Step-by-Step Hadoop Environment Setup and Configuration on Three Linux Servers

This guide walks through preparing three Linux servers, installing JDK 1.8, configuring Hadoop core, HDFS, MapReduce, and YARN XML files, setting Java environment variables, formatting HDFS, and starting all services to access the Hadoop web UI.

Practical DevOps Architecture
Practical DevOps Architecture
Practical DevOps Architecture
Step-by-Step Hadoop Environment Setup and Configuration on Three Linux Servers

First, edit the /etc/hosts file on each server to map the IP addresses 192.168.21.234, 192.168.21.235, and 192.168.21.236 to hostnames hd01, hd02, and hd03 respectively, and configure password‑less SSH between the three machines.

Install JDK 1.8 on hd01, hd02 and hd03.

On each node, modify Hadoop directories and permissions:

[root@hd01 hadoop]# cd /usr/local/hadoop/
[root@hd01 hadoop]# mkdir tmp
[root@hd01 hadoop]# chown -R 1000:1000 tmp/
[root@hd01 hadoop]# cd /usr/local/hadoop/etc/hadoop

Configure core-site.xml (replace the placeholder with your namenode address):

<configuration>
  <property>
    <name>fs.defaultFS</name>
    <value>hdfs://192.168.21.234:9000</value>
  </property>
  <property>
    <name>hadoop.tmp.dir</name>
    <value>/usr/local/hadoop/tmp</value>
  </property>
</configuration>

Configure hdfs-site.xml to set replication factor and disable permission checks:

<configuration>
  <property>
    <name>dfs.replication</name>
    <value>1</value>
  </property>
  <property>
    <name>dfs.permissions</name>
    <value>false</value>
  </property>
</configuration>

Configure mapred-site.xml to use YARN as the MapReduce framework:

<configuration>
  <property>
    <name>mapreduce.framework.name</name>
    <value>yarn</value>
  </property>
</configuration>

Configure yarn-site.xml with the resource manager hostname and auxiliary services:

<configuration>
  <property>
    <name>yarn.resourcemanager.hostname</name>
    <value>hd01</value>
  </property>
  <property>
    <name>yarn.nodemanager.aux-services</name>
    <value>mapreduce_shuffle</value>
  </property>
</configuration>

Set the Java home in hadoop-env.sh: export JAVA_HOME=/usr/Java Format the HDFS namenode and start all Hadoop daemons:

[root@hd01 hadoop]# hdfs namenode -format
[root@hd01 hadoop]# start-all.sh

After the services start, open the Hadoop NameNode web UI at http://192.168.21.234:50070/dfshealth.html#tab-overview to verify the cluster status.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Big DataConfigurationLinuxYARNHDFSHadoop
Practical DevOps Architecture
Written by

Practical DevOps Architecture

Hands‑on DevOps operations using Docker, K8s, Jenkins, and Ansible—empowering ops professionals to grow together through sharing, discussion, knowledge consolidation, and continuous improvement.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.