As official Icescrum documentation is too short for a non Java expert to setup this product on a Debian system, this page details required tricks and also propose advice for a production environment.
Do not (re)start Tomcat before having raised the point where I tell you can start it.
Packages
First, required Debian packages (and dependencies) to install with aptitude or apt-get:
sun-java6-bin
sun-java6-jre
sun-java6-fonts
tomcat6
mysql-server
I do not recommend the use of openjdk-6 packages.
Database
Create your MySQL database and user for icescrum:
$ mysql -u root -p
mysql> create database icescrum character set utf8;
Query OK, 1 row affected (0.00 sec)
mysql> grant all privileges on icescrum.* to 'icescrum'@'localhost' identified by 'icescrumpswd';
Query OK, 0 rows affected (0.00 sec)
Of course, please use complex root and icescrum MySQL passwords.
Application
Download the icescrum_R4.x_WAR.zip file and extract it to get the WAR file itself, which is a zip file too after all. I decided to place it in /opt.
cd /tmp
unzip icescrum_R4_3.1_war.zip
mv icescrum.war /opt/icescrum-4.3.1.war
ln -s /opt/icescrum-4.3.1.war /opt/icescrum.war
chmod g+r-wx,o-rwx /opt/icescrum-4.3.1.war
Application work files
Icescrum is built with Grails and LiquidBase which both write files – I consider as temporary files. By default, it also stores users’ avatars and its application log icescrum.log in the current Java process working directory. The following command prepares a directory to get all that stuff but divert logs files to relevant location.
mkdir -p /var/local/icescrum/lbdsl
chown -R tomcat6.tomcat6 /var/local/icescrum
ln -s /var/log/tomcat6 /var/local/icescrum/logs
Application configuration
Extract the template configuration file with the following commands
cd /tmp
unzip /opt/icescrum.war WEB-INF/classes/config.properties
mv WEB-INF/classes/config.properties /etc/tomcat6/icescrum-config.properties
Edit that file with your database settings, MTA information – I suppose you have a satellite available on localhost – and browser’s URL required by Grails:
dataSource.driverClassName=org.gjt.mm.mysql.Driver
dataSource.dialect=org.hibernate.dialect.MySQLInnoDBDialect
dataSource.url=jdbc:mysql://localhost:3306/icescrum?useUnicode=true&characterEncoding=utf8&autoReconnect=true
dataSource.username=icescrum
dataSource.password=icescrumpswd
dataSource.dbCreate=update
grails.mail.host = localhost
grails.mail.port = 25
grails.mail.username = icescrum@localhost
grails.mail.password =
grails.serverURL=http://localhost:8080/icescrum
Tomcat configuration
Create a Tomcat context file at location /etc/tomcat6/Catalina/localhost/icescrum.xml with the content:
<Context
path="/icescrum"
docBase="/opt/icescrum.war"
debug="0"
reloadable="false"
unpackWAR="true"
swallowOutput="true"
/>
Edit /etc/default/tomcat6 to set various parameters on Java command line:
JAVA_HOME=/usr/lib/jvm/java-6-sun
JAVA_OPTS="-Djava.awt.headless=true -XX:MaxPermSize=256m -Xmx512m -XX:+UseConcMarkSweepGC"
JAVA_OPTS="$JAVA_OPTS -Dicescrum_config_location=/etc/tomcat6/icescrum-config.properties"
JAVA_OPTS="$JAVA_OPTS -Dlbdsl.home=/var/local/icescrum/lbdsl/"
JAVA_OPTS="$JAVA_OPTS -Duser.home=/var/local/icescrum/"
Notice I had to disassemble liquibase/dsl/properties/LbdslProperties.class to discover the lbdsl.home property which enables to avoid the default location to /usr/share/tomcat6/.lbdsl !
Now you can restart Tomcat, wait for a while looking at /var/log/tomcat6/catalina.out and then connect to http://localhost:8080/icescrum/
But then change grails.serverURL in /etc/tomcat6/icescrum-config.properties to match your definite users’ URL access.
HTTPS configuration
Until I add more details to this section, please refer to http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html
I recommend to place the server key store in /etc/tomcat6/
Adapt grails.serverURL for https now and restart Tomcat.
Network configuration
To keep Tomcat running as standard user without changing ports to standard privileged 80 and/or 443, here are two iptables rules:
iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8080
iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-ports 8443
Please refer to http://wiki.debian.org/iptables to persist them in your Debian system.
Conclusion
This setup is designed for a productive environment. The original application release is kept unmodified to ease upgrades and all settings are placed in Unix standard locations.
There are still many details you may need to tune Icescrum for your specific platform, like memory settings (-Xmx in JAVA_OPTS) and database pooling. But this document is written as a start point. Do not hesitate to post comments if anything is unclear, wrong or requires improvements.