In this tutorial, we will be installing HDFS, which is a distributed file system that can store and process large amounts of data across multiple servers. HDFS is a component of the Apache Hadoop Big Data platform.
Before we begin the installation, make sure that you have the following prerequisites:
A terminal window
A user account with sudo privileges
A network connection
Java Development Kit (JDK) installed on your system. You can install the latest Oracle JDK using the following command:
sudo xbps-install -S oracle-jdk
Follow the below steps to install HDFS on Void Linux:
You can download the Hadoop distribution from the official Apache Hadoop website. We will be using the latest stable version, which is Hadoop 3.3.1.
wget https://mirrors.ocf.berkeley.edu/apache/hadoop/common/hadoop-3.3.1/hadoop-3.3.1.tar.gz
Once the download is completed, extract the tarball to /opt directory:
sudo tar -xzf hadoop-3.3.1.tar.gz -C /opt/
Add the following environment variables to your .bashrc or .bash_profile file:
export HADOOP_HOME=/opt/hadoop-3.3.1
export PATH=$PATH:$HADOOP_HOME/bin:$HADOOP_HOME/sbin
Configure the Hadoop environment by editing the core-site.xml file:
sudo vi $HADOOP_HOME/etc/hadoop/core-site.xml
Add the following configuration:
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://localhost:9000</value>
</property>
</configuration>
Format the HDFS filesystem by running the following command:
hdfs namenode -format
Start the HDFS by running the following command:
start-dfs.sh
You can verify the installation by running the jps command:
jps
The output should display the following processes:
2763 Jps
2736 NameNode
2850 ResourceManager
2787 DataNode
To stop the HDFS, run the following command:
stop-dfs.sh
And that's it! You have successfully installed HDFS on Void Linux.
In this tutorial, we have covered the steps to install HDFS on Void Linux. By following these steps, you can easily set up a distributed file system with HDFS and store and process large amounts of data.
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!