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:
- 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
- Edit
/etc/yum.repos.d/public-yum-ol7.repo
and make sure thatenabled
is set to1
, 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.
- Install the Software Collections
utilities:
sudo yum install scl-utils
- Install Python
2.7.5:
sudo yum install python275
- Verify that Python 2.7.5 is installed:(On Oracle Linux):
source /opt/rh/python275/enable python --version
(On RHEL or CentOS):python --version
Installing the psycopg2
Python Package
- RHEL 7
-
- Install the
python-pip
package:sudo yum install python-pip
- Install
psycopg2
2.7.5 usingpip
:sudo pip install psycopg2==2.7.5 --ignore-installed
- Install the
- RHEL 8
-
- Install the
python-pip
package:yum install python2
- Install
psycopg2
2.7.5 usingpip
:alternatives --set python /usr/bin/python2
- Install the
- Ubuntu 18 / Debian
-
- Install the
python-pip
package as follows:sudo apt-get install python-pip
- Install
psycopg2
2.7.5 usingpip
:sudo pip install psycopg2==2.7.5 --ignore-installed
- Install the
- Ubuntu 20
-
- 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
- Install the
python-pip
package.apt install python2
- Check the pip2 version.
pip2 --version
- Install
psycopg2
2.7.5 usingpip
:pip2 install psycopg2==2.7.5 --ignore-installed
- Add the APT repository to automatically get the latest
resources.
- SLES 12
- Install the
python-psycopg2
package as follows:sudo zypper install python-psycopg2