Use Oracle Database with Liferay

Liferay natively allows the use of OracleDB as main data source. If you ever wanted to use a more scalable database and professional for your Liferay installation, here is how.

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

  • Stop the stack servers:

      $ sudo /opt/bitnami/ stop
  • Edit the /opt/bitnami/apache-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

  • Start the servers again:

      $ sudo /opt/bitnami/ restart tomcat

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

Step 4 (Optional): Disable MySQL

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

    $ sudo /opt/bitnami/ stop mysql
    $ sudo sed -i '1i exit 0' /opt/bitnami/mysql/scripts/
Last modification April 8, 2020