学习内容:Hbase安装
1.启动Hadoop集群(命令:start-all.sh)
2.启动Zookeeper(需要在master,s1,s2分别启动一遍。命令:bin/zkServer.sh start)
3.解压 Hbase 到指定目录:tar -zxvf hbase-1.3.1-bin.tar.gz -C /opt/module
4.修改Hbase配置文件
①hbase-env.sh
export JAVA_HOME=/opt/module/jdk1.6.0_144 export HBASE_MANAGES_ZK=false
②hbase-site.xml
1 <configuration> 2 <property> 3 <name>hbase.rootdir</name> 4 <value>hdfs://master:9000/HBase</value> 5 </property> 6 <property> 7 <name>hbase.cluster.distributed</name> 8 <value>true</value> 9 </property> 10 <property> 11 <name>hbase.master.port</name> 12 <value>16000</value> 13 </property> 14 <property> 15 <name>hbase.zookeeper.quorum</name> 16 <value>master,s1,s2</value> 17 </property> 18 <property> 19 <name>hbase.zookeeper.property.dataDir</name> 20 <value>/opt/module/zookeeper-3.5.7/zkData</value> 21 </property> 22 </configuration>
③regionservers:
1 master 2 s1 3 s2
5.软连接 hadoop 配置文件到 HBase(路径一定要找对):
命令1:ln -s /root/hadoop-2.7.7/etc/hadoop/core-site.xml /opt/module/hbase/conf/core-site.xml
命令2:ln -s /root/hadoop-2.7.7/etc/hadoop/hdfs-site.xml /opt/module/hbase/conf/hdfs-site.xml
6.HBase 远程发送到其他集群:xsync hbase/
7.Hbase集群启动:bin/start-hbase.sh