2、去掉hadoop的安全模式:
hadoop dfsadmin -safemode leave
3、把/etc/hosts里的master01的IP改为服务器当前的IP
4、确认hbase的hbase-site.xml中
<name>hbase.rootdir</name>
<value>hdfs://localhost:8020/hbase</value>
与hadoop的core-site.xml中
<name>fs.default.name</name>
<value>hdfs://localhost:8020</value>
红字部分保持一致
5、确认hadoop版本是0.20.2,hbase版本是0.20.6
6、重新执行./start-hbase.sh之前,先kill掉当前的hbase和zookeeper进程
之后再执行:
$bin/hadoop fs -mkdir /hbase
b> 解压hbase-0.94.5.tar.gz,修改配置文件,正式安装HBase:l #vi hbase-0.94.5/conf/hbase-env.sh
exportJava_HOME=/usr/java/jdk1.6.0_43
exportHBASE_CLASSPATH=$HBASE_HOME/
#exportHBASE_HEAPSIZE=128
#exportHBASE_OPTS="-XX:+UseConcMarkSweepGC"
exportHBASE_MANAGES_ZK=false
#vi hbase-0.94.5/conf/regionservers
slave1
slave2
l 将hbase-webapps目录改名为webapps
hduser@master:/usr/local/hbase-0.94.6$ mvhbase-webapps/ /webapps
l 检查HBase配置,复制到其他的slave节点:
hduser@master:/usr/local$ scp -rhbase-0.94.6 hduser@slave1:/home/hduser/
hduser@master:/usr/local$ scp -rhbase-0.94.6 hduser@slave2:/home/hduser/
l 启动HBase:
hduser@master:/usr/local$ ./hbase-0.94.6/bin/start-hbase.sh
starting master, logging to/usr/local/hbase-0.94.6/bin/../logs/hbase-hduser-master-master.out
slave2: starting regionserver, logging to/usr/local/hbase-0.94.6/bin/../logs/hbase-hduser-regionserver-slave2.out
slave1: starting regionserver, logging to/usr/local/hbase-0.94.6/bin/../logs/hbase-hduser-regionserver-slave1.out
l 查看相关进程:
hduser@master:/usr/local$ jps
3339 QuorumPeerMain
8210 JobTracker
7894 DataNode
9187 HMaster
8126 SecondaryNameNode
8459 TaskTracker
9328 Jps
7659 NameNode
hduser@master:/usr/local$
hduser@slave1:~$ jps
5416 TaskTracker
5879 Jps
5210 DataNode
3323 QuorumPeerMain
hduser@slave1:~$
hduser@slave2:/usr/local/hbase-0.94.6$ jps
5083 TaskTracker
5544 Jps
4877 DataNode
3042 QuorumPeerMain