Chapter 7. Installing Phoenix

To install the Phoenix RPM:

  1. Install Phoenix on all HBase Region servers:

    • RHEL/CentOS/Oracle Linux:

      yum install phoenix
    • For SLES:

      zypper install phoenix
    • For Ubuntu:

      apt-get install phoenix
  2. Link the Phoenix core jar file to the HBase Master and Region Servers:

    ln -sf /usr/lib/phoenix/lib/phoenix-core-4.0.0.$version.jar /usr/lib/hbase/lib/phoenix.jar

    where $version is the five-digit HDP version of the Phoenix jar. For example,

  3. Add the following configuration to hbase-site.xml on all HBase nodes, the Master Server, and all Region Servers:


  4. Restart the HBase Master and Region Servers.

  5. Add the phoenix-4.0-client.jar to the classpath of any Phoenix client.

Configuring Phoenix for Security

Phoenix administrators must perform the following additional steps to configure Phoenix to run in a secure Hadoop cluster:

  1. Execute the following command to link the HBase configuration file with the Phoenix libraries:

    ln -sf <HBASE_CONFIG_DIR>/hbase-site.xml <PHOENIX_HOME>/bin/hbase-site.xml

  2. Execute the following command to link the Hadoop configuration file with the Phoenix libraries:

    ln -sf <HADOOP_CONFIG_DIR>/core-site.xml <PHOENIX_HOME>/bin/core-site.xml


Phoenix administrators may safely ignore the following warnings when running the and Phoenix scripts in secure mode:

14/04/19 00:56:24 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable

14/04/19 00:56:24 WARN util.DynamicClassLoader: Failed to identify the fs of dir hdfs://<HOSTNAME>:8020/apps/hbase/data/lib, ignored No FileSystem for scheme: hdfs

Smoke Testing Phoenix

Execute the following commands to verify your installation on an unsecure cluster:


The command assumes an unsecure cluster with the following values for configuration parameters:

  • hbase.zookeeper.quorum=localhost


  • zookeeper.znode.parent=/hbase-unsecure

For a secure cluster, the zookeeper.znode.parent configuration property requires a different value:

  • zookeeper.znode.parent=/hbase

./ localhost:2181:/hbase-unsecure /usr/share/doc/phoenix-4.0.0.$version/examples/WEB_STAT.sql /usr/share/doc/phoenix-4.0.0.$version/examples/WEB_STAT.csv 

where $version is the four-digit HDP version. For example,

Troubleshooting Phoenix

You may encounter a runtime exception similar to the following:

Exception in thread "main" java.lang.IllegalAccessError: class cannot access its superclass
     at java.lang.ClassLoader.defineClass1(Native Method)
     at java.lang.ClassLoader.defineClass(

To resolve this issue, place hbase-protocol*.jar immediately after hbase-site.xml in the HADOOP_CLASSPATH environment variable, as shown in the following example:


loading table of contents...