hbase部署请参考这篇博客:Hbase集群的详细安装配置教程
1、解压缩
[lqs@nwh120 module]$ cd ../software/
[lqs@nwh120 software]$ tar -zxvf apache-phoenix-5.0.0-HBase-2.0-bin.tar.gz -C ../module/
2、该名称
[lqs@nwh120 module]$ mv apache-phoenix-5.0.0-HBase-2.0-bin/ phoenix-5.0.0-HBase-2.0
3、复制server包并拷贝到各个节点的hbase/lib
[lqs@nwh120 hbase-2.0.5]$ cd lib/
[lqs@nwh120 lib]$ cp /home/lqs/module/phoenix-5.0.0-HBase-2.0/phoenix-5.0.0-HBase-2.0-server.jar ./
[lqs@nwh120 lib]$ cd …
[lqs@nwh120 hbase-2.0.5]$ cp lib/phoenix-5.0.0-HBase-2.0-server.jar
4、配置环境变量
#PHOENIX
export PHOENIX_HOME=/home/lqs/module/phoenix-5.0.0-HBase-2.0
export PHOENIX_CLASSPATH=$PHOENIX_HOME
export PATH=$PATH:$PHOENIX_HOME/bin
使刚刚配置的环境变量生效
#打开环境变量配置文件
[lqs@nwh120 hbase-2.0.5]$ sudo vim /etc/profile.d/my-env.sh
#刷新环境变量
[lqs@nwh120 hbase-2.0.5]$ source /etc/profile
5、重启hbase
[lqs@nwh120 hbase-2.0.5]$ stop-hbase.sh
stopping hbase..........
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/lqs/module/hbase-2.0.5/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/lqs/module/hadoop-3.1.3/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
[lqs@nwh120 hbase-2.0.5]$ start-hbase.sh
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/lqs/module/hbase-2.0.5/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/lqs/module/hadoop-3.1.3/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
running master, logging to /home/lqs/module/hbase-2.0.5/logs/hbase-lqs-master-nwh120.out
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/lqs/module/hbase-2.0.5/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/lqs/module/hadoop-3.1.3/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
nwh120: running regionserver, logging to /home/lqs/module/hbase-2.0.5/logs/hbase-lqs-regionserver-nwh120.out
nwh121: running regionserver, logging to /home/lqs/module/hbase-2.0.5/bin/../logs/hbase-lqs-regionserver-nwh121.out
nwh122: running regionserver, logging to /home/lqs/module/hbase-2.0.5/bin/../logs/hbase-lqs-regionserver-nwh122.out
nwh120: SLF4J: Class path contains multiple SLF4J bindings.
nwh120: SLF4J: Found binding in [jar:file:/home/lqs/module/hbase-2.0.5/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
nwh120: SLF4J: Found binding in [jar:file:/home/lqs/module/hadoop-3.1.3/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
nwh120: SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
nwh120: SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
nwh122: SLF4J: Class path contains multiple SLF4J bindings.
nwh122: SLF4J: Found binding in [jar:file:/home/lqs/module/hbase-2.0.5/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
nwh122: SLF4J: Found binding in [jar:file:/home/lqs/module/hadoop-3.1.3/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
nwh122: SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
nwh122: SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
nwh121: SLF4J: Class path contains multiple SLF4J bindings.
nwh121: SLF4J: Found binding in [jar:file:/home/lqs/module/hbase-2.0.5/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
nwh121: SLF4J: Found binding in [jar:file:/home/lqs/module/hadoop-3.1.3/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
nwh121: SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
nwh121: SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
nwh121: running master, logging to /home/lqs/module/hbase-2.0.5/bin/../logs/hbase-lqs-master-nwh121.out
nwh121: SLF4J: Class path contains multiple SLF4J bindings.
nwh121: SLF4J: Found binding in [jar:file:/home/lqs/module/hbase-2.0.5/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
nwh121: SLF4J: Found binding in [jar:file:/home/lqs/module/hadoop-3.1.3/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
nwh121: SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
6、连接Phoenix(胖客户端)
[lqs@nwh120 bin]$ sqlline.py
瘦客户端
queryserver.py start
效果如下: