大数据之hbase环境搭建笔记

1. 环境选择

操作系统:centos7.2
hadoop2.7.6
jdk1.8_144
zookeeper3.4.13
hbase1.3.1

2. 搭建过程

gedit /etc/profile
export HBASE_HOME=/opt/hbase-1.3.1
export PATH=$PATH:$HBASE_HOME/bin
source /etc/profile
cd /opt/hbase-1.3.1/conf
gedit hbase-env.sh
export JAVA_HOME=/usr/lib/jvm/jdk1.8.0_144
export HADOOP_HOME=/opt/hadoop-2.7.6
export HBASE_HOME=/opt/hbase-1.3.1
export HBASE_CLASSPATH=/opt/hadoop-2.7.6/etc/hadoop
export HBASE_MANAGES_ZK=false
export HBASE_PID_DIR=/var/hadoop/pids
注释掉这两行
#export HBASE_MASTER_OPTS="$HBASE_MASTER_OPTS -XX:PermSize=128m -XX:MaxPermSize=128m"
#export HBASE_REGIONSERVER_OPTS="$HBASE_REGIONSERVER_OPTS -XX:PermSize=128m -XX:MaxPermSize=128m"
gedit hbase-site.xml
注意:hdfs的端口号要和之前hadoop配置的对应
<configuration>
	<property>
		<name>hbase.mastername>
		<value>master:60000value>
	property>
	<property>  
		<name>hbase.rootdirname>  
		<value>hdfs://master:8888/hbasevalue>  
		<description>The directory shared byregion servers.description>  
	property>  
	<property>  
		<name>hbase.zookeeper.property.clientPortname>  
		<value>2181value>  
		<description>Property from ZooKeeper'sconfig zoo.cfg. The port at which the clients will connect.description>  
	property>  
	<property>  
		<name>zookeeper.session.timeoutname>  
		<value>120000value>  
	property>  
	<property>  
		<name>hbase.zookeeper.quorumname>  
		<value>master,slave1,slave2value>  
	property>  
	<property>  
		<name>hbase.tmp.dirname>  
		<value>/root/hbase/tmpvalue>  
	property>  
	<property>  
		<name>hbase.cluster.distributedname>  
		<value>truevalue>  
	property>
configuration>
gedit regionservers

清空

slave1
slave2

启动

cd /opt/hbase/hbase-1.3.1/bin
./start-hbase.sh

浏览器访问http://192.168.164.139:16010、http://192.168.164.142:16010、http://192.168.164.143:16010

你可能感兴趣的:(大数据,hbase,hadoop)