Page tree

Versions Compared

Key

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

...

Follow the section of Portable Tomcat 6.x & Instances described in the table below. Also make sure to adjust the file paths as shown,

SectionTomcatConfluence
Run Tomcat with a Specific Java Version Using setenv.shopt/apache/tomcat.1/bin/setenv.sh/opt/confluence/bin/setenv.sh
 

opt/apache/tomcat.1/bin/version.sh/opt/confluence/bin/bin/version.sh

Your resulting Confluence setenv.sh file will look like this,

Code Block
languagebash
# See the CATALINA_OPTS below for tuning the JVM arguments used to start Confluence.

# Bonsaiframework - Modification Start
# --------------------------------------
JRE_HOME="$CATALINA_HOME"/java
JAVA_HOME="$CATALINA_HOME"/java
# --------------------------------------
# Bonsaiframework - Modification End

echo "If you encounter issues starting up Confluence, please see the Installation guide at http://confluence.atlassian.com/display/DOC/Confluence+Installation+Guide"
# set the location of the pid file
if [ -z "$CATALINA_PID" ] ; then
    if [ -n "$CATALINA_BASE" ] ; then
        CATALINA_PID="$CATALINA_BASE"/work/catalina.pid
    elif [ -n "$CATALINA_HOME" ] ; then
        CATALINA_PID="$CATALINA_HOME"/work/catalina.pid
    fi
fi
export CATALINA_PID

 


Configure Confluence to Only Start and Stop with ServerAdmin

...

SectionTomcatConfluence
Only Allow serveradmin to Run Tomcat/opt/apache/tomcat.1/bin/startup.sh/opt/confluence/bin/startup.sh
 

/opt/apache/tomcat.1/bin/shutdown.sh/opt/confluence/bin/shutdown.sh

Modify user.sh

As of Confluence 4.x, new start up scripts added,

...

Using htop, initial setup without any spaces created is 396MB. The process itself uses  VIRT=913M and RES=338M.

Changing the Server ID

If you are migrating a Confluence instance to a new server and the Server ID was not changed after a full restore.

Check the confluence.cfg.xml located in the confluence-data directory there will be a line listed.

Stop Confluence and make sure to do a back up of this server ID as it can make your confluence unusable if you make a mistake.

Code Block
languagebash
<property name="confluence.setup.server.id">XXXX-XXXX-XXXX-XXXX</property>

Change the Server ID in this line and save it. Now you will need to make sure it is also in the confluence database.

Login to your confluence database, here is how it can be done with postgres user.

Code Block
languagebash
sudo -u postgres psql postgres
\connect DBNAME

Now check the server ID and then change it if needed.

Code Block
languagebash
select * from BANDANA where bandanakey = 'confluence.server.id';
 bandanaid | bandanacontext |      bandanakey      |             bandanavalue   
-----------+----------------+----------------------+--------------------------------------
         4 | _GLOBAL        | confluence.server.id | <string>BBP9-O5SW-YSZW-GWLR</string>
(1 row)

Update the ID if it does not match the ID in confluence.cfg.xml.

Code Block
languagebash
update BANDANA set bandanavalue = '<string>XXXX-XXXX-XXXX-XXXX</string>' where bandanakey = 'confluence.server.id';

Now start confluence and check the License Details for your changes and update your License key accordingly.