You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "alex kamil (JIRA)" <ji...@apache.org> on 2014/08/21 15:34:12 UTC

[jira] [Created] (PHOENIX-1194) Add "hello world" instructions

alex kamil created PHOENIX-1194:
-----------------------------------

             Summary: Add "hello world" instructions
                 Key: PHOENIX-1194
                 URL: https://issues.apache.org/jira/browse/PHOENIX-1194
             Project: Phoenix
          Issue Type: Improvement
    Affects Versions: 5.0.0, 3.1, 4.1
            Reporter: alex kamil
            Priority: Trivial


Pls add minimal install instructions including standalone hbase setup, as people keep asking the same questions on mailing list (i.e. missing /ets/hosts entry etc):

1) Set /etc/hosts on hbase server and client
on hbase/zookeeper quorum server
>hostname myhostname.example.com
>vi /etc/hosts
127.0.0.1       localhost
127.0.1.1       myhostname.example.com myhostname

on the client machine:
>vi /etc/hosts
127.0.0.1       localhost
<zookeeper ip> myhostname.example.com myhostname

2) set JAVA_HOME 
e.g. on Mac OSX Lion:
>export JAVA_HOME=`/usr/libexec/java_home -v 1.7`

3) get hbase
Note: For latest Hbase release see: http://hbase.apache.org/
>wget http://apache.spinellicreations.com/hbase/stable/hbase-0.98.5-hadoop2-bin.tar.gz
>tar xvzf hbase-0.98.5-hadoop2-bin.tar.gz

4) get phoenix
>git clone -b 4.0 https://github.com/apache/phoenix.git
>cd phoenix

5) build phoenix
> mvn package -DskipTests -Dhadoop.profile=2

6) copy phoenix core jar to hbase lib directory
> cp phoenix-core/target/phoenix-core-4.1.0-SNAPSHOT.jar ../hbase-0.98.5-hadoop2/lib/

7) Start hbase in standalone mode
>cd ../hbase-0.98.5-hadoop2/
>bin/start-hbase.sh 
check if running: http://localhost:60010

8) Create table in phoenix
>cd ../phoenix
>bin/sqlline.py localhost
>>CREATE TABLE test.orders ( id BIGINT not null primary key, name VARCHAR);
>>UPSERT INTO TEST.ORDERS(ID,NAME) VALUES(123,'foo’);
>>UPSERT INTO TEST.ORDERS(ID,NAME) VALUES(456,'bar’);
>>SELECT * FROM test.orders;



--
This message was sent by Atlassian JIRA
(v6.2#6252)