hbase添加到环境变量中(source生效);
将hdfs-site.xml和core-site.xml拷贝到/hbase/conf/中;
修改hbase-env.sh文件;
export JAVA_HOME=/usr/java/jdk1.8.0_111 # 如果jdk路径不同需要单独配置
export HBASE_CLASSPATH=/data/yunva/hadoop-2.7.3/etc/hadoop/
export HBASE_MANAGES_ZK=false
export HBASE_SSH_OPTS="-p 48490" # ssh端口非默认22需要修改
修改hbase-site.xml文件;
<configuration>
<property>
<name>hbase.rootdir</name>
<value>hdfs://master:9000/hbase</value>
</property>
<property>
<name>hbase.master</name>
<value>master</value>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property>
<name>hbase.zookeeper.property.clientPort</name>
<value>2181</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>master,slave1,slave2</value>
</property>
<property>
<name>zookeeper.session.timeout</name>
<value>60000000</value>
</property>
<property>
<name>dfs.support.append</name>
<value>true</value>
</property>
</configuration>
修改regionservers文件;
slave1
slave2
启动测试。