This documentation relates to an earlier version of Bamboo.
View

Unknown macro: {spacejump}

or visit the current documentation home.

はじめる前に

If connecting to a remote PostgreSQL server (i.e. if your PostgreSQL server is not installed locally on your Bamboo server host system), please ensure that your data/postgresql.conf and data/pg_hba.conf files are configured to accept remote TCP connections from the Bamboo server's IP addess. Refer to the PostgreSQL documentation for the listen_addresses value in the postgresql.conf file, as well as documentation for the pg_hba.conf file, for enabling TCP connections to your PostgreSQL server. (Note that you will need to restart PostgreSQL once any changes to these files have been made.) See:

First, you need to choose how you will connect to the Postgres database. Please follow the instructions for your chosen method:

JDBC is generally simpler, and is therefore the recommended method.


Connecting via JBDC

To connect Bamboo to a Postgres database, via JDBC,


  1. Put the Postgres JDBC driver jar file (download here) into your application server's classpath:
    • For the Bamboo Standalone distribution, copy the jar file into the webapp/WEB-INF/lib directory.
    • For the Bamboo EAR-WAR distribution, the location will depend on which application server you are using.
  2. At Step 2 of the Bamboo Setup Wizard, choose 'External Database' and select 'Postgres' from the list.
  3. The 'Select Database Connection' screen will appear. Select 'Direct JDBC connection'.
  4. The 'Setup JDBC Connection' screen will appear as shown in the screenshot below.
    • 'Driver Class Name' — Type the following: org.postgresql.Driver
    • 'Database URL' — Type the URL where Bamboo will access your database. For syntax, please see the Postgres JDBC driver documentation.
    • 'User Name' — Type the username that Bamboo will use to access your database.
    • 'Password' — Type the password (if required) that Bamboo will use to access your database.
  5. Select the 'Overwrite existing data' checkbox if you wish Bamboo to overwrite any tables that already exist in the database.
  6. Go to Step 3 of the Setup Wizard.

Screenshot 1: 'Setup JDBC Connection (Postgres)'



Connecting via a datasource


To connect Bamboo to a Postgres database, via a datasource,

  1. Configure a datasource in your application server (consult your application server documentation for details). For the syntax of the JDBC URL to use, please see the Postgres JDBC driver documentation.
  2. At Step 2 of the Bamboo Setup Wizard, choose 'External Database' and select 'Postgres' from the list.
  3. The 'Select Database Connection' screen will appear. Select 'Connect via a datasource (configured in the application server)'.
  4. The 'Setup Datasource Connection' screen will appear as shown in the screenshot below. In the 'JNDI name' field, type the JNDI name of your datasource, as configured in your application server.
    (warning) If java:comp/env/jdbc/DataSourceName doesn't work, try jdbc/DataSourceName (and vice versa).
  5. Select the 'Overwrite existing data' checkbox if you wish Bamboo to overwrite any tables that already exist in the database.
  6. Go to Step 3 of the Setup Wizard.

Screenshot 2: 'Setup Datasource Connection'