HBase + Phoenix Standalone version

Source: Internet
Author: User

1. Environment:

    • CentOS 6.5
    • JDK 1.8.0 http://www.oracle.com/technetwork/java/javase/downloads/index.ht M
    • Apache-phoenix-4.8.1-hbase-1.1bin.tar.gz http://mirrors.hust.edu.cn/apache/phoenix/ Apache-phoenix-4.8.1-hbase-1.1/bin/apache-phoenix-4.8.1-hbase-1.1-bin.tar.gz
    • Hbase-1.1.7-bin.tar.gz http://mirrors.hust.edu.cn/apache/hbase/1.1.7/hbase-1.1.7-bin.tar.gz

2. JDK Installation

First, unpack the *.tar.gz * Assuming that the resulting folder is moved to/usr/in Java java/usr/then set the environment variable: vim/etc/profile Open file at the end of the input: java_home=/usr//export= /usr//java/export=.:/ lib:/$CLASSPATHexport =/bin:/bin:ubuntu To modify the default JDK install300-alternatives--/usr/bin/javac javac/usr/local/java/bin/    Javac This step to add our installed JDK to the Java menu. Detection version Java-version 3. HBase Installation

A, unzip to the installation directory/usr/local

[Email protected] ~]$ TAR-XZVF hbase-1.2.2-bin.tar.gz-c/usr/local[[email protected] ~]$ mv hbase-1.2.2  hbase

b, modify the conf/hbase-env.sh

[Email protected] $vi Conf/hbase-env.shexport java_home=/usr/java/jdk1.7.0_75/export hbase_classpath=/usr/ Local/hbase/confexport Hbase_manages_zk=true

C, modify the Conf/hbase-site.xml

[Email protected] ~]$ conf/hbase-site.xml<configuration>    <property>        <name> hbase.rootdir</name>        <value>file:/usr/local/hbase</value>    </property></ Configuration>

D. configuring HBase Environment variables

[Email protected] ~]$ vi/etc/profileexport hbase_home=/usr/local/hbase/export path= $JAVA _home/bin: $HBASE _home/ Bin: $PATH [[email protected] ~]$ source/etc/profile    #保存使环境变量立即生效

E, start

[Email protected] hbase]$ bin/start-hbase.sh

F. 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, as normal will list the user table we just created.

G, open the browser to access Localhost:16010/master-status, you can see some status information of HBase.

H, Attention issues

1 . Check the system hostname to see if it is localhost, or you can add a custom 2. View/etc/hosts, whether  127.0.  0.1   localhost This mapping must be configured correctly, otherwise when you start HBase, you will get an error. 

4. Install Phoenix

Refer to the official note: http://phoenix.apache.org/installation.html

Installation

To install a pre-built Phoenix, use these directions:

  • Download and expand the latest Phoenix-[version]-bin.tar.
  • Add the Phoenix-[version]-server.jar to the classpath of all HBase region servers and master and remove any previous Versio N. An easy-to-do-it-to-copy it into the HBase Lib directory (use Phoenix-core-[version].jar for Phoenix 3.x)
  • Restart HBase.
  • Add the Phoenix-[version]-client.jar to the classpath for any Phoenix client.

A. Download the relevant version (note: to correspond to the HBase version)

B. Unzip to the installation directory

C. Phoenix-4.8.1-hbase-1.1-server.jar the directory under the lib/in the HBase directory

D. Restarting HBase

E. Running Phoenix, as follows

[Email protected] bin]$.sqlline.py localhostsetting Property: [Incremental,false]setting Property: [Isolation, transaction_read_committed]issuing:!Connect jdbc:phoenix:localhost None org.apache.phoenix.jdbc.PhoenixDriverConnecting to Jdbc:phoenix: localhost -/ One/ ,  -: -: toWARN util. nativecodeloader:unable to load Native-hadoop Library forYour platform ... using builtin-Java classes where applicableconnected To:phoenix (version4.8) Driver:phoenixembeddeddriver (version4.8) autocommit Status:trueTransaction isolation:transaction_read_committedbuilding List of tables and columns forTab-completion (Set Fastconnect totrueTo Skip) ... the/ the( -%) Donedonesqlline version1.1.90: jdbc:phoenix:localhost>

To update the detailed instructions, please visit the official website http://apache.org/

HBase + Phoenix Standalone version

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.