Installing dependencies for Hue before upgrading to CDP

If you want to use PostgreSQL as a backend database to store Hue metadata, job and query history, and account information, then you must install PostgreSQL server, Python 2.7.5, and the Python psycopg2 package on the Hue hosts to connect Hue to the PostgreSQL database.

On RHEL 7 and CentOS 7, Python version 2.7.5 is included by default. Verify by running the following command:
source /opt/rh/python275/enable
python --version
Oracle Linux 7 includes Python version 2.7. Install Python 2.7.5 as follows:
  1. Download the Software Collections Library repository:
    sudo wget -O /etc/yum.repos.d/public-yum-ol7.repo http://yum.oracle.com/public-yum-ol7.repo
  2. Edit /etc/yum.repos.d/public-yum-ol7.repo and make sure that enabled is set to 1, as follows:
    [ol7_software_collections]
    name=Software Collection Library release 3.0 packages for Oracle Linux 7 (x86_64)
    baseurl=http://yum.oracle.com/repo/OracleLinux/OL7/SoftwareCollections/x86_64/
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
    gpgcheck=1
    enabled=1

    For more information, see Installing the Software Collection Library Utility From the Oracle Linux Yum Server in the Oracle documentation.

  3. Install the Software Collections utilities:
    sudo yum install scl-utils
  4. Install Python 2.7.5:
    sudo yum install python275
  5. Verify that Python 2.7.5 is installed:
    source /opt/rh/python275/enable
    python --version

Installing the psycopg2 Python Package

RHEL 7
  1. Install the python-pip package:
    sudo yum install python-pip
  2. Install psycopg2 2.7.5 using pip:
    sudo pip install psycopg2==2.7.5 --ignore-installed
RHEL 8
  1. Install the python-pip package:
    yum install python2
  2. Install psycopg2 2.7.5 using pip:
    alternatives --set python /usr/bin/python2
Ubuntu 18 / Debian
  1. Install the python-pip package as follows:
    sudo apt-get install python-pip
  2. Install psycopg2 2.7.5 using pip:
    sudo pip install psycopg2==2.7.5 --ignore-installed
Ubuntu 20
  1. Add the APT repository to automatically get the latest resources.
    sudo add-apt-repository universe curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
  2. Install the python-pip package.
    apt install python2
  3. Check the pip2 version.
    pip2 --version
  4. Install psycopg2 2.7.5 using pip:
    pip2 install psycopg2==2.7.5 --ignore-installed
SLES 12
Install the python-psycopg2 package as follows:
sudo zypper install python-psycopg2