Building mod_jk.so for Tomcat/Apache under Solaris
I had to build mod_jk.so (The Tomcat Java App Server <--> Apache Web Server connector) at work for Solaris. The instructions in the documentation do not work under Solaris, so I figured I'd detail my findings for future use.
Go get the Java 2 SDK for Solaris (if you don't have it) - If you're not root, don't worry, it still installs fine.
Make sure JAVA_HOME environment variable is set to the directory that the Java SDK is located in (ex /usr/local/jdk1.3.1, or /home/joe/jdk1.3.1)
Make sure $JAVA_HOME/bin is part of your PATH.
You MUST have the Tomcat SOURCE (A binary Tomcat install does NOT have these files)
Go to tomcat_source/src/native/Apache1.3 (Note that you will NOT be using the Makefile to do this!)
Run the following two commands. (Change the location of apxs as appropriate)
/usr/local/apache/bin/apxs -I$JAVA_HOME/include -I$JAVA_HOME/include/solaris -I ../jk -o mod_jk.so -c *.c ../jk/*.c
gcc -shared -lposix4 -o mod_jk.so *.o
You are done! You have a working Solaris mod_jk.so! :) Copy it to the /libexec directory under your Apache directory, then head to the Tomcat docs for info on setting up Tomcat and Apache to work together.
This site contains copyrighted material the use of which has not always been specifically authorized by the copyright owner. We are making such material available in our efforts to advance understanding of environmental, political, human rights, economic, democracy, scientific, and social justice issues, etc. We believe this constitutes a 'fair use' of any such copyrighted material as provided for in section 107 of the US Copyright Law. In accordance with Title 17 U.S.C. Section 107, the material on this site is distributed without profit to those who have expressed a prior interest in receiving the included information for research and educational purposes. For more information go to: http://www.law.cornell.edu/uscode/17/107.shtml
. If you wish to use copyrighted material from this site for purposes of your own that go beyond 'fair use', you must obtain permission from the copyright owner.