Updated: 18 November 2026 · Applies to: Apache Hadoop 3.5 (Java 17) on Ubuntu 24.04, Debian 12, AlmaLinux 9 and Rocky Linux 9

CentOS 7 is end of life. This guide sets up Apache Hadoop 3.5 as a single-node ("pseudo-distributed") cluster for learning and testing on Ubuntu 24.04, Debian 12, AlmaLinux 9 and Rocky Linux 9. Hadoop 3.5 needs Java 17 on the server side.

1. Install Java and create a user

apt install openjdk-17-jdk-headless ssh pdsh      # AlmaLinux/Rocky: dnf install java-17-openjdk-headless openssh-server
adduser hadoop && su - hadoop
ssh-keygen -t ed25519 -N "" -f ~/.ssh/id_ed25519
cat ~/.ssh/id_ed25519.pub >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys
ssh localhost exit          # must work without a password

2. Download Hadoop

wget https://dlcdn.apache.org/hadoop/common/hadoop-3.5.0/hadoop-3.5.0.tar.gz
tar xzf hadoop-3.5.0.tar.gz && mv hadoop-3.5.0 ~/hadoop
echo 'export HADOOP_HOME=$HOME/hadoop; export PATH=$PATH:$HADOOP_HOME/bin:$HADOOP_HOME/sbin; export PDSH_RCMD_TYPE=ssh' >> ~/.bashrc && source ~/.bashrc

Set JAVA_HOME in ~/hadoop/etc/hadoop/hadoop-env.sh (find it with dirname $(dirname $(readlink -f $(which java)))).

3. Configure

etc/hadoop/core-site.xml:

<configuration>
  <property><name>fs.defaultFS</name><value>hdfs://localhost:9000</value></property>
</configuration>

etc/hadoop/hdfs-site.xml:

<configuration>
  <property><name>dfs.replication</name><value>1</value></property>
</configuration>

4. Start HDFS and YARN

hdfs namenode -format
start-dfs.sh
start-yarn.sh
jps                          # NameNode, DataNode, SecondaryNameNode, ResourceManager, NodeManager

The NameNode web interface is at port 9870 and YARN at port 8088; reach them through an SSH tunnel rather than opening the ports. Test with hdfs dfs -mkdir -p /user/hadoop && hdfs dfs -ls /.

Related services

KVM VPS hosting

NVMe SSD and full root access, with Free Basic Managed Support.

Unmanaged dedicated servers

full root access and free IPMI KVM, with Free Basic Managed Support.

Managed dedicated servers

our engineers look after the server for you, from $135 a month.

Was this answer helpful?

Still stuck? Open a ticket