Deploy a Single-Node Hadoop Cluster on Linux in Under 10 Minutes
Deploy a Single-Node Hadoop Cluster on Linux fast and easy. Start processing Big Data in minutes with this quick setup.
Install Hadoop, configure HDFS and YARN, and run a MapReduce Job — all under 10 minutes.
This is a beginner-friendly guide to setting up Apache Hadoop on your Linux machine step-by-step.
Perfect for testing Hadoop on Ubuntu, Fedora, Debian, and more — without cluster complexity.

1. Installing Hadoop
How to Install Apache Hadoop on Linux
2. Set Environment Variables
Ensure Java and Hadoop paths are correctly set:
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export HADOOP_HOME=~/hadoop
export PATH=$PATH:$HADOOP_HOME/bin:$HADOOP_HOME/sbin
3. Start HDFS and YARN Services
To start Hadoop HDFS and YARN on Linux:
start-dfs.sh
start-yarn.sh
4. Verify Hadoop Daemons
Check all Hadoop services are running properly:
jps
You should see:
NameNode
DataNode
ResourceManager
NodeManager
5. Access Web UIs
Visit the Hadoop Web Interfaces:
- http://localhost:9870 – NameNode UI
- http://localhost:8088 – ResourceManager UI
6. Create Your HDFS User Directory
To create your own HDFS user folder:
hdfs dfs -mkdir -p /user/$(whoami)
7. Upload a File to HDFS
Create and upload a test file into Hadoop Distributed File System:
echo "Hello Hadoop" > sample.txt
hdfs dfs -put sample.txt /user/$(whoami)/
8. List Files in Your HDFS Folder
Check that the file was uploaded correctly:
hdfs dfs -ls /user/$(whoami)/
9. Run a Sample MapReduce Job
Execute the default WordCount example on the input file:
hadoop jar $HADOOP_HOME/share/hadoop/mapreduce/hadoop-mapreduce-examples-*.jar wordcount /user/$(whoami)/sample.txt /user/$(whoami)/output
10. View the Output Result
Print the output of the WordCount Job:
hdfs dfs -cat /user/$(whoami)/output/part-r-00000
11. Clean Output Folder (Optional)
To re-run jobs, delete the existing output folder:
hdfs dfs -rm -r /user/$(whoami)/output
12. Stop Hadoop Services
To cleanly shut down Hadoop:
stop-yarn.sh
stop-dfs.sh