In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
Hbase installation
1. Decompression
Tar-zxvf / hbase-1.2.9-bin.tar.gz-C / usr/local
Mv hbase-1.2.9 hbase
2. Modify the configuration file: conf/hbase-env.sh
Cd hbase
Vim conf/hbase-env.sh
Export HBASE_MANAGES_ZK=false
Export JAVA_HOME=/usr/local/jdk1.8
Export HBASE_CLASSPATH=/usr/local/hadoop/etc/hadoop
Explanation: a distributed running Hbase relies on a zookeeper cluster. All the nodes and guests
All clients must be able to access zookeeper. By default, Hbase manages a zookeep cluster
That is, Hbase comes with a zookeep cluster by default. This cluster will start with the startup of Hbase. And
In actual business projects, it is usually easier to manage a zookeeper cluster by yourself to optimize the configuration of Gao Gao set.
Group productivity, but you need to configure Hbase. Need to modify the content in conf/hbase-env.sh
HBASE_MANAGES_ZK to switch. This value defaults to true, which is used to enable Hbase to start
At the same time, zookeeper. In this lab, we run the zookeeper cluster independently.
Therefore, its property value is changed to false.
3. Configure conf/hbase-site.xml
Hbase.rootdir
Hdfs://Master:9000/hbase
Hbase.cluster.distributed
True
Hbase.master
Hdfs://Master:6000
Hbase.zookeeper.quorum
Master,Slave1,Slave2
Hbase.zookeeper.property.dataDir
/ usr/local/zookeeper
Explanation: to run fully distributed mode, add an attribute hbase.cluster.distributed
Set it to true and then set hbase.rootdir to the location of HDFS's NameNode
Hbase.rootdir: this directory is a shared directory for region server and is used to persist Hbase.
The URL needs to be 'completely correct' and contains the scheme of the file system
Hbase.cluster.distributed: the running mode of Hbase. False is in stand-alone mode, true
It's distributed mode. If false,Hbase and Zookeeper run in the same JVM. In
Hbase-site.xml configuration zookeeper: when Hbase manages zookeeper, you can use the
Modify zoo.cfg to configure zookeeper. For zookeepr configuration, you should at least
The ensemble servers of zookeepr is listed in hbase-site.xml. The specific fields are
Hbase.zookeeper.quorum. The address list of the Zookeeper cluster is listed here, separated by commas.
Configuration in zoo.conf of hbase.zookeeper.property.clientPort:ZooKeeper
The port to which the client connects.
Configuration in zoo.conf of hbase.zookeeper.property.dataDir:ZooKeeper. Yes
For a stand-alone Zookeeper, specify the host and port of the Zookeeper. Need to be in hbase-site.xml
Set up in
4. Configure conf/regionservers
The contents are as follows
5. Copy of hadoop configuration file
Copy the hadoop configuration file to the conf directory of hbase:
(the current location is the conf configuration folder for hbased)
Cp / usr/hadoop/hadoop-2.7.3/etc/hadoop/hdfs-site.xml.
Cp / usr/hadoop/hadoop-2.7.3/etc/hadoop/core-site.xml.
6. Distribute hbase
Scp-r / usr/local/hbase root@slave1:/usr/ local
Scp-r / usr/loca/hbase root@slave2:/usr/local
7. Configure environment variables
Vi / etc/profile
Configure the environment variable Hbase
# set hbase environment
Export HBASE_HOME=/usr/local/hbase
Export PATH=$PATH:$HBASE_HOME/bin
Effective environment variables:
Source / etc/profile
8. Run and test
Execute on master (make sure hadoop and zookeeper are turned on)
Bin/start-hbase.sh
Check whether the process is started on three nodes
9. Visit the hbase web interface of master
Http://master IP:16010/master-status
10. Enter the hbase interface to check the status and version
Enter hbase/bin
. / hbase shell
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.