Hbase 0.92.0 安装记录

hadoop 1.0.0的安装这里就不讲了,请参照 http://blog.csdn.net/ylqmf/article/details/7250235,里面已经相信介绍了.

我们在此基础上继续安装hbase 0.92.0

 [root@da-free-test1 ~]# cd /opt/hadoop/ 

一 先下载hbase,因为bug等问题,具体版本请自己选择,这里以 0.92.0为例:

 [root@da-free-test1 hadoop]# wget http://labs.renren.com/apache-mirror//hbase/hbase-0.92.0/hbase-0.92.0.tar.gz 
解压

 [root@da-free-test1 hadoop]# tar zxvf hbase-0.92.0.tar.gz  
 [root@da-free-test1 hadoop]# mv hbase-0.92.0 hbase_0_92_0 

[root@da-free-test1 hadoop]# ln -s hbase_0_92_0 hbase


二 修改配置文件

 [root@da-free-test1 hadoop]# vi /etc/profile 
在环境变量中添加HBASE_HOME
 export HBASE_HOME=/opt/hadoop_1_0_0/hbase_0_92_0
export PATH=$PATH:$HBASE_HOME/bin 
修改HBASE的配置文件
[root@da-free-test1 hadoop]# cd hbase/conf/
1 hbase-env.sh 
 [root@da-free-test1 conf]# vi hbase-env.sh  
修改参数
export JAVA_HOME=/soft/jdk1.6.0_30
export HBASE_OPTS="$HBASE_OPTS -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps"
export HBASE_PID_DIR=/opt/hadoop_1_0_0/hbase_0_92_0/pids
export HBASE_MANAGES_ZK=true
2 hbase-site.xml
 [root@da-free-test1 conf]# vi hbase-site.xml 
<configuration>
<property>
<name>hbase.rootdir</name>
<value>hdfs://da-free-test1:9000/hbase</value>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>da-free-test1,da-free-test2,da-free-test3,da-free-test4</value>
</property>
<property>
<name>zookeeper.session.timeout</name>
<value>60000</value>
</property>
<property>
<name>hbase.zookeeper.property.clientPort</name>
<value>21818</value>
</property>
</configuration> 
3 regionservers 
 [root@da-free-test1 conf]# vi regionservers 
da-free-test2
da-free-test3
da-free-test4 

三 配置完毕将hbase复制到其他节点上
 [root@da-free-test1 conf]# scp -r /opt/hadoop/hbase_0_92_0 [email protected]:/opt/hadoop/ 

 [root@da-free-test1 conf]# scp -r /opt/hadoop/hbase_0_92_0 [email protected]:/opt/hadoop/ 

 [root@da-free-test1 conf]# scp -r /opt/hadoop/hbase_0_92_0 [email protected]:/opt/hadoop/ 

别忘记分别重新建立软链接hbase

四 启动hbase

 [root@da-free-test1 conf]# /opt/hadoop/bin/start-all.sh 
Warning: $HADOOP_HOME is deprecated.

starting namenode, logging to /opt/hadoop_1_0_0/libexec/../logs/hadoop-root-namenode-da-free-test1.out
da-free-test2: starting datanode, logging to /opt/hadoop_1_0_0/libexec/../logs/hadoop-root-datanode-da-free-test2.out
da-free-test3: starting datanode, logging to /opt/hadoop_1_0_0/libexec/../logs/hadoop-root-datanode-da-free-test3.out
da-free-test4: starting datanode, logging to /opt/hadoop_1_0_0/libexec/../logs/hadoop-root-datanode-da-free-test4.out
da-free-test1: starting secondarynamenode, logging to /opt/hadoop_1_0_0/libexec/../logs/hadoop-root-secondarynamenode-da-free-test1.out
starting jobtracker, logging to /opt/hadoop_1_0_0/libexec/../logs/hadoop-root-jobtracker-da-free-test1.out
da-free-test4: starting tasktracker, logging to /opt/hadoop_1_0_0/libexec/../logs/hadoop-root-tasktracker-da-free-test4.out
da-free-test3: starting tasktracker, logging to /opt/hadoop_1_0_0/libexec/../logs/hadoop-root-tasktracker-da-free-test3.out
da-free-test2: starting tasktracker, logging to /opt/hadoop_1_0_0/libexec/../logs/hadoop-root-tasktracker-da-free-test2.out
[root@da-free-test1 conf]# jps
6453 JobTracker
6529 Jps
6371 SecondaryNameNode
6207 NameNode

hadoop已经起来了,下面启动 hbase
[root@da-free-test1 conf]# /opt/hadoop/hbase/bin/start-hbase.sh 
da-free-test1: starting zookeeper, logging to /opt/hadoop/hbase/bin/../logs/hbase-root-zookeeper-da-free-test1.out
da-free-test4: starting zookeeper, logging to /opt/hadoop/hbase/bin/../logs/hbase-root-zookeeper-da-free-test4.out
da-free-test2: starting zookeeper, logging to /opt/hadoop/hbase/bin/../logs/hbase-root-zookeeper-da-free-test2.out
da-free-test3: starting zookeeper, logging to /opt/hadoop/hbase/bin/../logs/hbase-root-zookeeper-da-free-test3.out
da-free-test1: 2012-02-13T13:21:23.622+0800: [GC [DefNew: 3200K->283K(3584K), 0.0057370 secs] 3200K->283K(11520K), 0.0057930 secs] [Times: user=0.00 sys=0.00, real=0.01 secs] 
starting master, logging to /opt/hadoop_1_0_0/hbase_0_92_0/logs/hbase-root-master-da-free-test1.out
da-free-test4: starting regionserver, logging to /opt/hadoop/hbase/bin/../logs/hbase-root-regionserver-da-free-test4.out
da-free-test3: starting regionserver, logging to /opt/hadoop/hbase/bin/../logs/hbase-root-regionserver-da-free-test3.out
da-free-test2: starting regionserver, logging to /opt/hadoop/hbase/bin/../logs/hbase-root-regionserver-da-free-test2.out
进入命令行
[root@da-free-test1 conf]# /opt/hadoop/hbase/bin/hbase shell
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Type "exit<RETURN>" to leave the HBase Shell
Version 0.92.0, r1231986, Mon Jan 16 13:16:35 UTC 2012
如果安装的有问题,此时应该就报错了,例如最典型的 
 java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder 

hbase(main):003:0> list
TABLE                                                                                                                               
0 row(s) in 0.0300 seconds


ok 通过上面的步骤,hbase 已经建立起来了...
通过 ui查看
Hbase 0.92.0 安装记录_第1张图片



你可能感兴趣的:(java,hadoop,user,hbase,zk,Path)