Table of Contents
Installing Cool Stack Tomcat 5.5
As the Cool Stack download page itself states (and because Java is “run anywhere”), this is just a rebundled version of the same Tomcat that you can download from the Apache Tomcat Downloads site. So what's the advantage to using the Cool Stack packaged Tomcat? Well, two things:
- Firstly, its packaged as a standard package that you can use with
pkgadd. Installation and configuration is around half-a-dozen steps. - It includes a SMF, out-of-the-box. So, if your needs are simple, there should be no messing around with XML.
See also the Install TomCat 6.x on your Joyent Accelerator tutorial.
Preflight
Prerequisites
- Java and the JDK installed. This should work out-of-the-box on your Accelerator.
- If you wish to run Tomcat with Apache (httpd), using Apache to proxy requests to Tomcat, follow the instructions to install Cool Stack AMP - Apache, MySQL, PHP package (CSKamp) (insuring you follow the instructions for Cool Stack 1.2).
You should be able to use other Apache distributions too (details to follow).
Assumptions
- These instructions list the package for x86 processors. If you're on a SPARC Accelerator, then the instructions should be the same, just substitute the package name.
Installation
- Download the CSKtomcat_1.2_x86.pkg.bz2 to your chosen directory.
- Decompress the archive in any directory:
bzip2 -d CSKtomcat_1.2_x86.pkg.bz2
- Install the package:
pkgadd -d CSKtomcat_1.2_x86.pkg
- Use
svccfgto configure the appropriate amount of memory:svccfg -s svc:/application/csk-tomcat:CSKtomcat setenv -m start JAVA_OPTS -Xmx64m svccfg -s svc:/application/csk-tomcat:CSKtomcat setenv -m stop JAVA_OPTS -Xmx64m
- The installer may have already attempted to start Tomcat, which would have failed. Clear the SMF maintenance mode:
svcadm clear csk-tomcat
- Attempt to start Tomcat:
svcadm enable csk-tomcat
- Check the service is running:
svcs -a | grep csk-tomcat
- Check the default Tomcat site displays: http://YOURDOMAINNAME:8080/
- If its not running,
tailthe Tomcat log:tail -f /var/svc/log/application-csk-tomcat:CSKtomcat.log