CentOS7 下 HBase-1.3.1 安装

安装准备 :

  1. Zookeeper-3.4.10
  2. Hadoop-2.7.3
  1. zk,hadoop安装略
  2. 启动zookeeper集群
[hadoop@hadoop131 software]$ /opt/bigdata/hadoop/zookeeper-3.4.10/bin/zkServer.sh start
ZooKeeper JMX enabled by default
Using config: /opt/bigdata/hadoop/zookeeper-3.4.10/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED

[hadoop@hadoop132 software]$ /opt/bigdata/hadoop/zookeeper-3.4.10/bin/zkServer.sh start
ZooKeeper JMX enabled by default
Using config: /opt/bigdata/hadoop/zookeeper-3.4.10/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED

[hadoop@hadoop133 software]$ /opt/bigdata/hadoop/zookeeper-3.4.10/bin/zkServer.sh start
ZooKeeper JMX enabled by default
Using config: /opt/bigdata/hadoop/zookeeper-3.4.10/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED
  1. 启动 hadoop 集群(我的namenode在hadoop131上, yarn在hadoop132上, 所以分开启动)
[hadoop@hadoop131 software]$ start-dfs.sh
[hadoop@hadoop132 zkData]$ start-yarn.sh
  1. 解压HBase并配置
[hadoop@hadoop131 software]$ tar zxvf hbase-1.3.1-bin.tar.gz -C ../bigdata/hadoop/
[hadoop@hadoop131 software]$ cd ../bigdata/hadoop/
[hadoop@hadoop131 hadoop]$ ls
hadoop-2.7.3  hive-1.2.1  jdk1.8.0_191  spark-2.4.0  zookeeper-3.4.10
hbase-1.3.1   hive_bak    scala-2.10.6  sqoop-1.4.6  zookeeper.out
[hadoop@hadoop131 hadoop]$ cd hbase-1.3.1/
[hadoop@hadoop131 hbase-1.3.1]$ cd conf
[hadoop@hadoop131 conf]$ ls
hadoop-metrics2-hbase.properties  hbase-env.cmd  hbase-env.sh  hbase-policy.xml  hbase-site.xml  log4j.properties  regionservers
[hadoop@hadoop131 conf]$ vim hbase-env.sh

修改JAVA_HOME, 关闭HBase自带Zookeeper


image.png
image.png

修改hbase-site.xml

[hadoop@hadoop131 conf]$ vim hbase-site.xml

  
    hbase.rootdir
    hdfs://hadoop131:9000/hbase
  
  
    hbase.cluster.distributed
    true
  
  
  
    hbase.master.port
  16000
  
  
    hbase.zookeeper.quorum
    hadoop131:2181,hadoop132:2181,hadoop133:2181
  
  
    hbase.zookeeper.property.dataDir
    /opt/module/zookeeper-3.4.10/zkData
  


[hadoop@hadoop131 conf]$ vim regionservers 

hadoop131
hadoop132
hadoop133

4.分发HBase到集群上(没有xsync的话用scp代替)

[hadoop@hadoop131 hadoop]$ xsync hbase-1.3.1/

5.启动HBase

[hadoop@hadoop131 hbase-1.3.1]$ bin/start-hbase.sh 

日志如下

starting master, logging to /opt/bigdata/hadoop/hbase-1.3.1/bin/../logs/hbase-hadoop-master-hadoop131.out
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
hadoop133: starting regionserver, logging to /opt/bigdata/hadoop/hbase-1.3.1/bin/../logs/hbase-hadoop-regionserver-hadoop133.out
hadoop132: starting regionserver, logging to /opt/bigdata/hadoop/hbase-1.3.1/bin/../logs/hbase-hadoop-regionserver-hadoop132.out
hadoop131: starting regionserver, logging to /opt/bigdata/hadoop/hbase-1.3.1/bin/../logs/hbase-hadoop-regionserver-hadoop131.out
hadoop133: Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
hadoop133: Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
hadoop132: Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
hadoop132: Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
hadoop131: Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
hadoop131: Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
[hadoop@hadoop131 hbase-1.3.1]$ jps
1312 NodeManager
1043 DataNode
5685 Jps
5624 HRegionServer
937 NameNode
5497 HMaster
4655 QuorumPeerMain

进入hadoop131:10060可以查看WEBUI


你可能感兴趣的:(CentOS7 下 HBase-1.3.1 安装)