Howto install roundcube mysql > postgresql on Centos 6.5

Recently I installed a basic webserver with mysql and phpmyadmin and roundcube. However I changed my mind and wanted to use postgresql (9.3).

For the basic installation of Postgresql 9.3 on Centos 6.5, please refer to my other guide.
This guide will show you how to backup your old roundcube database and import it back to roundcube.

Basic installation of Postgresql 9.3:>
*currently my hyperlink tag does not work :/

* Work as root
* Have postgresql 9.3 installed
* Have enough space to backup existing database(s)
* Have Apache 2, PHP(5) + Mysql installed

—>Make sure you have file with usernames and passwords of the users from the specific databases <---

Step 1: Backing up the old database from mysql:

If you want to run the process in the background with an output to a textlog use the following command:

Step 2: Import the postgresql roundcube sql file into postgresql 9.3:

Step 3: Restoring the roundcube sql dump to postgresql:

I got some errors:

I continued since mysql works a little different then postgresql.

Step 4: Changing the database connection in roundcube config:

Step 5: Check if it works!
Navigate to your webserver / webmail. Typically something like or

Check if you can log in and if everything is working correctly

If you get the following error:

DB Error in /usr/share/roundcubemail/program/lib/Roundcube/rcube_db.php (158): could not find driver
Warning: session_start(): Cannot send session cookie – headers already sent in /usr/share/roundcubemail/program/lib/Roundcube/rcube_session.php on line 108 Warning: session_start(): Cannot send session cache limiter – headers already sent in /usr/share/roundcubemail/program/lib/Roundcube/rcube_session.php on line 108 DB Error: could not find driver

With underneath:


Unable to connect to the database!
Please contact your server-administrator.

You are missing the pgsql driver for php. This is easily solved!
Simply perform the following command:

Refresh your browser and you should be good to go!

Leave a Reply

Your email address will not be published. Required fields are marked *