Hbase installation and configuration

Hbase installation and configuration

Install Hbase

Prepare the compressed file in advance and upload it to the linux system.
Insert picture description here
Enter the command to decompress:

tar -zxvf hbase-1.2.0-cdh5.14.2.tar.gz

Modify file name

mv hbase-1.2.0-cdh5.14.2 hbase

Configuration

Enter the hbase/conf directory, ready to start the configuration file

Configure the hbase-env.sh file

Enter the file:

vi hbase-env.sh

Save and exit after adding the following content:

export JAVA_HOME=/opt/softwave/jdk1.8.0_221
export HBASE_MANAGES_ZK=false

Insert picture description here

Configure the hbase-site.sh file

Enter the file:

vi hbase-site.xml

Save and exit after adding the following content:

<!—hbase.rootdir 将数据写入哪个目录 如果是单机版只要配置此属性就可以,value中file:/绝对路径,如果是分布式则配置与hadoop的core-site.sh服务器、端口以及zookeeper中事先创建的目录一致-->
<property>
	 <name>>hbase.rootdir</name>
	 <value>hdfs://192.168.146.150:9000/hbase</value>
</property>
<!—单机模式不需要配置,分布式配置此项为true-->
<property>
	 <name>hbase.cluster.distributed</name>
	 <value>true</value>
</property>
<!—单机模式不需要配置 分布是配置此项为zookeeper指定的物理路径名-- >
<property>
	 <name>hbase.zookeeper.property.dataDir</name>
	 <value>/home/cm/hbase</value>
	</property>

Configure environment variables

Enter the profile file

vi /etc/profile

Save and exit after adding the following content:

export HBASE_HOME=/opt/softwave/hbase
export PATH=.:$HBASE_HOME/bin

After exiting, source the changes to take effect:

source /etc/profile

start up

Make sure that hadoop is turned on, then start hbase

1. Start the Hbase process

Enter the bin directory

./start-hbase.sh        //开启进程
./stop-hbase.sh     	//关闭进程

jps to see if there is an HMaster process,
Insert picture description here
browser input IP: 60010
Insert picture description here

2. Enter the Hbase database

hbase shell

Insert picture description here
View all tables

list

Insert picture description here

The installation and configuration of Hbase is over here, thank you

Guess you like

Origin blog.csdn.net/giantleech/article/details/115262639