vi /etc/profile
source /etc/profile
cd /opt/hbase/conf
vi hbase-env.sh
export JAVA_HOME=/opt/jdk1.8(删除#号)
export HBASE_CLASSPATH=/opt/hadoop/etc/hadoop
export HBASE_PID_DIR=/var/hadoop/pids (删除#号)
export HBASE_MANAGES_ZK=TRUE(用自带的zookeeper)
(以上代码都有各自的位置,要去找,不是按顺序打的)
vi hbase-site.xml
<configuration>
<property>
<name>hbase.rootdir</name> <value>hdfs://localhost:9000/hbase</value>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
(以下可不加)
<property>
<name>dfs.webhdfs.enabled</name>
<value>true</value>
</property>
</configuration>
cd /opt/hbase/bin
start-hbase.sh