Hadoop Getting Started
Here’s a step-by-step guide to help you get started with Hadoop:
Step 1: Prerequisites
Before you begin, ensure that you have the following prerequisites in place:
- A Linux-based system (such as Ubuntu or CentOS) or access to a virtual machine with Linux.
- Java Development Kit (JDK) installed (preferably Oracle JDK 8 or later).
- A user account with administrative privileges (for setting up Hadoop).
Step 2: Download and Install Hadoop
- Visit the Apache Hadoop official website: https://hadoop.apache.org.
- Navigate to the “Downloads” section and choose the latest stable release.
- Download the Hadoop distribution (e.g., “hadoop-x.y.z.tar.gz”).
- Extract the downloaded archive to a directory of your choice. You can use the following command:shell
tar -xzvf hadoop-x.y.z.tar.gz
Step 3: Configure Hadoop
Navigate to the Hadoop installation directory:
shellcd hadoop-x.y.z
Edit the Hadoop configuration files located in the
etc/hadoop
directory. Key configuration files include:core-site.xml
: Hadoop core configuration.hdfs-site.xml
: Hadoop Distributed File System (HDFS) configuration.yarn-site.xml
: YARN (Yet Another Resource Negotiator) configuration.
Set Hadoop environment variables by adding the following lines to your shell profile (e.g.,
.bashrc
or.zshrc
):shellexport HADOOP_HOME=/path/to/hadoop-x.y.z
export PATH=$PATH:$HADOOP_HOME/bin
Save the changes and reload your shell profile:
shellsource ~/.bashrc
Step 4: Start Hadoop
Format the HDFS filesystem (do this only once after installing Hadoop):
shellhdfs namenode -format
Start the HDFS service:
shellstart-dfs.sh
Start the YARN service (Resource Manager and Node Manager):
shellstart-yarn.sh
Step 5: Verify Hadoop Installation
- Open a web browser and visit the Hadoop web interfaces to verify that Hadoop is running:
- NameNode web interface: http://localhost:50070
- Resource Manager web interface: http://localhost:8088
Step 6: Run a Hadoop Example
To test your Hadoop installation, you can run a simple MapReduce example. Hadoop comes with several built-in examples.
Navigate to the Hadoop examples directory:
shellcd $HADOOP_HOME
cd share/hadoop/mapreduce
Run a MapReduce example, such as the word count example:
shellhadoop jar hadoop-mapreduce-examples-x.y.z.jar wordcount input output
Step 7: Explore Further
Now that you have Hadoop up and running, you can explore more advanced features, such as:
- Writing your MapReduce programs.
- Working with Hadoop’s distributed file system (HDFS).
- Configuring resource management and job scheduling with YARN.
- Integrating Hadoop with other big data tools like Hive, Pig, or Spark.
Hadoop Training Demo Day 1 Video:
Conclusion:
Unogeeks is the No.1 IT Training Institute for Hadoop Training. Anyone Disagree? Please drop in a comment
You can check out our other latest blogs on Hadoop Training here – Hadoop Blogs
Please check out our Best In Class Hadoop Training Details here – Hadoop Training
Follow & Connect with us:
———————————-
For Training inquiries:
Call/Whatsapp: +91 73960 33555
Mail us at: info@unogeeks.com
Our Website ➜ https://unogeeks.com
Follow us:
Instagram: https://www.instagram.com/unogeeks
Facebook:https://www.facebook.com/UnogeeksSoftwareTrainingInstitute
Twitter: https://twitter.com/unogeeks