Tomcat5 Mod_jk Apache2 on Gentoo 2006.0

Java Development Server Install

USE=”-xmms -arts -oss -jpeg -mpeg -motif -mp3 -png” emerge dev-java/sun-jdk

=
* Please download j2sdk-1_4_2_10-linux-i586.bin from:
*

http://javashoplm.sun.com/ECom/docs/Welcome.jsp?StoreId=22&PartDetailId=j2sdk-1.

4.2_10-oth-JPR&SiteId=JSC&TransactionId=noreg
* (SDK 32-bit/64-bit for Windows/Linux/Solaris SPARC 32-bit for Solaris x86,

then select download Linux Self-extracting.
* and move it to /usr/portage/distfiles
=

No JAVA_HOME available! Please set your Java Virtual Machine
No JAVA_HOME available! Please set your Java Virtual Machine
No JAVA_HOME available! Please set your Java Virtual Machine
No JAVA_HOME available! Please set your Java Virtual Machine
THIS SYSTEM VM IS NOT SUFFICIENT, REQUIRED BINARIES WERE NOT FOUND
System Virtual Machine set
You may want to update your enviroment by running:
“/usr/sbin/env-update && source /etc/profile”
>>> Regenerating /etc/ld.so.cache…

* After installing sun-jdk-1.4.2.10 this
* was set as the default JVM to run.
* When finished please run the following so your
* enviroment gets updated.
* /usr/sbin/env-update && source /etc/profile
* Or use java-config program to set your preferred VM

* Some parts of Sun’s JDK require virtual/x11 to be installed.
* Be careful which Java libraries you attempt to use.

java-config –list-available-vms
java-config –set-system-vm sun-jdk-1.4.2.10
/usr/sbin/env-update && source /etc/profile

emerge tomcat
/etc/init.d/tomcat5 start
=s=
* Starting Tomcat …
Using CATALINA_BASE: /opt/tomcat5
Using CATALINA_HOME: /opt/tomcat5
Using CATALINA_TMPDIR: /opt/tomcat5/temp
Using JAVA_HOME: /opt/sun-jdk-1.4.2.10
=s=
rc-update add tomcat5 default

emerge apache (follow gentoo wiki guide)
/etc/init.d/apache2 start
rc-update add apache2 default

nano -w /etc/portage/package.keywords
==
=www-apache/mod_jk-1.2* ~x86
==
emerge -pv mod_jk
emerge mod_jk

nano -w /etc/conf.d/apache2
==
APACHE2_OPTS=”-D JK”
==

nano -w /etc/apache2/modules.d/88_mod_jk.conf
==
JkWorkersFile conf/jk-workers.properties
JkLogFile logs/mod_jk.log
JkLogStampFormat “[%a %b %d %H:%M:%S %Y] ”
JkRequestLogFormat “%w %V %T”
jkAutoAlias /var/lib/tomcat-5/default/webapps/
jkMount /*.jsp ajp13
==

nano -w /etc/apache2/jk-workers.properties

/etc/init.d/apache2 restart && /etc/init.d/tomcat5 restart
/opt/tomcat5/webapps/ROOT/testing $ nano -w index.jsp
==
Hello! The time is now <%= new java.util.Date() %>
==
http://localhost:8080/testing/

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.