前置条件
安装好hadoop,zookeeper
主机名 | ip | 安装的软件 | 进程 |
---|---|---|---|
bigdata01 | 192.168.100.51 | jdk、hadoop | namenode ressourcemanager hmaster HRegionServer |
bigdata02 | 192.168.100.52 | jdk、hadoop | datanode secondnamenode HRegionServer |
bigdata03 | 192.168.100.53 | jdk、hadoop | datanade HRegionServer |
配置hbase
在 hbase-env.sh中添加
export JAVA_HOME=/usr/local/jdk1.8.0_144
export HBASE_CLASSPATH=/usr/local/hadoop/etc/hadoop
export HBASE_LOG_DIR=${HBASE_HOME}/logs
export HBASE_MANAGES_ZK=false
配置hbase-site.xml
<configuration>
<property>
<name>hbase.rootdir</name>
<value>hdfs://bigdata01:9000/hbase</value>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>bigdata01,bigdata02,bigdata03</value>
</property>
<property>
<name>hbase.master</name>
<value>hdfs://bigdata01:60000</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/usr/local/zookeeper/datas</value>
</property>
<property>
<name>hbase.zookeeper.property.clientPort</name>
<value>2181</value>
</property>
</configuration>
配置 regionservers
bigdata01
bigdata02
bigdata03
在bigdata01中启动hbase集群
hbase-start.sh
打开webui界面
http://bigdata01:16010/master-status