This page last changed on Sep 15, 2011 by pwatson.
This document provides instructions for setting up Confluence for use with a PostgreSQL database. Please check the Known Issues for PostgreSQL before you start. On this page:
1. Install PostgreSQL | To install PostgreSQL,
- Download the database software and installer from the PostgreSQLdownload site and save it to your desktop. Choose the package that matches your operating system. Where available, choose the One Click Installer. These instructions assume you will use the One Click Installer. For example:
- Run the installer. Please note the following information when installing PostgreSQL:
- The password that you are prompted to provide during the installation process is for the 'postgres' account, which is the db root level account.
- The default port for PostgreSQL is 5432. If you decide to change the default port, please ensure that your new port number does not conflict with any services running on that port. You will also need to remember to update all further mentions of db port.
- Choose the locale that best fits your geographic location, when prompted to enter a locale.
- Do not launch Stack Builder at the completion of the installer.
- PostgreSQL is now installed on your machine.
|
2. Create a User and a Database 3. Configure Confluence to use the PostgreSQL Database | Once you have installed and set up PostgreSQL, you will need to configure Confluence to use the PostgreSQL database. To configure Confluence to use PostgreSQL,
- Install Confluence, if you haven't done so already. Ensure that you download Confluence Standalone, not the evaluation installer.
- Ensure that Confluence is stopped (for example, by ensuring that the application server or service which is running Confluence has been stopped or terminated).
Install the database drivers, if needed:  | PostgreSQL JDBC Drivers bundled with Confluence The JDBC drivers for this database are bundled with Confluence. You do not have to download or install any JDBC drivers to use this database with Confluence, if you are using a direct JDBC connection. If you are connecting via a datasource, you will still need to download and install the drivers manually. See Database JDBC drivers for more information on the bundled JDBC drivers.
Note: Confluence only bundles the JDBC 3 driver which will work under the 1.6 JVM. However, if you are using Java 6 and want to use the JDBC 4 driver, you can download it via Database JDBC drivers and install it as described below. You will need to remove the existing PostgreSQL JDBC 3 driver (e.g. postgresql-8.4-701.jdbc3), if you do want to use the JDBC 4 driver. |
- If you are configuring a datasource to connect to your PostgreSQL database, you will need to place the jar file in
<confluence install> /WEB-INF/lib (for Confluence 2.10 onwards) or <confluence install>/common/lib (for earlier versions). Information and links to the appropriate database drivers are available on Database JDBC drivers.
Windows renames .jar extensions to .zip! Just rename it back to .jar. You'll have to set your folder options to view hidden file extensions if you can't rename it without changing the file type (Tools >> Folder Options >> View >> Uncheck "Hide Extensions for known file types."
- Start Confluence and after entering your license code on the 'Confluence Setup Wizard' page, click 'Custom Installation'. The 'Choose a Database Configuration' page will display.
- Select 'PostgreSQL' and click 'External Database'. The 'Configure Database' page will display.
- Choose your desired database connection method (please note that if you choose to connect via datasource, you will need to install the appropriate database drivers as described in the previous step).
Enter your PostgreSQL database setup details (as defined in the previous step above):
  | Connecting to an SSL Database
Simply add ssl=true parameter in the Database URL, for example: |
 | If the server that is hosting the PostgreSQL database is not the same server as Confluence, then please ensure that the confluence server can contact the database server and also refer to the PostgreSQL documentation on how to set up pg_hba.conf If the pg_hba.conf file is not set properly, remote communication to the PostgresSQL server will fail. |
 | Running SQL Queries
For ongoing maintenance of your server, you can continue to use PGAdmin as your SQL browser. |
|
Troubleshooting | - Known Issues for PostgreSQL contains common issues encountered when setting up your PostgreSQL database to work with Confluence.
- If you are unable to connect to the database from Confluence and they are on different machines, most likely you have a firewall in between the two machines or your pg_hba.conf file is misconfigured. Verify that your firewall is set to allow connections through 5432 or double check your hba configuration
- If Confluence is complaining that it's missing a class file, you might have forgotten to place the jdbc driver in the WEB-INF/lib folder or possibly have placed it in the wrong folder.
- If none of the above describes your issue, please create a support ticket at http://support.atlassian.com and be sure to include your logs (found in confluence-install/logs and confluence-data/logs).
|
|