Installing JDBC Driver
You must install the required JDBC driver.
Loading Filters ...
Download, extract, and copy the renamed JDBC driver, to /usr/share/java/. If the target directory does not yet exist, you must create the directory.
Installing the Postgres JDBC Driver
- Install the PostgreSQL JDBC driver. If you would like to use the PostgreSQL JDBC
driver version shipped with the OS repositories, run the following command:
yum install postgresql-jdbc*
You can also download the JDBC driver from the official PostgreSQL JDBC Driver website – https://jdbc.postgresql.org.
- Rename the Postgres JDBC driver
.jar
file topostgresql-connector-java.jar
and copy it to the/usr/share/java
directory. The following copy command can be used if the Postgres JDBC driver.jar
file is installed from the OS repositories:cp /usr/share/java/postgresql-jdbc.jar /usr/share/java/postgresql-connector-java.jar
- Confirm that the .jar file is in the Java share directory:
ls /usr/share/java/postgresql-connector-java.jar
- Change the access mode of the .jar file to 644:
chmod 644 /usr/share/java/postgresql-connector-java.jar
Installing the MySQL JDBC Driver for MariaDB
The MariaDB JDBC driver is not supported. Follow the steps in this section to install and use the MySQL JDBC driver instead.
Install the JDBC driver on the Cloudera Manager Server host, as well as any other hosts running services that require database access.
OS | Command |
---|---|
RHEL |
|
SLES |
|
Ubuntu or Debian |
|
Installing the MySQL JDBC Driver
Install the JDBC driver on the Cloudera Manager Server host, as well as any other hosts running services that require database access.
OS | Command |
---|---|
RHEL |
|
SLES |
|
Ubuntu |
|
Installing the Oracle JDBC Connector
You must install the JDBC connector on the Cloudera Manager Server host and any other hosts that use a database.
- Download the Oracle JDBC Driver from the Oracle website. For example, the
version 6 JAR file is named
ojdbc6.jar
.For more information about supported Java versions, see Java Requirements.
To download the JDBC driver, visit the Oracle JDBC and UCP Downloads page, and click on the link for your Oracle Database version. Download the
ojdbc6.jar
file (orojdbc8.jar
, for Oracle Database 12.2). - Copy the Oracle JDBC JAR file to
/usr/share/java/oracle-connector-java.jar
. The Cloudera Manager databases and the Hive Mestastore database use this shared file. For example:sudo mkdir -p /usr/share/java sudo cp /tmp/ojdbc8-12.2.0.1.jar /usr/share/java/oracle-connector-java.jar sudo chmod 644 /usr/share/java/oracle-connector-java.jar