>>上传安装包至 /opt/soft 目录
>>创建安装目录
mkdir /opt/module/phoenix
>>解压安装包
tar -zxvf apache-phoenix-4.14.2-Hbase-1.3-bin.tar.gz -C /opt/module/phoenix/ --strip-components 1
>>在 /opt/module/phoenix/bin目录下拷贝下列xml文件
cd /opt/module/phoenix/bin
ln -s /opt/module/hadoop-2.7.2/etc/hadoop/hdfs-site.xml
ln -s /opt/module/hbase/conf/hbase-site.xml
ln -s /opt/module/hadoop-2.7.2/etc/hadoop/core-site.xml
>>编辑 hbase-site.xml 文件
phoenix.query.timeoutMs
1800000
hbase.rpc.timeout
1200000
hbase.client.scanner.timeout.period
1200000
hbase.rootdir
hdfs://hadoop103:9000/Hbase
hbase.cluster.distributed
true
hbase.master.port
16000
hbase.zookeeper.quorum
hadoop102,hadoop103,hadoop104
hbase.zookeeper.property.dataDir
/opt/module/zookeeper-3.4.10/zkData
phoenix.schema.isNamespaceMappingEnabled
true
phoenix.schema.mapSystemTablesToNamespace
true
hbase.table.sanity.checks
false
hbase.regionserver.wal.codec
org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec
hbase.region.server.rpc.scheduler.factory.class
org.apache.hadoop.hbase.ipc.PhoenixRpcSchedulerFactory
hbase.rpc.controllerfactory.class
org.apache.hadoop.hbase.ipc.controller.ServerRpcControllerFactory
hbase.master.loadbalancer.class
org.apache.phoenix.hbase.index.balancer.IndexLoadBalancer
hbase.coprocessor.master.classes
org.apache.phoenix.hbase.index.master.IndexMasterObserver
>>编辑 /etc/profile
#phoenix environment
export PHOENIX_HOME=/opt/module/phoenix
export PHOENIX_CLASSPATH=$PHOENIX_HOME
export PATH=$PATH:$PHOENIX_HOME/bin
>>重新编译 /etc/profile 文件
source /etc/profile
>>启动Hadoop,Zookeeper,Hbase
start-dfs.sh
start-yarn.sh
zkServer.sh start
start-hbase.sh
>>使用 sqlline.py
sqlline.py hadoop102,hadoop103,hadoop104:2181
>>查询所有表
!tables