Home > Article > Operation and Maintenance > Detailed explanation of how to install HBase1.4 on Centos7
The following column centos introductory tutorial will introduce to you how to install HBase1.4 on Centos7. I hope it will be helpful to friends in need!
1. The hadoop cluster has been installed. Here we will install hbase1.4 on the basis of Hadoop2.7 installed on Centos7, so it is the same three machines. The plan is as follows:
hostname | IP address | Deployment planning |
node1 | 172.20 .0.4 | Master, RegionServer |
node2 | 172.20.0.5 | Backup-Master, RegionServer |
node3 | 172.20.0.6 | RegionServer |
2. Download the installation package from the official website: hbase-1.4.12 -bin.tar.gz (it is recommended to go to the open source mirror site of Tsinghua University or University of Science and Technology of China).
3. hbase will be deployed in the path/mydata that already exists on three machines. Configure the environment variables:
export HBASE_HOME=/mydata/hbase-1.4.12export PATH=${HBASE_HOME}/bin:$PATH
First modify the hbase configuration on node1 and complete. Then uniformly copy it to other nodes to ensure that the configuration content is consistent.
Extract hbase-1.4.12-bin.tar.gz to /mydata/, enter /mydata/hbase-1.4.12/conf, and configure:
<!-- 文件名 hbase-site.xml --><configuration> <property> <name>hbase.cluster.distributed</name> <value>true</value> </property> <property> <name>hbase.rootdir</name> <value>hdfs://node1:9000/hbase</value> </property> <property> <name>hbase.zookeeper.quorum</name> <value>node1,node2,node3</value> </property> <property> <name>hbase.zookeeper.property.dataDir</name> <value>/mydata/data/zookeeper</value> </property> </configuration>
# 文件名 regionserversnode1 node2 node3
# 文件名 backup-masters 该文件需要新建node2
Configuration item | Meaning |
hbase.cluster.distributed |
Distributed mode |
hbase.rootdir |
The data storage location of hbase, here is /hbase of hdfs, host:port corresponds to fs.defaultFS |
hbase.zookeeper.quorum | in the hadoop configuration All hosts where zookeeper is to be deployed, usually more than three, of course you can deploy it on each one at most |
hbase.zookeeper.property.dataDir |
Data storage location when zookeeper is running |
regionservers |
All RegionServers are usually deployed on each DataNode |
backup-masters |
As a backup Master |
Note: The zookeeper here uses the one that comes with hbase. Of course, you can also use the external one, which will not be mentioned here. .
The default log directory is in $HBASE_HOME/logs, and the pid file is in /tmp, which can be modified:
# 文件名 hbase-env.shexport HBASE_LOG_DIR=/mydata/logs/hbase export HBASE_PID_DIR=/mydata/data/pid
After the configuration is completed, copy the hbase program file to the other two:
node1> scp -r /mydata/hbase-1.4.12/ root@node2:/mydata/node1> scp -r /mydata/hbase-1.4.12/ root@node3:/mydata/
node1> start-hbase.sh
Use jps command to verify the process on node1 | HMaster, HRegionServer, HQuorumPeer |
HMaster, HRegionServer, HQuorumPeer | |
HRegionServer, HQuorumPeer |
http://node1 :16010 | |
RegionServer’s background | http://node1:16030http://node2:16030http://node3:16030 |
node> hbase shell hbase> create 'test', 'cf' hbase> list 'test' hbase> describe 'test' hbase> put 'test', 'row1', 'cf:a', 'value1' hbase> put 'test', 'row2', 'cf:b', 'value2' hbase> put 'test', 'row3', 'cf:c', 'value3' hbase> scan 'test' hbase> get 'test', 'row1'You can see the information of this table in the browser: http://node1:16010/table. jsp?name=test. over
The above is the detailed content of Detailed explanation of how to install HBase1.4 on Centos7. For more information, please follow other related articles on the PHP Chinese website!