Hadoop pseudo-distributed cluster construction
May 07, 2025 pm 04:45 PMSoftware preparation
I'm using a virtual machine with CentOS-6.6, with the host name repo. Refer to the steps to install a Linux virtual machine in Windows, I installed JDK in that virtual machine, refer to the guide to installing JDK in Linux. In addition, the virtual machine is configured with a key-free login itself, and the settings for configuring key-free login between each virtual machine are referenced. The download address of the Hadoop installation package is: http://ipnx.cn/link/8485694bae96aebc7c4fe6119599d0e0 .
-
Upload the Hadoop installation package to the server and decompress it
[root@repo ~]# tar zxvf hadoop-2.6.5.tar.gz -C /opt/apps/
-
Configure environment variables
# You can directly locate the last line of the file [root@repo hadoop-2.6.5]# vi /etc/profile export HADOOP_HOME=/opt/apps/hadoop-2.6.5 export PATH=$PATH:$HADOOP_HOME/bin:$HADOOP_HOME/sbin [root@repo hadoop-2.6.5]# . /etc/profile
-
Modify the three configuration files of hadoop-env.sh, mapred-env.sh, and yarn-env.sh, and add JAVA_HOME
[root@repo hadoop]# pwd /opt/apps/hadoop-2.6.5/etc/hadoop [root@repo hadoop]# vi hadoop-env.sh export JAVA_HOME=/usr/local/jdk1.8.0_73 [root@repo hadoop]# vi mapred-env.sh export JAVA_HOME=/usr/local/jdk1.8.0_73 [root@repo hadoop]# vi yarn-env.sh export JAVA_HOME=/usr/local/jdk1.8.0_73
-
Modify the core-site.xml and hdfs-site.xml configuration files to configure pseudo-distributed related content
[root@repo hadoop]# vi core-site.xml <configuration> <property> <name>fs.defaultFS</name> <value>hdfs://repo:9000</value> </property> <property> <name>hadoop.tmp.dir</name> <value>/var/hadoop/pseudo</value> </property> </configuration> [root@repo hadoop]# vi hdfs-site.xml <configuration> <property> <name>dfs.replication</name> <value>1</value> </property> <property> <name>dfs.namenode.secondary.http-address</name> <value>repo:50090</value> </property> </configuration>
-
Modify the slaves configuration file and specify the node where the DataNode is located
[root@repo hadoop]# vi slaves repo
-
Format file system
[root@repo hadoop]# hadoop namenode --format # Success message17/09/16 21:17:11 INFO common.Storage: Storage directory /var/hadoop/pseudo/dfs/name has been successfully formatted.
-
Start HDFS and YARN
[root@repo hadoop]# start-dfs.sh Starting namesnodes on [repo] repo: starting namenode, logging to /opt/apps/hadoop-2.6.5/logs/hadoop-root-namenode-repo.out repo: starting datanode, logging to /opt/apps/hadoop-2.6.5/logs/hadoop-root-datanode-repo.out Starting secondary namesodes [repo] repo: starting secondarynamenode, logging to /opt/apps/hadoop-2.6.5/logs/hadoop-root-secondarynamenode-repo.out [root@repo hadoop]# start-yarn.sh starting yarn daemons starting resourcemanager, logging to /opt/hadoop-2.7.4/logs/yarn-root-resourcemanager-repo.out repo: starting nodemanager, logging to /opt/hadoop-2.7.4/logs/yarn-root-nodemanager-repo.out [root@repo hadoop]# jps 4368 Jps 3957 ResourceManager 3512 NameNode 3641 DataNode 4058 NodeManager 3805 SecondaryNameNode
Visit the WEB page
Build successfully!
The above is the detailed content of Hadoop pseudo-distributed cluster construction. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undress AI Tool
Undress images for free

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

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

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

What is Treehouse(TREE)? How does Treehouse (TREE) work? Treehouse Products tETHDOR - Decentralized Quotation Rate GoNuts Points System Treehouse Highlights TREE Tokens and Token Economics Overview of the Third Quarter of 2025 Roadmap Development Team, Investors and Partners Treehouse Founding Team Investment Fund Partner Summary As DeFi continues to expand, the demand for fixed income products is growing, and its role is similar to the role of bonds in traditional financial markets. However, building on blockchain

ToassignadriveletterinWindows,useDiskManagementorCommandPrompt.2.InDiskManagement,pressWindows X,selectDiskManagement,right-clickthevolumewithoutaletter,choose"ChangeDriveLetterandPaths",clickAdd,selectaletter(avoidA:orB:),andclickOK.3.Alte

UseCommandPromptbytypingsysteminfo|find"OriginalInstallDate"toinstantlyseetheoriginalWindowsinstallationdate.2.Alternatively,usePowerShellwith(Get-ItemProperty-Path"HKLM:\SOFTWARE\Microsoft\WindowsNT\CurrentVersion").InstallDatean

OpenBackupandRestoreviaWindows S,typeBackupandRestore,clickCreateasystemimage.2.Savetheimagetoanexternalharddrive(recommended),selectitfromthedropdown,andclickNext.3.Confirmincludeddrives(systemreservedandC:bydefault),addothersifneeded,thenclickNext.

cronisusedforpreciseschedulingonalways-onsystems,whileanacronensuresperiodictasksrunonsystemsthataren'tcontinuouslypowered,suchaslaptops;1.Usecronforexacttiming(e.g.,3AMdaily)viacrontab-ewithsyntaxMINHOURDOMMONDOWCOMMAND;2.Useanacronfordaily,weekly,o

Key points of the catalogue for macro and policy in August must-see major events in August weekly economic calendar weekly dismantling: August 1-7 week 2: August 8-14 week 3: August 15-21 week 4: August 22-28 week 5: August 29-31 Risk management and precautions Frequently asked questions about the August economic calendar – the dates that affect the biggest fluctuations in Bitcoin and Ethereum are: August 1 (US non-farm employment data), August 12 (US CPI), August 21-23

InstallthedesiredlanguagepackviaSettings→Time&Language→Language®ion,ensuring"SetasmyWindowsdisplaylanguage"isselected.2.Changethesystemdisplaylanguageinthesamemenuandrestart.3.OpenControlPanel→Region→Administrativetab,click"

First check the physical connection, re-plug and unplug the device and test different ports or devices to troubleshoot hardware problems; 2. Run Windows Audio Troubleshooting to automatically fix common problems; 3. Enable and set the playback device to the default output in the sound settings; 4. Update, reinstall or manually install the latest audio driver through the Device Manager; 5. Realtek users need to enable the audio jack detection function in the audio control panel; 6. Enter the BIOS if necessary to ensure that the onboard audio controller is enabled; 7. Finally, you can restart the Windows Audio Service Quick Recovery function. In most cases, this problem is caused by driver or setting errors, and you can solve it by following the steps.
