You'll also need openssl and openssh installed. I'm assuming here that if you have a Sun server and you have root access to it that you have some basic familiarity with system administration and know your way around a UNIX command line.
So, bop on over to sunfreeware.com, pick your OS, and grab the following GNU tools in Sun package format:
Install all of the packages listed above. Note that you'll need to install gzip first, as the other packages are compressed. The gzip package is not.
Apache + Tomcat is five major steps: build/install Apache, install JDK, build/install Tomcat, build/install a connector, configure. Since Tomcat is 100% Java, we'll use the binary install instead of having to deal with ant. I spend more time with Red Hat Linux than I do with Solaris, so my preference is to put things in /usr/local. Die-hard Solaris folks will need to substitute /opt, /var, or whatever as needed to suit their own preferences. Paths, in this scenario, don't have much effect as long as you can guarantee that they are consistent.
Build/Install APACHE
=====================
If you see a message that says "configuring package in srclib/apr now" and the build process seems to hang for several minutes, leave it alone, it will continue after a bit.
NOTE: Apache2 uses a shorthand notation for the group ID in httpd.conf. If you have problems getting Apache2 to start on Solaris 8 from a default install, check the Apache error log (/usr/local/apache2/logs/error_log) for an error message. If you see one that says something like "[alert] (22)Invalid argument: setgid: unable to set group id to Group 4294967295" then edit httpd.conf, and change the line that says "Group #-1" to "Group nobody" then start/restart Apache. The Solaris kernel has difficulty with the "#-1" shorthand notation if the Group ID (gid) is over 60000 for the group nobody, which it is in Solaris 8 64-bit.
Install JDK
=====================
Build/Install TOMCAT
=====================
Build/Install Connector
=======================
The two connectors (JK and JK2) are different; JK2 is a complete rewrite of the earlier JK/AJP13 protocol. We'll cover building JK, with JK2 to come later.
Building JK Connector
=======================
NOTE: you can get a JK binary for Solaris 8 here: http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk/release/v1.2.0/bin/solaris8/. The version there was compiled against Apache 2.0.42 and should be compatible with 2.0.43. You are welcome to skip building JK from source and use the binary instead, but if you would rather build from source, here's how to do it:
Final Configuration
=======================
NOTE: these steps will allow access to the Tomcat examples via Apache on port 80. Successful use of the examples on port 80 shows that mod_jk is working correctly, since Tomcat is configured to run on port 8080 by default for HTTP requests.
<Listener className="org.apache.ajp.tomcat4.config.ApacheConfig" modJk="/usr/local/apache2/modules/mod_jk.so" />
<Listener className="org.apache.ajp.tomcat4.config.ApacheConfig" append="true" forwardAll="false" modJk="/usr/local/apache2/modules/mod_jk.so" />
- make sure your ServerName matches the name="" parameter in your tomcat Host element in server.xml
- add the following line at the very end:
Include /usr/local/tomcat/conf/auto/mod_jk.conf
Note: the mod_jk.conf file gets created by tomcat when tomcat starts. It gets created every time tomcat starts. So, if you have your server.xml configured, you can ignore httpd.conf (in most cases) except to add the Include directive for mod_jk.conf. You don't need to create or edit mod_jk.conf. Click here for a sample mod_jk.conf file generated automatically by tomcat on each startup.
# BEGIN workers.properties
worker.list=ajp13
worker.ajp13.port=8009
# change this line to match apache ServerName and Host name in server.xml
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
# END workers.properties
Back To Menu
Please send comments, suggestions, or changes to john AT johnturner DOT com. Be advised that I will be happy to help where I can, but I am not available for free one-on-one tech support to the whole world. :)