You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "James Taylor (JIRA)" <ji...@apache.org> on 2015/02/10 20:54:11 UTC

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

    [ https://issues.apache.org/jira/browse/PHOENIX-1194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14314781#comment-14314781 ] 

James Taylor commented on PHOENIX-1194:
---------------------------------------

[~mujtabachohan] - what do you think of adding this to the site? Does it make sense? Or maybe just part of it? Or is it all already there in one place or another?

> 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
>            Assignee: Mujtaba Chohan
>            Priority: Trivial
>
> Pls add minimal install instructions including standalone hbase setup:
> 1) Set hostname (if it's not already set)
> on hbase/zookeeper quorum server:
> $hostname -f 
> if it returns "localhost" set hostname to e.g. "myhostname.example.com"
> $hostname myhostname.example.com
> 2) Update /etc/hosts on hbase/zookeeper quorum server
> $vi /etc/hosts
> <zookeeper ip>   myhostname.example.com myhostname
> 3) Update /etc/hosts on client host (if you run phoenix client on a separate machine):
> $vi /etc/hosts
> <zookeeper ip> myhostname.example.com myhostname
> 4) set JAVA_HOME: 
> e.g. on Mac OSX Lion:
> $export JAVA_HOME=`/usr/libexec/java_home -v 1.7`
> 5) 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
> 6) get phoenix:
> $git clone -b 4.0 https://github.com/apache/phoenix.git
> 7) build phoenix:
> $cd phoenix
> $mvn package -DskipTests -Dhadoop.profile=2
> Note: also see http://phoenix.apache.org/building.html
> 8) 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/
> 9) Start hbase in standalone mode:
> $cd ../hbase-0.98.5-hadoop2/
> $bin/start-hbase.sh 
> check if running: http://localhost:60010
> create a table using hbase shell:
> $hbase shell
> hbase> create 'demo', 'cf'
> 10) Create a table in phoenix using sqlline:
> $cd ../phoenix
> $bin/sqlline.py localhost
> phoenix>CREATE TABLE test.orders ( id BIGINT not null primary key, name VARCHAR);
> phoenix>UPSERT INTO TEST.ORDERS(ID,NAME) VALUES(123,'foo’);
> phoenix>SELECT * FROM test.orders;
> Notes: 
> - For distributed Hbase setup see project home page: http://hbase.apache.org/book/standalone_dist.html
> - For Hbase setup from Cloudera CDH see: http://www.cloudera.com/content/cloudera-content/cloudera-docs/CDH5/latest/CDH5-Installation-Guide/cdh5ig_hbase_installation.html
> - For Hbase setup from Hortonworks HDP see: http://docs.hortonworks.com/HDPDocuments/HDP1/HDP-1.2.0/bk_installing_manually_book/content/rpm-chap9.html
> Additional references:
> http://phoenix.apache.org/Phoenix-in-15-minutes-or-less.html



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)