


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

AI Hentai Generator
Generate AI Hentai for free.

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



Running the H5 project requires the following steps: installing necessary tools such as web server, Node.js, development tools, etc. Build a development environment, create project folders, initialize projects, and write code. Start the development server and run the command using the command line. Preview the project in your browser and enter the development server URL. Publish projects, optimize code, deploy projects, and set up web server configuration.

In-depth discussion of the root causes of the difference in console.log output. This article will analyze the differences in the output results of console.log function in a piece of code and explain the reasons behind it. �...

The Y-axis position adaptive algorithm for web annotation function This article will explore how to implement annotation functions similar to Word documents, especially how to deal with the interval between annotations...

How to achieve the effect of small labels in the design draft on the mobile terminal? When designing mobile applications, it is common to find out how to accurately restore the small label effect in the design draft...

When adding shadows to text gradients, the solution to the grandfather background blocks pseudo-elements. When adding shadows to text gradients, pseudo-elements and absolute positioning are usually used to...

There are two ways to export XML to PDF: using XSLT and using XML data binding libraries. XSLT: Create an XSLT stylesheet, specify the PDF format to convert XML data using the XSLT processor. XML Data binding library: Import XML Data binding library Create PDF Document object loading XML data export PDF files. Which method is better for PDF files depends on the requirements. XSLT provides flexibility, while the data binding library is simple to implement; for simple conversions, the data binding library is better, and for complex conversions, XSLT is more suitable.

In-depth discussion of the differences in console.log output in this article will analyze the reasons why the output results of console.log function in a piece of code are different. Code snippets involve URL parameter resolution...

Resource management in Go programming: Mysql and Redis connect and release in learning how to correctly manage resources, especially with databases and caches...
