Running Tomcat on Sun Solaris 10
Solaris 10 comes pre installed with a Tomcat 5.5 installation.
Having found little information on the setup I decided to contribute what little useful things I found here
The following assumes you have Java already installed. java is usually installed in /usr/java. This is a symbolic link from the actual installation in /usr/jdk/jdk1.6.0_[Update]
Solaris comes with apache and tomcat preinstalled, just not in the locations you would expect unless your are familiar with Solaris. Solaris 10 comes with a new method for starting and stopping services on system startup, called SMF(Service Management Facility).
Software installation directory
Configuration, logs, and deployed applications (webapps directory)
If you where to run multiple instances of tomcat your would want to duplicate the whole /var/apache/tomcat55 directory, create new startup.sh shutdown.sh scripts setting a CATALINA_BASE environment variable pointing to your new instance.
Configuring SMF to start and stop tomcat
Create file in the following location. (The location does not really matter but the convention says so.)
To import this file run
# svccfg import /var/svc/manifest/application/web/tomcat.xml
Starting and stopping tomcat
To start tomcat you can now run
# svcadm enable tomcat
To stop tomcat your would run
# svcadm disable tomcat
To se the current status:
#- svcs -lp tomcat
Output is something like the following
You can see the log output from SMF in the filereferences as logfile in the above output for any troubleshooting.
Running tomcat through SMF negates the need to run tomcat using nohup on Solaris.