Hbase 0.92.0 安装记录(转强哥)
hadoop1.0.0的安装这里就不讲了,请参照http://blog.csdn.net/ylqmf/article/details/7250235,里面已经相信介绍了.
我们在此基础上继续安装hbase0.92.0
[root@da-free-test1~]#cd/opt/hadoop/
一先下载hbase,因为bug等问题,具体版本请自己选择,这里以0.92.0为例:
[root@da-free-test1hadoop]#wgethttp://labs.renren.com/apache-mirror//hbase/hbase-0.92.0/hbase-0.92.0.tar.gz
解压
[root@da-free-test1hadoop]#tarzxvfhbase-0.92.0.tar.gz
[root@da-free-test1hadoop]#mvhbase-0.92.0hbase_0_92_0
[root@da-free-test1hadoop]#ln-shbase_0_92_0hbase
二修改配置文件
[root@da-free-test1hadoop]#vi/etc/profile
在环境变量中添加HBASE_HOME
exportHBASE_HOME=/opt/hadoop_1_0_0/hbase_0_92_0
exportPATH=$PATH:$HBASE_HOME/bin
修改HBASE的配置文件
[root@da-free-test1hadoop]#cdhbase/conf/
1hbase-env.sh
[root@da-free-test1conf]#vihbase-env.sh
修改参数
exportJAVA_HOME=/soft/jdk1.6.0_30
exportHBASE_OPTS="$HBASE_OPTS-verbose:gc-XX:+PrintGCDetails-XX:+PrintGCDateStamps"
exportHBASE_PID_DIR=/opt/hadoop_1_0_0/hbase_0_92_0/pids
exportHBASE_MANAGES_ZK=true
2hbase-site.xml
[root@da-free-test1conf]#vihbase-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>
3regionservers
[root@da-free-test1conf]#viregionservers
da-free-test2
da-free-test3
da-free-test4
三配置完毕将hbase复制到其他节点上
[root@da-free-test1conf]#scp-r/opt/hadoop/[email protected]:/opt/hadoop/
[root@da-free-test1conf]#scp-r/opt/hadoop/[email protected]:/opt/hadoop/
[root@da-free-test1conf]#scp-r/opt/hadoop/[email protected]:/opt/hadoop/
别忘记分别重新建立软链接hbase
四启动hbase
[root@da-free-test1conf]#/opt/hadoop/bin/start-all.sh
Warning:$HADOOP_HOMEisdeprecated.
startingnamenode,loggingto/opt/hadoop_1_0_0/libexec/../logs/hadoop-root-namenode-da-free-test1.out
da-free-test2:startingdatanode,loggingto/opt/hadoop_1_0_0/libexec/../logs/hadoop-root-datanode-da-free-test2.out
da-free-test3:startingdatanode,loggingto/opt/hadoop_1_0_0/libexec/../logs/hadoop-root-datanode-da-free-test3.out
da-free-test4:startingdatanode,loggingto/opt/hadoop_1_0_0/libexec/../logs/hadoop-root-datanode-da-free-test4.out
da-free-test1:startingsecondarynamenode,loggingto/opt/hadoop_1_0_0/libexec/../logs/hadoop-root-secondarynamenode-da-free-test1.out
startingjobtracker,loggingto/opt/hadoop_1_0_0/libexec/../logs/hadoop-root-jobtracker-da-free-test1.out
da-free-test4:startingtasktracker,loggingto/opt/hadoop_1_0_0/libexec/../logs/hadoop-root-tasktracker-da-free-test4.out
da-free-test3:startingtasktracker,loggingto/opt/hadoop_1_0_0/libexec/../logs/hadoop-root-tasktracker-da-free-test3.out
da-free-test2:startingtasktracker,loggingto/opt/hadoop_1_0_0/libexec/../logs/hadoop-root-tasktracker-da-free-test2.out
[root@da-free-test1conf]#jps
6453JobTracker
6529Jps
6371SecondaryNameNode
6207NameNode
hadoop已经起来了,下面启动hbase
[root@da-free-test1conf]#/opt/hadoop/hbase/bin/start-hbase.sh
da-free-test1:startingzookeeper,loggingto/opt/hadoop/hbase/bin/../logs/hbase-root-zookeeper-da-free-test1.out
da-free-test4:startingzookeeper,loggingto/opt/hadoop/hbase/bin/../logs/hbase-root-zookeeper-da-free-test4.out
da-free-test2:startingzookeeper,loggingto/opt/hadoop/hbase/bin/../logs/hbase-root-zookeeper-da-free-test2.out
da-free-test3:startingzookeeper,loggingto/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.0057370secs]3200K->283K(11520K),0.0057930secs][Times:user=0.00sys=0.00,real=0.01secs]
startingmaster,loggingto/opt/hadoop_1_0_0/hbase_0_92_0/logs/hbase-root-master-da-free-test1.out
da-free-test4:startingregionserver,loggingto/opt/hadoop/hbase/bin/../logs/hbase-root-regionserver-da-free-test4.out
da-free-test3:startingregionserver,loggingto/opt/hadoop/hbase/bin/../logs/hbase-root-regionserver-da-free-test3.out
da-free-test2:startingregionserver,loggingto/opt/hadoop/hbase/bin/../logs/hbase-root-regionserver-da-free-test2.out
进入命令行
[root@da-free-test1conf]#/opt/hadoop/hbase/bin/hbaseshell
HBaseShell;enter'help<RETURN>'forlistofsupportedcommands.
Type"exit<RETURN>"toleavetheHBaseShell
Version0.92.0,r1231986,MonJan1613:16:35UTC2012
如果安装的有问题,此时应该就报错了,例如最典型的
java.lang.NoClassDefFoundError:org/slf4j/impl/StaticLoggerBinder
hbase(main):003:0>list
TABLE
0row(s)in0.0300seconds
ok通过上面的步骤,hbase已经建立起来了...
通过ui查看
http://i752.photobucket.com/albums/xx166/ntudou/dev/hbase01.png