Jackrabbit on Apache Tomcat

# download files
wget 'http://mirror.switch.ch/mirror/apache/dist/tomcat/tomcat-6/v6.0.26/bin/apache-tomcat-6.0.26.tar.gz'
wget 'http://www.apache.org/dyn/closer.cgi/jackrabbit/2.1.0/jackrabbit-webapp-2.1.0.war'
wget 'http://repo1.maven.org/maven2/javax/jcr/jcr/2.0/jcr-2.0.jar'

# extract tomcat
tar xzf apache-tomcat-6.0.26.tar.gz

# put JCR jar on classpath
cd apache-tomcat-6.0.26
mkdir -p ./shared/lib
cp ../jcr-2.0.jar ./shared/lib
sed -s 's@shared.loader=@shared.loader=${catalina.home}/shared/lib/jcr-2.0.jar,@' ./conf/catalina.properties

# start Tomcat
bin/startup.sh

# deploy Jackrabbit
cp ../jackrabbit-webapp-2.1.0.war ./webaps