正文
CentOS7搭建hadoop2.6.4+HBase1.1.6
小程序:扫一扫查出行
【扫一扫了解最新限行尾号】
复制小程序
【扫一扫了解最新限行尾号】
复制小程序
环境:
CentOS7
hadoop2.6.4两个节点:master、slave1
HBase1.1.6
过程:
hadoop安装目录:/usr/hadoop-2.6.4
master节点,hadoop用户登录。在hadoop目录下新建thirdparty目录:
$ mkdir thirdparty
目录结构:
把hbase1.1.6解压到thirdparty目录下:
$ cp ~/hbase-1.1.6-bin.tar.gz thirdparty
$ cd thirdparty
$ tar zxvf hbase-1.1.6-bin.tar.gz
$ cd hbase-1.1.6
$ ls
将hbase添加到环境变量中。
$ sudo gedit /etc/profile
添加:
export HBASE_HOME=/usr/hadoop-2.6.4/thirdparty/hbase-1.1.6
export PATH=$HBASE_HOME/bin:$PATH
$ source /etc/profile生效。
修改hbase-env.sh,添加:
export JAVA_HOME=/usr/java/jdk1..0_101
修改hbase-site.xml:
<configuration>
<property>
<name>hbase.rootdir</name><value>hdfs://master:8020/hbase</value>
</property>
<property>
<name>hbase.cluster.distributed</name><value>true</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>master,slave1</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/usr/hadoop-2.6.4/thirdparty/zookeeper</value>
</property>
</configuration>
修改regionservers,在regionservers文件中添加如下内容:
然后在每个DataNode节点上也设立同样的文件结构和配置。
启动hbase。首先启动hadoop:
$ start-dfs.sh && start-yarn.sh
启动hbase:
$ start-hbase.sh
查看hbase进程:
发现多了HMaster和HQuorumPeer这两个进程。
查看DataNode进程:
发现多了HQuorumPeer和HRegionServer这两个进程。
浏览器访问http://master:16030/
(此处与教程不符?)
运行hbase shell命令:
原文:http://blog.csdn.net/wuwenxiang91322/article/details/44684655