Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updated to new Confluence 3.5 bash option for code display.

...

Download the tar.gz install package and decompress it,

Code Block
langlanguagehtmlbash
su - serveradmin # 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 home/serveradmin/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.

Code Block
langlanguagehtmlbash
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

...

Log in as your staff account which has sudo access to perform the actual move to /opt/

Code Block
langlanguagehtmlbash
cd /home/serveradmin
sudo mv ./jdk1.6.0_16/ /opt/confluence/java # moves and renames the directory in one step

...

Also we need to create the home directory,

Code Block
langlanguagehtmlbash
su - serveradmin
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 /home/serveradmin/confluence-data /opt/

...

Create the confluence database admin account by typing in these commands,

No Formatcode
languagesql
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.

No Formatcode
languagesql
CREATE DATABASE confluencedb
WITH ENCODING='UTF8'
OWNER=confluencedbuser
CONNECTION LIMIT=-1;

Finally quit the PostgreSQL prompt,

No Formatcode
languagesql
\q
Note

The name of the database is different than in the confluence documentation. Rather than the database name confluence, we use confluencedb to clearly designate a database.

...

Confluence 3.2 does include a JDBC driver for PostgreSQL. However, because we are using the newest version of Java, download the JDBC4 driver from the PostgreSQL website and place the jar file into the /opt/confluence/confluence/WEB-INF/lib/ directory. Then delete the old jdbc3 driver.

Code Block
langlanguagehtmlbash
su - serveradmin
wget http://jdbc.postgresql.org/download/postgresql-9.0-801.jdbc4.jar
rm /opt/confluence/confluence/WEB-INF/lib/postgresql-8.4-701.jdbc3.jar

...

Tip

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

Code Block
langlanguagehtmlbash
cd /opt/confluence/bin/
./startup.sh

...

Start by trying to perform a normal shutdown,

Code Block
langlanguagehtmlbash
su - svradm
/opt/confluence/bin/shutdown.sh

Next ensure that Confluence actually shut down,

Code Block
langlanguagehtmlbash
ps -ef | grep java | grep confluence

The resulting output shows all your java processes. Look for you Confluence java process which looks something similar to below,

Code Block
langlanguagehtmlbash
svradm    2364     1  0 01:00 ?        00:02:37 /opt

If it does not exist then the shutdown occurred properly. However, if it still exists try running ps again in a few minutes. If it still exists after that you need to kill the process,

Code Block
langlanguagehtmlbash
kill 2364 # Note change 2364, to the process ID that you see on your screen.

...

Add the Connector directive <Connector port="8009" protocol="AJP/1.3 "URIEncoding="UTF-8" /> just above the Engine directive,

Code Block
langlanguagehtmlxml
useURIValidationHack="false" URIEncoding="UTF-8"/>

        <Connector port="8009" protocol="AJP/1.3" URIEncoding="UTF-8" />

        <Engine name="Standalone"

...

Modify the bundled Confluence Tomcat Context directive and change the attribute path="" to path="/wiki",

Code Block
langlanguagehtmlbash
<Context path="/wiki" docBase="../confluence" debug="0" reloadable="false" useHttpOnly="true">

...