Recent projects need me to write HBase Java interface, never used HBase before, decided to install their own virtual machine on the study, did not expect to pretend to be installed all day. In fact, the installation process is very simple, the reason is that the online entry documents are not all written, or even problematic. So summarize your installation process so that people without contact with HBase build hbase within 1 hours.
My installation environment is Ubuntu14.04.
Begin:
1. Download hbase-0.94.3.tar.gz and Unzip
2. Modify Conf/hbase-env.sh:
① Remove the # of Java_home and specify your own JDK path
② Find Export Hbase_manages_zk=true This sentence, remove the #
3. Modify the Conf/hbase-site.xml, modified to: (XXX replaced the Ubuntu user name) ("/home/xxx/hbase_data/hbase" This path can be customized to other paths, but be sure to confirm that the current user has access rights)
<?XML version= "1.0"?><?xml-stylesheet type= "text/xsl" href= "configuration.xsl "?><Configuration> < Property> <name>Hbase.rootdir</name> <value>File:/home/xxx/hbase_data/hbase</value> </ Property></Configuration>
4. Enter the bin directory to execute start-hbase.sh to start HBase, and the installation starts to complete.
5. Verify that HBase starts normally:
① executes the hbase shell in the bin directory, and normally enters the hbase command line mode, which is hbase (main):001:0>
② input create ' user ', ' personalinfo ', normal words will appear similar to 0 row (s) in 1.3200 seconds such results
③ continue to enter list, normal will list the user table we just created
Note: If there is an exception in the above steps, please go to the logs directory to find a file with the suffix. Log, see the error message in this file yourself, and Google it if you can't fix it yourself.
About the purpose of the changes in the installation process:
2.① is the JDK used by the specified hbase, which should be jdk1.7+
2.② is to let HBase use its own hosted zookeeper
3 is the data file path that specifies HBase, which is stored by default in the system TMP path so that data in HBase is emptied after each reboot.
HBase Standalone mode installation