HDFS is a distributed file system designed for storing and processing large datasets across clusters of computers. In this tutorial, we will guide you on how to install HDFS on a Fedora Server Latest.
Before installing HDFS, you need to install the Java Development Kit (JDK), which is required to run Hadoop. You can follow the below steps to install JDK on your Fedora server.
sudo dnf update -y
sudo dnf install java-11-openjdk-devel
java -version
If the installation is successful, it will display the version of the JDK installed on your system.
After installing JDK, you can proceed with downloading and installing HDFS.
wget https://www.apache.org/dyn/mirrors/mirrors.cgi?action=download&filename=hadoop/common/hadoop-X.X.X/hadoop-X.X.X.tar.gz
Note: Replace X.X.X with the latest version number of Hadoop.
tar -xvzf hadoop-X.X.X.tar.gz
/usr/local
directory.sudo mv hadoop-X.X.X /usr/local/hadoop
/etc/profile
file.sudo nano /etc/profile
Add the following lines to the end of the file.
#HADOOP VARIABLES START
export HADOOP_HOME=/usr/local/hadoop
export HADOOP_MAPRED_HOME=${HADOOP_HOME}
export HADOOP_COMMON_HOME=${HADOOP_HOME}
export HADOOP_HDFS_HOME=${HADOOP_HOME}
export YARN_HOME=${HADOOP_HOME}
export HADOOP_COMMON_LIB_NATIVE_DIR=${HADOOP_HOME}/lib/native
export PATH=${PATH}:${HADOOP_HOME}/sbin:${HADOOP_HOME}/bin
#HADOOP VARIABLES END
Save and close the file.
Load the environment variables using the following command.
source /etc/profile
After installing Hadoop, you need to configure HDFS by editing the configuration files.
hadoop-env.sh
file in the Hadoop configuration directory.sudo nano /usr/local/hadoop/etc/hadoop/hadoop-env.sh
export JAVA_HOME=/usr
Save and close the file.
Open the core-site.xml
file in the Hadoop configuration directory.
sudo nano /usr/local/hadoop/etc/hadoop/core-site.xml
configuration
tags.<configuration>
<property>
<name>fs.default.name</name>
<value>hdfs://localhost:9000</value>
</property>
</configuration>
Save and close the file.
Open the hdfs-site.xml
file in the Hadoop configuration directory.
sudo nano /usr/local/hadoop/etc/hadoop/hdfs-site.xml
configuration
tags.<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.name.dir</name>
<value>file:///usr/local/hadoop/hdfs/namenode</value>
</property>
<property>
<name>dfs.data.dir</name>
<value>file:///usr/local/hadoop/hdfs/datanode</value>
</property>
</configuration>
Before starting the HDFS, you need to format the HDFS file system. You can use the following command to format the HDFS file system.
hdfs namenode -format
After configuring and formatting HDFS, you can start the HDFS file system.
start-dfs.sh
http://localhost:50070
.In this tutorial, we have shown you how to install and configure HDFS on a Fedora Server Latest. You can now use HDFS to store and process large datasets across clusters of computers.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!