1. Before installing, prepare the host or virtual machine of the three CentOS 6.6 systems, and turn off the firewall and SELinux.
2. Configure the IP address as shown in the table below, modify the Hosts file and the native name
192.168.199.21 Hadoop21 Master
102.168.199.22 Hadoop22 Slave1
192.168.199.23 hadoop23 Slave2
650) this.width=650; "src=" http://s14.sinaimg.cn/mw690/002nJwOegy6UlUhMq6xcd&690 "width=" 632 "height=" 359 "name = "image_operate_78961438613426977" alt= "CentOS <wbr>6.6 <wbr>hadoop <wbr>2.7.1 <wbr> Fully distributed installation Deployment "title=" CentOS <wbr>6.6 <wbr>hadoop <wbr>2.7.1 <wbr> fully Distributed installation Deployment "style=" margin:0px; Padding:0px;border:0px;list-style:none; "/>
similarly modify the Slave1,slave2 IP Address, Hosts file, and native name.
3. Install Oracle JDK
Uninstall the native OpenJDK first, use Rpm-qa|grep Java to view, and then uninstall with RPM-E
Find the latest JDK from the Oracle website, I chose JDK8
Http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Download good later decompression, and move to/usr/java, if not mkdir can be established.
TAR-XZVF jdk-8u51-linux-x64.gz
MV Jdk1.8.0_51/usr/java
Vi/etc/profile
Export java_home=/usr/java/jdk1.8.0_51
Export classpath=.: $JAVA _home/lib/rt.jar: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar
Export path= $PATH: $JAVA _home/bin
Source/etc/profile
4. Create a Hadoop run account grid at each node and set the password
5. Configure SSH password-free login.
Each node generates two key files with a grid user name, one is the private key id_rsa and the other is the public key id_rsa.pub
Ssh-keygen-t rsa-f ~/.ssh/id_rsa
And then on the HADOOP21.
Cp/home/grid/.ssh/id_rsa.pub/home/grid/.ssh/authorized_keys
SCP Hadoop22:/home/grid/.ssh/id_rsa.pub PUBKEYS22
SCP Hadoop23:/home/grid/.ssh/id_rsa.pub PUBKEYS23
Cat Pubkeys22 >>/home/grid/.ssh/authorized_keys
Cat Pubkeys23 >>/home/grid/.ssh/authorized_keys
RM pubkeys22
RM pubkeys23
Finally distribute Authorized_keys to each node
Scp/home/grid/.ssh/authorized_keys Hadoop22:/home/grid/.ssh
Scp/home/grid/.ssh/authorized_keys Hadoop23:/home/grid/.ssh
6. Download and unzip Hadoop2.7.1 (using grid username) on Master machine
Find the nearest Hadoop image and use wget to download 2.7.1
wget http://mirror.bit.edu.cn/apache/hadoop/common/hadoop-2.7.1/hadoop-2.7.1.tar.gz
Decompression hadoop-2.7.1.tar.gz
TAR-XZVF hadoop-2.7.1.tar.gz
CD hadoop-2.7.1
Establish Tmp,dfs,dfs/data,dfs/name
7. Modify the configuration file
Modify Hadoop-env.sh
Export java_home=/usr/java/jdk1.8.0_51
650) this.width=650; "src=" http://s3.sinaimg.cn/mw690/002nJwOegy6UlVcJVkK62&690 "width=" 464 "height=" 322 "name= "image_operate_41561438614255823" alt= "CentOS <wbr>6.6 <wbr>hadoop <wbr>2.7.1 <wbr> Fully distributed installation Deployment "title=" CentOS <wbr>6.6 <wbr>hadoop <wbr>2.7.1 <wbr> fully Distributed installation Deployment "style=" margin:0px; Padding:0px;border:0px;list-style:none; "/>
650) this.width=650; "src=" http://s8.sinaimg.cn/mw690/002nJwOegy6UlVhJ5xJ07&690 "width=" 567 "height=" 498 "name= "image_operate_85511438614256230" alt= "CentOS <wbr>6.6 <wbr>hadoop <wbr>2.7.1 <wbr> Fully distributed installation Deployment "title=" CentOS <wbr>6.6 <wbr>hadoop <wbr>2.7.1 <wbr> fully Distributed installation Deployment "style=" margin:0px; Padding:0px;border:0px;list-style:none; "/>
650) this.width=650; "src=" http://s11.sinaimg.cn/mw690/002nJwOegy6UlVcQwkOca&690 "width=" 581 "height=" 327 "name = "image_operate_8841438614256447" alt= "CentOS <wbr>6.6 <wbr>hadoop <wbr>2.7.1 <wbr> Fully distributed installation Deployment "title=" CentOS <wbr>6.6 <wbr>hadoop <wbr>2.7.1 <wbr> fully Distributed installation Deployment "style=" margin:0px; Padding:0px;border:0px;list-style:none; "/>
650) this.width=650; "src=" http://s5.sinaimg.cn/mw690/002nJwOegy6UlVcV90844&690 "Name=" Image_operate_ 63271438614256703 "alt=" CentOS <wbr>6.6 <wbr>hadoop <wbr>2.7.1 <wbr> fully Distributed installation Deployment "Title=" CentOS <wbr>6.6 <wbr>hadoop <wbr>2.7.1 <wbr> fully Distributed installation Deployment "style=" margin:0px;padding:0px;border:0px; List-style:none; "/>
650) this.width=650; "src=" http://s13.sinaimg.cn/mw690/002nJwOegy6UlVcXuiM0c&690 "width=" 612 "height=" name = "image_operate_7921438614470465" alt= "CentOS <wbr>6.6 <wbr>hadoop <wbr>2.7.1 <wbr> Fully distributed installation Deployment "title=" CentOS <wbr>6.6 <wbr>hadoop <wbr>2.7.1 <wbr> fully Distributed installation Deployment "style=" margin:0px; Padding:0px;border:0px;list-style:none; "/>
8. Distribute to each Salve node
Scp-r/home/grid/hadoop-2.7.1 Hadoop22:/home/grid
Scp-r/home/grid/hadoop-2.7.1 Hadoop23:/home/grid
9.Master Machine Format Namenode
cd/home/grid/hadoop-2.7.1
./bin/hdfs Namenode-format
10. Start Hadoop
650) this.width=650; "src=" http://s14.sinaimg.cn/mw690/002nJwOegy6UlVBlJbD4d&690 "width=" 675 "height=" 424 "name = "image_operate_42161438614552203" alt= "CentOS <wbr>6.6 <wbr>hadoop <wbr>2.7.1 <wbr> Fully distributed installation Deployment "title=" CentOS <wbr>6.6 <wbr>hadoop <wbr>2.7.1 <wbr> fully Distributed installation Deployment "style=" margin:0px; Padding:0px;border:0px;list-style:none; "/>
650) this.width=650; "src=" http://s2.sinaimg.cn/mw690/002nJwOegy6UlVESzBLa1&690 "width=" 675 "height=" 424 "name= "image_operate_83381438614610802" alt= "CentOS <wbr>6.6 <wbr>hadoop <wbr>2.7.1 <wbr> Fully distributed installation Deployment "title=" CentOS <wbr>6.6 <wbr>hadoop <wbr>2.7.1 <wbr> fully Distributed installation Deployment "style=" margin:0px; Padding:0px;border:0px;list-style:none; "/>
11. Verify that it is successful
Master machine should start Namenode,secondarynamenode,resourcemanager
Slave machine should start Datanode,nodemanager
650) this.width=650; "src=" http://s4.sinaimg.cn/mw690/002nJwOegy6UlVIT0qf83&690 "width=" 670 "height=" 516 "name= "image_operate_33011438614651489" alt= "CentOS <wbr>6.6 <wbr>hadoop <wbr>2.7.1 <wbr> Fully distributed installation Deployment "title=" CentOS <wbr>6.6 <wbr>hadoop <wbr>2.7.1 <wbr> fully Distributed installation Deployment "style=" margin:0px; Padding:0px;border:0px;list-style:none; "/>
650) this.width=650; "src=" http://s13.sinaimg.cn/mw690/002nJwOegy6UlVIXVHm6c&690 "width=" 690 "height=" 374 "name = "image_operate_32881438614709117" alt= "CentOS <wbr>6.6 <wbr>hadoop <wbr>2.7.1 <wbr> Fully distributed installation Deployment "title=" CentOS <wbr>6.6 <wbr>hadoop <wbr>2.7.1 <wbr> fully Distributed installation Deployment "style=" margin:0px; Padding:0px;border:0px;list-style:none; "/>
650) this.width=650; "src=" http://s5.sinaimg.cn/mw690/002nJwOegy6UlVJ1NcMc4&690 "width=" 690 "height=" 233 "name= "image_operate_87201438614707089" alt= "CentOS <wbr>6.6 <wbr>hadoop <wbr>2.7.1 <wbr> Fully distributed installation Deployment "title=" CentOS <wbr>6.6 <wbr>hadoop <wbr>2.7.1 <wbr> fully Distributed installation Deployment "style=" margin:0px; Padding:0px;border:0px;list-style:none; "/>
This article is from the "Dream to Reality" blog, please be sure to keep this source http://lookingdream.blog.51cto.com/5177800/1835082
CentOS 6.6 Hadoop 2.7.1 fully Distributed installation deployment