This article is in process of being moved over from my Google Sites wiki
Install Required Libraries
In order to render thumbnails ect... you need certain x-windows libraries. Refer to the list from the Confluence install instructions and make sure to use the list matching your version of Confluence.
Because the list changes between each release, I recommend documenting what you installed. Then when upgrading, remove all the required libraries from the previous Confluence release and then installing the required libraries for the new Confluence release.
PostgreSQL
Confluence comes with its own embedded database called hsqldb. However, for real production use you should use a full fledged database.
Install PostgreSQL on Ubuntu
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,
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.
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,
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
Download the tar.gz install package and decompress it,
su - svradm # if you are not already gunzip confluence-3.2-std.tar.gz tar -xvpf confluence-3.2-std.tar su - bhitch # log in as a staff user that can run sudo # Use specific version numbers. This will make upgrade easier in the future. sudo mv ./confluence-3.2-std /opt
Next, we make the symbolic link directory. Scripts and anything else you do will use the symbolic link directory. When the new version of Confluence comes along you have various options for upgrading.
su - bhitch # log in as a staff user that can run sudo cd /opt # make a symbolic link which scripts and commands can run against sudo ln -s ./confluence-3.2-std ./confluence
Manually Setup JRE
I use a manual Java setup with an instance of Java specifically for the application.
Log in as your staff account which has sudo access to perform the actual move to /opt/
cd /home/serveradmin sudo mv ./jre1.6.0_16/ /opt/confluence/java
Configure Confluence to Use JRE
The downloaded Confluence package is powered by Tomcat. You can specify Tomcat use a specific java directory by creating a setenv file,
...
Configure Data Directory
Also we need to create the home directory,
cd ~ mkdir confluence-data # Don't use specific version numbers here because the data will actually be upgraded su - bhitch # to get sudo access sudo mv confluence-data /opt/
Set the home (data) directory by modifying the files, ../confluence/WEB-INF/classes/confluence-init.properties, go to the bottom of the file,
# confluence.home=c:/confluence/data
confluence.home=/opt/confluence-data/