
Apache Hadoop is an open-source software framework used to store, manage and process large datasets for various big data computing applications running under clustered systems. It is Java-based and uses Hadoop Distributed File System (HDFS) to store its data and process data using MapReduce. In this article, you will learn how ro install and configure Apache Hadoop on Ubuntu 20.04.
Install the latest version of Java.
Verify the installed version of Java.
Add a new user hadoop.
Add the hadoop user to the sudo group.
Switch to the created user.
Install the OpenSSH server and client.
When you get a prompt, respond with:
Switch to the created user.
Generate public and private key pairs.
Add the generated public key from id_rsa.pub to authorized_keys.
Change the permissions of the authorized_keys file.
Verify if the password-less SSH is functional.
Log in with hadoop user.
Download the latest stable version of Hadoop. To get the latest version, go to Apache Hadoop official download page.
Extract the downloaded file.
Move the extracted directory to the /usr/local/ directory.
Create directory to store system logs.
Change the ownership of the hadoop directory.
Edit file ~/.bashrc to configure the Hadoop environment variables.
Add the following lines to the file. Save and close the file.
Activate the environment variables.
Hadoop has a lot of components that enable it to perform its core functions. To configure these components such as YARN, HDFS, MapReduce, and Hadoop-related project settings, you need to define Java environment variables in hadoop-env.sh configuration file.
Find the Java path.
Find the OpenJDK directory.
Edit the hadoop-env.sh file.
Add the following lines to the file. Then, close and save the file.
Browse to the hadoop lib directory.
Download the Javax activation file.
Verify the Hadoop version.
Edit the core-site.xml configuration file to specify the URL for your NameNode.
Add the following lines. Save and close the file.
Create a directory for storing node metadata and change the ownership to hadoop.
Edit hdfs-site.xml configuration file to define the location for storing node metadata, fs-image file.
Add the following lines. Close and save the file.
Edit mapred-site.xml configuration file to define MapReduce values.
Add the following lines. Save and close the file.
Edit the yarn-site.xml configuration file and define YARN-related settings.
Add the following lines. Save and close the file.
Log in with hadoop user.
Validate the Hadoop configuration and format the HDFS NameNode.
Start the NameNode and DataNode.
Start the YARN resource and node managers.
Verify all the running components.
You can access the Hadoop NameNode on your browser via http://server-IP:9870. For example:
You have successfully installed Apache Hadoop on your server. You can now access the dashboard and configure your preferences.
For more information on Apache Hadoop, please see the official documentation.
0 Comments
Be the first to comment and share your perspective with the community.