


How to build a Hadoop development environment on Debian
This guide details how to build a Hadoop development environment on a Debian system.
1. Install Java Development Kit (JDK)
First, install OpenJDK:
sudo apt update sudo apt install openjdk-11-jdk -y
Configure the JAVA_HOME environment variable:
sudo nano /etc/environment
Add at the end of the file (adjust the path according to the actual JDK version):
<code>JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64"</code>
Save and exit, and then execute:
source /etc/environment
Verify installation:
java -version
2. Install Hadoop
Download Hadoop 3.3.6 (or other version):
wget https://www.apache.org/dyn/closer.cgi/hadoop/common/hadoop-3.3.6/hadoop-3.3.6-src.tar.gz
Verify download integrity:
wget https://downloads.apache.org/hadoop/common/hadoop-3.3.6/hadoop-3.3.6-src.tar.gz.sha512 sha256sum -c hadoop-3.3.6-src.tar.gz.sha512
Create a directory and unzip:
sudo mkdir /opt/hadoops sudo tar -xzvf hadoop-3.3.6-src.tar.gz -C /opt/hadoops --strip-components 1
3. Configure Hadoop environment variables
Edit /etc/profile
file and add:
export HADOOP_HOME="/opt/hadoops/hadoop-3.3.6" export PATH=$PATH:$HADOOP_HOME/bin:$HADOOP_HOME/sbin
Refresh environment variables:
source /etc/profile
4. Configure Hadoop core configuration file
Edit core-site.xml
:
sudo nano $HADOOP_HOME/etc/hadoop/core-site.xml
Add to:
<configuration> <property> <name>fs.defaultFS</name> <value>hdfs://localhost:9000</value> </property> </configuration>
Edit hdfs-site.xml
:
sudo nano $HADOOP_HOME/etc/hadoop/hdfs-site.xml
Add to:
<configuration> <property> <name>dfs.replication</name> <value>1</value> </property> <property> <name>dfs.namenode.name.dir</name> <value>/opt/hadoops/hdfs/namenode</value> </property> </configuration>
Edit mapred-site.xml
:
sudo nano $HADOOP_HOME/etc/hadoop/mapred-site.xml
Add to:
<configuration> <property> <name>mapreduce.framework.name</name> <value>yarn</value> </property> </configuration>
Edit yarn-site.xml
:
sudo nano $HADOOP_HOME/etc/hadoop/yarn-site.xml
Add to:
<configuration> <property> <name>yarn.nodemanager.aux-services</name> <value>mapreduce_shuffle</value> </property> </configuration>
5. Set SSH without password login
Generate SSH key:
sudo su - hadoop ssh-keygen -t rsa -P ""
Copy the public key:
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
Test connection:
ssh localhost
6. Format NameNode
hdfs namenode -format
7. Start Hadoop service
start-dfs.sh start-yarn.sh
8. Verify Hadoop installation
Check cluster status:
hdfs dfsadmin -report
Visit NameNode web interface: http://localhost:9870
After completing the above steps, the Hadoop development environment on your Debian system is completed. Please adjust the path and Hadoop version according to the actual situation.
The above is the detailed content of How to build a Hadoop development environment on Debian. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

VprocesserazrabotkiveB-enclosed, Мнепришлостольностьсясзадачейтерациигооглапидляпапакробоглесхетсigootrive. LEAVALLYSUMBALLANCEFRIABLANCEFAUMDOPTOMATIFICATION, ČtookazaLovnetakProsto, Kakaožidal.Posenesko

How does the Redis caching solution realize the requirements of product ranking list? During the development process, we often need to deal with the requirements of rankings, such as displaying a...

Summary Description: Distributed locking is a key tool for ensuring data consistency when developing high concurrency applications. This article will start from a practical case and introduce in detail how to use Composer to install and use the dino-ma/distributed-lock library to solve the distributed lock problem and ensure the security and efficiency of the system.

JDBC...

In SpringBoot, use Redis to cache OAuth2Authorization object. In SpringBoot application, use SpringSecurityOAuth2AuthorizationServer...

When developing PHP projects, we often encounter requirements such as frequent operation of databases, management of transactions, and dependency injection. If written manually, these operations are not only time-consuming and labor-intensive, but also prone to errors. Recently, I have encountered similar troubles in my projects, and handling these operations has become extremely complex and difficult to maintain. Fortunately, I found a Composer library called pxniu/study, which greatly simplified my development process. Composer can be learned through the following address: Learning address

Why is the return value empty when using RedisTemplate for batch query? When using RedisTemplate for batch query operations, you may encounter the returned results...

The optimization solution for SpringBoot timing tasks in a multi-node environment is developing Spring...
