Installation of Hbase, Hbase shell and test code
Note: I use vm to build the service of 4 nodes, which are the zk installed on node01,node02,node03,node04; node02,node03,node04, node01 is the master node of hadoop, and node02,node03,node04 is the child node of hadoop. I install hbase on node04 for hmaster,node03 and hmater,node01,node02,node03 for HregionServer
Note: the time on each node should be consistent, otherwise there will be problems when writing hbase
There are other ways to synchronize time on Baidu.
Update time from the time server with ntpdate
If the linux system does not have the command ntpdate, you can enter the following code to install it
Yum install ntp
After the installation, you don't have to do any configuration, and you don't need to test it directly.
Vi / etc/ntp.conf
Add below:
Server 1.cn.pool.ntp.org
Server 3.asia.pool.ntp.org
Server 2.asia.pool.ntp.org
Restart service and sync the time
[root@localhost ~] # ntpdate time.nist.gov
22 Oct 21:11:43 ntpdate [5014]: adjust time server 207.200.81.113 offset-0.018788 sec
If the above shows that the synchronization is successful, then add the following to the crontab.
/ 10 * ntpdate time.nist.gov # domain name or IP
Synchronize every ten minutes. Recommend several time servers.
Time.nist.gov
Time.nuri.net
0.asia.pool.ntp.org
1.asia.pool.ntp.org
2.asia.pool.ntp.org
3.asia.pool.ntp.org
1. Upload hbase installation package and decompress it, configure environment variables
Modify the JAVA_HOME path in the hbase_env.sh under $HBASE_HOME/conf and turn off the zookeeper that comes with Hbase (export HBASE_MANAGES_ZK=false)