环境:centos6.5 jdk 1.8 hbase 0.98.13
hbase集群: 192.168.1.57 slave01 192.168.1.64 slaver02 192.168.1.65
http://archive.apache.org/dist/phoenix/phoenix-4.3.0/bin/
拷贝到需要做测试的服务器上(1.113),并对其解压缩
tar -xvf phoenix-4.3.0-bin.tar.gz
替换RegionServer以及h中的Phoenix依赖包,替换为新的版本
RegisonServer部署在hadoop104,hadoop108上,H部署在master上
[root@113 hadoop]# scp phoenix-4.3.0-bin/phoenix-4.3.0-server.jar root@:/opt/hbase/hbase-0.98.13-hadoop2/lib
[root@113 hadoop]# scp phoenix-4.3.0-bin/phoenix-4.3.0-server.jar root@slave01:/opt/hbase/hbase-0.98.13-hadoop2/lib
[root@113 hadoop]# scp phoenix-4.3.0-bin/phoenix-4.3.0-server.jar root@slave02:/opt/hbase/hbase-0.98.13-hadoop2/lib
重启RegionServer
登录到H节点(master),重启Hbase服务
[root@master bin]# ./stop-hbase.sh
[root@master bin]# ./start-hbase.sh
配置Client的CLASSPATH
登录安装phoenix的机器(113).配置客户机的CLASSPATH,包含phoenix-4.3.0-client.jar,配置/etc/profile文件
export PHOENIX_HOME=/root/hadoop/phoenix-4.3.0-bin
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:/PHOENIX_HOME/phoenix-4.3.0-client.jar
在客户端连上hbase集群
./sqlline.py 192.168.1.57,192.168.1.64,192.168.1.65:2181
添加WEB_STAT表进去
./sqlline.py 192.168.1.57,192.168.1.64,192.168.1.65:2181 ../examples/WEB_STAT.sql ../examples/WEB_STAT.csv ../examples/WEB_STAT_QUERIES.sql
```
![这里写图片描述](https://img-blog.csdn.net/20171116113307017?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvcWl1MjY1ODQzNDY4/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast)
(选装)squirrel安装(windows上phoneix可视化工具)
1、下载
下载地址:http://www.squirrelsql.org/
下载所需版本
2、安装
一直执行下一步
3、在安装目录的Lib下拷贝一下三个jar包进去
![这里写图片描述](https://img-blog.csdn.net/20171116113855120?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvcWl1MjY1ODQzNDY4/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast)
4、把phoenix驱动加入
填入
phoenix
jdbc:phoenix:master,slave01,slave02:2181
org.apache.phoenix.jdbc.PhoenixDriver
“`
点击Aliases,然后点击+号
Name自己起,选择刚才配置的Driver
点击OK连接成功
查看表