Big Data Advanced – Hadoop Deployment

Big Data Advanced – Hadoop Deployment

Big Data – Hadoop

Install the corresponding software
Related software installation
(1) Install VMware-workstation
Version: VM17
Address: Download VMware Workstation Pro | CN

After the installation is complete, open the software;
Help (H) / Enter License Key (E)
License: JU090-6039P-08409-8J0QH-2YR7F
(2) Install Xshell, Xftp
Official Website: Free for Home/School – NetSarang Website (
Version: xshell7, xftp7

Note: If the software prompts that it needs to be upgraded, then connect to the network; the whole process of the upgrade is automatic, and it can be used after the upgrade.

(2.1) Use Xshell7
Each session is an ssh connection to Linux, so to use xshell to connect to Linux, you need to create a session first.

?Name: the name of the session, you can customize it
?Protocol: default ssh
?Host: fill in the input box of ip, for example: (the specific ip will be explained later)
?Other options: default

Click OK to successfully create the session

Basic information can be seen.

(2.2) Using Xftp7
The function of ftp is used for file transfer, which can upload local windows files to Linux

The operation used is consistent with Xshell, create a new session, fill in the name and host

Install Linux system
In the previously installed VMware software, install the Linux system.
Open the software, Ctrl + N (new virtual machine)

Many of the following and above are processed by default, and the places that need attention are marked with red arrows

At this point, the virtual machine is created, and the image file Centos7 is added to the virtual machine

Find the file CentOS-7-x86_64-DVD-2009.iso stored locally, and click OK.

Note: In the virtual machine, if you find that your cursor disappears, you can press Alt + Ctrl
Enter by default

After waiting for a period of time to install, come to the language selection page, slide the selection box on the left to the bottom, select Chinese – Simplified Chinese, and click Continue

After waiting for a while, come to [Installation Information Summary], mainly modify System > Installation Location | Network

First click I want to configure the partition, and then click Finish to come to the custom partition

The default partition habit can be:
~/boot: 500M
?swap: 2G
?/: All remaining disk space

Add in the order listed above

Click to start the installation

Next, set a password for root

The password here is 123456, click Finish, and then wait for the virtual machine to install.

After the installation is complete, there will be a restart option, click [Restart].

Wait for the page to load and log in

Enter username root Enter password 123456
After logging in, check the ip
ip addr

Find your own ip, then open xshell, connect to this virtual machine, and make sure that the virtual machine is turned on when connecting.

First change to static ip, then you need to configure the network card, ens33
vi /etc/sysconfig/network-scripts/ifcfg-ens33
A total of one modification, four additions at the end

The first three digits of ip can be viewed in the virtual machine through ip addr: 192.168.200

Explain what was modified above.
BOOTPROTO=”static”: Network mode, originally DHCP mode, now changed to static static mode
IPADDR: specified static ip
NETMASK: subnet mask, generally
GATEWAY: default gateway, the first three digits of ip + 2 [192.168.200] + [.2] ->
DNS1: DNS (Domain Name Server) – Google’s domain name server or use – a nationwide domain name server

Briefly introduce the use of vi command (using English input method):
?vi is a text editing tool that comes with centos, and the upgraded version is vim, which will be installed later
–vi is divided into two modes:
?Command line mode: use vi to edit files, the default is command line mode, press i to enter insert mode
?Insert mode: Insert mode to return to the command line mode and press Esc
– In command line mode:
?:w: save the file
?:wq: save and exit the file
?/[content]: Find the content in the file
?:set nu: display line number
?Move the cursor by pressing up, down, left, and right on the small keyboard

After modifying the content of the network card, :wq to save and exit, and then restart the network card
systemctl restart network
After restarting, the ip in xshell needs to be changed to the static ip we set:

connect again

Install frequently used tools below
yum -y install vim

Wait for the installation to complete before installing

yum -y install net-tools
After the installation is complete, there are two more commonly used commands vim and ifconfig
vim: advanced version of vi (the operation is the same)
ifconfig: View ip commands more concisely

Before deploying the environment, prepare the software and module folders
All compressed packages are managed under the /opt/software directory
All installation paths are managed under the /opt/module directory
mkdir /opt/module

mkdir /opt/software
Connect xftp to the virtual machine too

The left side is the file in our windows system, and the right side is the file in Linux

Switch directory to /opt/software, move the required package into it, and drag and drop

Check that the file is indeed moved in

Modify the host name: master
hostnamectl set-hostname master


Deploy jdk environment
jdk version: 8u311
tar -zxvf /opt/software/jdk-8u311-linux-x64.tar.gz -C /opt/module/
change file name
mv /opt/module/jdk1.8.0_311/ /opt/module/jdk8
Add jdk environment variable
vim /etc/profile
content added (end of file)

export JAVA_HOME=/opt/module/jdk8

export PATH=








Refresh environment files
source /etc/profile
Check if it takes effect
java # Three arbitrary views are fine



Deploy hadoop environment
Hadoop version: 2.10.1
tar -zxvf /opt/software/hadoop-2.10.1.tar.gz -C /opt/module/
change file name
mv /opt/module/hadoop-2.10.1/ /opt/module/hadoop2.10
Add hadoop environment variables
vim /etc/profile
content added (end)


export HADOOP_HOME=/opt/module/hadoop2.10


export JAVA_HOME=/opt/module/jdk8

export PATH=

























Refresh environment files
source /etc/profile
Check if the hadoop environment is in effect
hadoop version

Configure hadoop core files
The detailed role of each file reference: (148 messages) 1. The role of Hadoop main configuration files Hadoop five configuration files 1 Le’s Blog-CSDN Blog
cd /opt/module/hadoop2.10/etc/hadoop/








</property> export JAVA_HOME=/opt/module/jdk8 # about line 25 yarn-site.xml



















slaves master

Add ssh password-free login
download ssh service
yum -y install openssh
Configure host mapping
vim /etc/hosts
content, add at the end master
add ssh key
ssh-keygen -t rsa # Enter three times

Copy key

ssh-copy-id master

Enter yes

Enter password: 123456

Format namenode node
hadoop namenode -format
turn off firewall
systemctl stop firewalld # Turn off the firewall once

systemctl disable firewalld # Permanently disable the firewall

start hadoop
view process
9751 SecondaryNameNode

9913 Resource Manager

10313 Jps

9450 NameNode

10011 NodeManager

9581 DataNodes
Web side:
Port number: 50070

shutdown hadoop