Upgrade Tomcat For Confluence
Upgrade history: 6.0.18, 6.0.20, 6.0.36, 6.0.37, 6.0.39, 6.0.41.
To be able to use Tomcat 7, Confluence version needs to be updated ;-D
The process is similar to initial installation.
Install / Upgrade Confluence
Steps to Install/Upgrade
1. Download the latest version from http://tomcat.apache.org
2. Extract the tarball, for example /opt/tomcat, change ownership recursively to www-data user (the user which is used to run apache, nginx and tomcat)
3. Download MySQL Connector/J, place mysql-connector-java-<version>.jar in $CATALINA_HOME/lib
4. Edit $CATALINA_HOME/bin/catalina.sh, search for JAVA_OPTS block and increase initial heap size and run JVM in server mode -server -Xms256m -Xmx512m
5. Extract confluence tar ball to /opt/confluence, edit confluence-init.properties
6. Configure context and data source for Confluence
7. Configure Tomcat for front-end reverse proxy
Backup and edit $CATALINA_HOME/conf/server.xml
Find Connector port="8080" block and make it look like below, proxyName is the FQDN of the front-end reverse proxy (apache or nginx)
9. Configure MySQL for READ-COMMITTED transaction-isolation and UTF-8 charsets
10. Use mysql or phpMyAdmin to create user, allow only local connection (loopback), run mysql_secure_installation to secure MySQL if necessary
11. Create schema, grant privilege to user
12. Run installer if it's a new installation, otherwise it's done!
Shell script to start and stop Tomcat
A better Tomcat startup script from Ansible examples - tomcat-initscript.sh
Start Tomcat during boot
- Write a tomcat startup script in /etc/init.d/tomcat
Invoke update-rc.d to run Tomcat as service (sysv-rc-conf is an alternative)
Or manually create symbolic links to the startup script in corresponding /etc/rcX.d/ directory.
RHEL, OEL or CentOS equivalent
systemd (Arch Linux, Fedora, openSUSE) way is different. Need to create a unit file for Tomcat and enable it.
NOTE: Keep the old version of Tomcat for a while until you make sure the new version works well with current Confluence version.