Installing and configuring MariaDB on RHEL 8

The steps for installing MariaDB versions 10.3 and 10.4 on RHEL 8 on a CDP cluster host are different.

  1. SSH into the Hue server host.
  2. Remove the MariaDB GSSAPI server.
    yum remove mariadb-gssapi-server
  3. Download the MariaDB repository:
    curl -LsS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | bash -s – --mariadb-server-version="mariadb-[***VERSION***]"
    Replace [***VERSION***] with the actual MariaDB version.
  4. Install the MariaDB client and server:
    yum install MariaDB-server MariaDB-client MariaDB-common MariaDB-devel mariadb-libs
  5. Run the following stream editor command to filter and transform the text:
    sed '/st_mysql_options options;/a unsigned int reconnect;' /usr/include/mysql/mysql.h
  6. Install the MySQL Python interface:
    pip install MySQL-python --force-reinstall --ignore-installed
  7. Grant read and execute permissions to all users and write access to the admin user:
    chmod -R 755 /usr/lib64/python2.7/site-packages/MySQLdb /usr/lib64/python2.7/site-packages/MySQL_python*; chmod 755 /usr/lib64/python2.7/site-packages/_mysql*
  8. After installing the CDP parcels, copy the site packages:
    copy /usr/lib64/python2.7/site-packages/_mysql.so /opt/cloudera/parcels/CDH/lib/hue/build/env/lib/python2.7/site-packages/MySQL_python-1.2.5-py2.7-linux-x86_64.egg/
After installing the MariaDB server, create the Hue database and configure MariaDB as the backend database for Hue.