lwb 2011-08-03
1、下载hbase
hbase-0.90.3
2、下载zookeeper
zookeeper-3.3.2
版本一定要对应上,同时检查lib里的jar包hbase、zookeeper、hadoop的版本是否对应
3、修改zoo.cfg
修改dataDir=C:/cygwin/home/Administrator/zookeeper-3.3.2/data_dir
增加:server.1=130.51.38.100:2888:3888
4、修改regionservers
meimer-computer
5、配置hbase-site.xml
<configuration>
<property>
<name>hbase.rootdir</name>
<value>hdfs://localhost:9100/hbase</value>
<description>Thedirectorysharedbyregionserversandinto
whichHBasepersists.TheURLshouldbe'fully-qualified'
toincludethefilesystemscheme.Forexample,tospecifythe
HDFSdirectory'/hbase'wheretheHDFSinstance'snamenodeis
runningatnamenode.example.orgonport9000,setthisvalueto:
hdfs://namenode.example.org:9000/hbase.BydefaultHBasewrites
into/tmp.Changethisconfigurationelsealldatawillbelost
onmachinerestart.
</description>
</property>
<property>
<name>hbase.master.port</name>
<value>60000</value>
<description>TheporttheHBaseMastershouldbindto.</description>
</property>
<property>
<name>hbase.tmp.dir</name>
<value>/tmp/hbase-${user.name}</value>
<description>Temporarydirectoryonthelocalfilesystem.
Changethissettingtopointtoalocationmorepermanent
than'/tmp'(The'/tmp'directoryisoftenclearedon
machinerestart).
</description>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
<description>Themodetheclusterwillbein.Possiblevaluesare
falseforstandalonemodeandtruefordistributedmode.If
false,startupwillrunallHBaseandZooKeeperdaemonstogether
intheoneJVM.
</description>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>meimer-computer</value>
<description>CommaseparatedlistofserversintheZooKeeperQuorum.
Forexample,"host1.mydomain.com,host2.mydomain.com,host3.mydomain.com".
Bydefaultthisissettolocalhostforlocalandpseudo-distributedmodes
ofoperation.Forafully-distributedsetup,thisshouldbesettoafull
listofZooKeeperquorumservers.IfHBASE_MANAGES_ZKissetinhbase-env.sh
thisisthelistofserverswhichwewillstart/stopZooKeeperon.
</description>
</property>
</configuration>
6、修改hbase-evn.sh
exportJAVA_HOME=/usr/local/jdk1.6.0_24
exportHBASE_MANAGES_ZK=false
7、启动
bin/kzServer.shstart
bin/start-hbase.sh
bin/hbaseshell
如果报java找不到,修改zkServer.sh里的java为全路径
停止
bin/kzServer.shstop
bin/stop-hbase.sh