1:安裝包
創(chuàng)新互聯(lián)專業(yè)為企業(yè)提供進賢網(wǎng)站建設(shè)、進賢做網(wǎng)站、進賢網(wǎng)站設(shè)計、進賢網(wǎng)站制作等企業(yè)網(wǎng)站建設(shè)、網(wǎng)頁設(shè)計與制作、進賢企業(yè)網(wǎng)站模板建站服務(wù),10年進賢做網(wǎng)站經(jīng)驗,不只是建網(wǎng)站,更提供有價值的思路和整體網(wǎng)絡(luò)服務(wù)。
http://hadoop.apache.org/releases.html
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
hadoop-2.6.4 (binary)
jdk-8u102-linux-x64.tar.gz
2:節(jié)點信息
centos7 * 3
master 10.10.0.115
slave1 10.10.0.116
slave2 10.10.0.117
3:安裝過程
3.1 節(jié)下初始化(略)
主機名 防火墻 selinux 等
3.2 節(jié)點互信
[root@master ~]#ssh-keygen
[root@master ~]#cat /root/.ssh/id_rsa.pub > /root/.ssh/authorized_keys
[root@master ~]#scp -r /root/.ssh slave1:/root/
[root@master ~]#scp -r /root/.ssh slave2:/root/
3.3 在所有節(jié)點安裝jdk
[root@master ~]#tar -zxvf jdk-8u102-linux-x64.tar.gz
[root@master ~]#mkdir /usr/soft
[root@master ~]#mv jdk1.8.0_102 /usr/soft/
[root@master ~]#vim /etc/profile
...
export JAVA_HOME=/usr/soft/jdk1.8.0_102
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin
[root@master ~]#source /etc/profile
[root@master ~]#java -version
java version "1.8.0_102"
Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)
其它節(jié)點同樣操作
3.4 安裝hadoop
先在master上安裝配置,然后scp到其它節(jié)點即可
[root@master ~]#tar -zxvf hadoop-2.6.4.tar.gz
[root@master ~]#mv hadoop-2.6.4 /usr/soft/
[root@master ~]#cd /usr/soft/hadoop-2.6.4/
[root@master ~]#mkdir hdfs
[root@master ~]#mkdir hdfs/data
[root@master ~]#mkdir hdfs/name
[root@master ~]#mkdir tmp
[root@master ~]# cat /usr/soft/hadoop-2.6.4/etc/hadoop/core-site.xml
[root@master ~]# cat /usr/soft/hadoop-2.6.4/etc/hadoop/hdfs-site.xml
[root@master ~]#cp /usr/soft/hadoop-2.6.4/etc/hadoop/mapred-site.xml.template /usr/soft/hadoop-2.6.4/etc/hadoop/mapred-site.xml
[root@master ~]# cat /usr/soft/hadoop-2.6.4/etc/hadoop/mapred-site.xml
[root@master ~]# cat /usr/soft/hadoop-2.6.4/etc/hadoop/hadoop-env.sh
...
export JAVA_HOME=/usr/soft/jdk1.8.0_102
[root@master ~]# cat /usr/soft/hadoop-2.6.4/etc/hadoop/yarn-env.sh
...
export JAVA_HOME=/usr/soft/jdk1.8.0_102
[root@master ~]# cat /usr/soft/hadoop-2.6.4/etc/hadoop/slaves
10.10.0.116
10.10.0.117
[root@master ~]#scp -r /usr/soft/jdk1.8.0_102 slave1:/usr/soft/
[root@master ~]#scp -r /usr/soft/jdk1.8.0_102 slave2:/usr/soft/
[root@master ~]#/usr/soft/hadoop-2.6.4/bin/hdfs namenode -format
[root@master ~]# /usr/soft/hadoop-2.6.4/sbin/start-all.sh
瀏覽器打開http://10.10.0.115:8088/
瀏覽器打開http://10.10.0.115:50070/