Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Install PostgreSQL6.0 PostgreSQL on Ubuntu.

Configure PostgreSQL

These are abridged instructions from Confluences wiki on setting up an external database.

Rather than use the gui we can do everything from the command line. I derived the commands from the visual guide by Confluence.

First log into the PostgreSQL prompt as explain in PostgreSQL on Ubuntu.

Create the confluence database admin account,

Code Block
langhtml
CREATE ROLE confluencedbuser LOGIN ENCRYPTED PASSWORD 'putYourPasswordHere'
  NOINHERIT
   VALID UNTIL 'infinity';
COMMENT ON ROLE confluencedbuser IS 'Account used by the Confluence application.';

Create the database. I changed the default name confluence to confluencedb. As a coder it will be easier for me later one.

Code Block
langhtml
CREATE DATABASE confluencedb
  WITH ENCODING='UTF8'
       OWNER=confluencedbuser
       CONNECTION LIMIT=-1;

Confluence 3.2 does include a JDBC driver for PostgreSQL. HOWEVER, because we are using the newest Java download the JDBC4 driver from the PostgreSQL website.

First delete the jdbc3 driver,

Code Block
langhtml
rm /opt/confluence/confluence/WEB-INF/lib/postgresql-8.4-701.jdbc3.jar

Then, place the JDBC Driver postgresql-8.4-701.jdbc4.jar into the <confluence-install-path>/confluence/WEB-INF/lib folder.

Install Confluence

Core Package

...

The downloaded Confluence package is powered by Tomcat. You can specify Tomcat use a specific java directory by creating a setenv file ,as described at Running Tomcat with a specific JRE version.

Warning

Take from Tomcat 6 instructions, but pull out into separate page.

...

Panel

# confluence.home=c:/confluence/data
confluence.home=/opt/confluence-data/

Configure PostgreSQL

These are abridged instructions from Confluences wiki on setting up an external database.

Rather than use the gui we can do everything from the command line. I derived the commands from the visual guide by Confluence.

First log into the PostgreSQL prompt as explain in PostgreSQL on Ubuntu.

Create the confluence database admin account,CREATE ROLE confluencedbuser LOGIN ENCRYPTED PASSWORD 'putYourPasswordHere'
NOINHERIT
VALID UNTIL 'infinity';
COMMENT ON ROLE confluencedbuser IS 'Account used by the Confluence application.';
Create the database.
CREATE DATABASE confluencedb
WITH ENCODING='UTF8'
OWNER=confluencedbuser
CONNECTION LIMIT=-1;

Note

I changed the name used in the confluence documentation from confluence to confluencedb. As a coder it will be easier for me later one.

Confluence 3.2 does include a JDBC driver for PostgreSQL. However, because we are using the newest Java download the JDBC4 driver from the PostgreSQL website.

First delete the jdbc3 driver,rm /opt/confluence/confluence/WEB-INF/lib/postgresql-8.4-701.jdbc3.jar
Then, place the JDBC Driver postgresql-8.4-701.jdbc4.jar into the <confluence-install-path>/confluence/WEB-INF/lib folder.

Starting the Confluence Service

We will now start Confluence for the first time to initialize everything.

Tip

If using virtual machine technology, now would be a good time to take a snapshot of the system.

Code Block
langhtml
cd /opt/confluence/bin/
./startup.sh
Note

In the Confluence notes they sometimes use catalina.sh instead of startup.sh. Investigate the difference.

Next, hit the website with a browser,http://localhost:8080/ or change localhost to the ip address if you are not launching the browser off of the server.

The very first Confluence starts it asks you to make selections,

Warning

Everything below here eeds to be flushed out better.

  1. Choose custom
  2. Makes sure PostgreSQL is selected (it should be by default) click External Database.
  3. Direct JDBC
  4. Fill out the form,
    1. Database URL: Change the default line, jdbc:postgresql://localhost:5432/confluence to jdbc:postgresql://localhost:5432/confluencedb
    2. User: confluencedbuser
    3. Pass: the pasword you used earlier to create the user
  5. The intial user will be called "Server Admin" with user name serveradmin

Optimize Confluence

There are some basic tasks we should do before getting other people on board.

Once logged in go to, Browser, Confluence Admin. There are tasks there that Confluence recommends, the most important to us being,

  1. disable automatic backup
  2. setup the mail

Connect Apache to Confluence using Mod_JK

To connect Apache to Confluence see my article ...

Stoping the Service

There appears to be a problem with shutting down the server. Read up on this. What I currently do is check to see if the service is running,

ps -ef | grep java | grep confluence

Then try the ./shutdown.sh

ps -ef | grep java | grep confluence

Which usually shows it is still running so then I do,

kill #### where #### is the process id.