Use Oracle Database with Liferay

Liferay natively allows the use of OracleDB as main data source. If you ever wanted to use this database server for your Liferay installation, follow the steps below.

Step 1: Install JDBC drivers

If you haven’t installed the JDBC driver corresponding to the database server you want to connect, please follow the instructions on how to install the OracleDB driver.

Step 2: Change Liferay DB configuration

Edit the /opt/bitnami/tomcat/webapps/liferay/WEB-INF/classes/ file and set the following options:


Don’t forget to substitute all the database parameter placeholders with the corresponding values.

Step 3: Test the connection

Restart the Tomcat server for the changes to take effect:

    $ sudo /opt/bitnami/ restart tomcat

If everything was configured correctly, you should be able to log in to Liferay.

Step 4 (Optional): Disable the original database

To permanently disable the database included in the stack, so that it is never started and does not waste any resource, execute the commands below:

    $ sudo /opt/bitnami/ stop mariadb
    $ sudo mv /etc/monit/conf.d/mariadb.conf /etc/monit/conf.d/mariadb.conf.disabled
    $ sudo gonit reload
Last modification February 9, 2023