[HBase] 完全分布式安装过程详解(2)

5) 替换Jar包
 
[Hadoop@node01 lib]$ mv hadoop-core-0.20-append-r1056497.jar hadoop-core-0.20-append-r1056497.sav
 
[hadoop@node01 lib]$ cp ../../hadoop-0.20.2/hadoop-0.20.2-core.jar .
 

[hadoop@node01 lib]$ ls
 
activation-1.1.jar          commons-net-1.4.1.jar                jasper-compiler-5.5.23.jar  jetty-util-6.1.26.jar      slf4j-api-1.5.8.jar
 
asm-3.1.jar                core-3.1.1.jar                        jasper-runtime-5.5.23.jar  jruby-complete-1.6.0.jar    slf4j-log4j12-1.5.8.jar
 
avro-1.3.3.jar              guava-r06.jar                        jaxb-api-2.1.jar            jsp-2.1-6.1.14.jar          stax-api-1.0.1.jar
 
commons-cli-1.2.jar        hadoop-0.20.2-core.jar                jaxb-impl-2.1.12.jar        jsp-api-2.1-6.1.14.jar      thrift-0.2.0.jar
 
commons-codec-1.4.jar      hadoop-core-0.20-append-r1056497.sav  jersey-core-1.4.jar        jsr311-api-1.1.1.jar        xmlenc-0.52.jar
 
commons-el-1.0.jar          jackson-core-asl-1.5.5.jar            jersey-json-1.4.jar        log4j-1.2.16.jar            zookeeper-3.3.2.jar
 
commons-httpclient-3.1.jar  jackson-jaxrs-1.5.5.jar              jersey-server-1.4.jar      protobuf-java-2.3.0.jar
 
commons-lang-2.5.jar        jackson-mapper-asl-1.4.2.jar          jettison-1.1.jar            ruby
 
commons-logging-1.1.1.jar  jackson-xc-1.5.5.jar                  jetty-6.1.26.jar            servlet-api-2.5-6.1.14.jar
 

6) 向其它3个结点复制Hbase相关配置
 

[hadoop@node01 ~]$scp -r ./hbase-0.90.5 node02:/home/hadoop
 
[hadoop@node01 ~]$scp -r ./hbase-0.90.5 node03:/home/hadoop
 
[hadoop@node01 ~]$scp -r ./hbase-0.90.5 node04:/home/hadoop
 

7) 添加HBase相关环境变量 (所有结点)
 

[hadoop@node01 conf]$ su - root
 
Password:
 
[root@node01 ~]# vi /etc/profile
 

export HBASE_HOME=/home/hadoop/hbase-0.90.5
 
export PATH=$PATH:$HBASE_HOME/bin
 

8)启动Hadoop,创建HBase主目录
 

[hadoop@node01 ~]$ $HADOOP_INSTALL/bin/start-all.sh
 
starting namenode, logging to /home/hadoop/hadoop-0.20.2/bin/../logs/hadoop-hadoop-namenode-node01.out
 
node02: starting datanode, logging to /home/hadoop/hadoop-0.20.2/bin/../logs/hadoop-hadoop-datanode-node02.out
 
node04: starting datanode, logging to /home/hadoop/hadoop-0.20.2/bin/../logs/hadoop-hadoop-datanode-node04.out
 
node03: starting datanode, logging to /home/hadoop/hadoop-0.20.2/bin/../logs/hadoop-hadoop-datanode-node03.out
 
hadoop@node01's password:
 
node01: starting secondarynamenode, logging to /home/hadoop/hadoop-0.20.2/bin/../logs/hadoop-hadoop-secondarynamenode-node01.out
 
starting jobtracker, logging to /home/hadoop/hadoop-0.20.2/bin/../logs/hadoop-hadoop-jobtracker-node01.out
 
node04: starting tasktracker, logging to /home/hadoop/hadoop-0.20.2/bin/../logs/hadoop-hadoop-tasktracker-node04.out
 
node02: starting tasktracker, logging to /home/hadoop/hadoop-0.20.2/bin/../logs/hadoop-hadoop-tasktracker-node02.out
 
node03: starting tasktracker, logging to /home/hadoop/hadoop-0.20.2/bin/../logs/hadoop-hadoop-tasktracker-node03.out
 
[hadoop@node01 ~]$ jps
 
5332 Jps
 
5030 NameNode
 
5259 JobTracker
 
5185 SecondaryNameNode
 

[hadoop@node02 ~]$ jps
 
4603 Jps
 
4528 TaskTracker
 
4460 DataNode
 
[hadoop@node01 ~]$ hadoop fs -mkdir hbase
 

9)启动HBase
 

[hadoop@node01 conf]$ start-hbase.sh
 
hadoop@node01's password: node03: starting zookeeper, logging to /home/hadoop/hbase-0.90.5/bin/../logs/hbase-hadoop-zookeeper-node03.out
 
node04: starting zookeeper, logging to /home/hadoop/hbase-0.90.5/bin/../logs/hbase-hadoop-zookeeper-node04.out
 
node02: starting zookeeper, logging to /home/hadoop/hbase-0.90.5/bin/../logs/hbase-hadoop-zookeeper-node02.out
 

node01: starting zookeeper, logging to /home/hadoop/hbase-0.90.5/bin/../logs/hbase-hadoop-zookeeper-node01.out
 
starting master, logging to /home/hadoop/hbase-0.90.5/logs/hbase-hadoop-master-node01.out
 
node03: starting regionserver, logging to /home/hadoop/hbase-0.90.5/bin/../logs/hbase-hadoop-regionserver-node03.out
 
node02: starting regionserver, logging to /home/hadoop/hbase-0.90.5/bin/../logs/hbase-hadoop-regionserver-node02.out
 
node04: starting regionserver, logging to /home/hadoop/hbase-0.90.5/bin/../logs/hbase-hadoop-regionserver-node04.out
 
[hadoop@node01 conf]$ jps
 
7437 HQuorumPeer
 
7495 HMaster
 
5030 NameNode
 
5259 JobTracker
 
5185 SecondaryNameNode
 
7597 Jps
 

[hadoop@node02 ~]$ jps
 
5965 HRegionServer
 
4528 TaskTracker
 
4460 DataNode
 
5892 HQuorumPeer
 
6074 Jps

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/6a6450e782b111eb71704f2dbbc98b4d.html