1, Environment Description
1.1, the machine configuration instructions
The three cluster environment for linux machine system, specific information is as follows:
| hostname | IP address | operating system |
|: -------: |: ------------- : |: ----------: |
| hadoop1 | 10.0.0.20 | CentOS Linux Release 7.2.1511 |
| hadoop2 | 10.0.0.21 | CentOS Linux Release 7.2.1511 |
| hadoop3 | 10.0.0.22 | CentOS Linux release 7.2.1511 |
1.2, operating system details
This document is the whole root user to operate:
[root@hadoop1 ~]# uname -r
3.10.0-327.22.2.el7.x86_64[root@hadoop1 ~]# sestatus
SELinux status: disabled[root@hadoop1 ~]# systemctl status firewalld.service
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
Active: inactive (dead)[root@hadoop1 ~]# cat /etc/hosts
127.0.0.1 localhost
10.0.0.20 hadoop1
10.0.0.21 hadoop2
10.0.0.22 hadoop3
1.3, download and install the bulk upload tool management services
[root@hadoop1 ~]# yum install pssh lrzsz -y
2, ssh trust configuration
During operation Hadoop Hadoop distal to manage daemon Hadoop after start, it is to start and stop the NameNode various daemon on each DataNode by the SSH; ssh without password operation is performed so as to verify the interaction between nodes, without using cryptographic public key form.
ssh-keygen
ssh-copy-id 127.0.0.1
scp -rp ~/.ssh/ hadoop2:/root/
scp -rp ~/.ssh/ hadoop3:/root/
3, jdk installation and deployment
3.1, download jdk
Download: https: //www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
3.2, unzip installation
To download the jdk package uploaded to the server (using the rz command upload):
tar -zxvf jdk-8u211-linux-x64.tar.gz -C /usr/local/
scp -r /usr/local/jdk1.8.0_211/ hadoop2:/usr/local/
scp -r /usr/local/jdk1.8.0_211/ hadoop3:/usr/local/
3.3, configure the environment variables
Add the environment variable to "/etc/profile.d/" directory:
#vim /etc/profile.d/java.sh
export JAVA_HOME=/usr/local/jdk1.8.0_211
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
Verify operation:
[root@hadoop1 ~] source /etc/profile.d/java.sh
[root@hadoop1 ~] java -version
java version "1.8.0_211"
Java(TM) SE Runtime Environment (build 1.8.0_211-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.211-b12, mixed mode)
3.4, transmission of other machines
cd /etc/profile.d/
scp java.sh hadoop2:/etc/profile.d/
scp java.sh hadoop2:/etc/profile.d/