Ok, here is what I typed before I got bored.
Visit
http://tomcat.apache.org/ to download and extract the latest release to
/opt/tomcat. Download the i586 Tomcat Connector binary and it's verification signature
here, rename as "
mod_jk.so" and copy to
lampp/modules folder. Create a file called "
workers.properties" inside of the
lampp/conf folder with the following content:
- Code: Select all
# Define 1 real worker using ajp13
worker.list=worker1
# Set properties for worker1 (ajp13)
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009
(You can configure more by reading the
HowTo)
Create a file called "
httpd-mod_jk.conf" in the same directory as your workers.properties file and create with the following content:
- Code: Select all
# Load mod_jk module
# Update this path to match your modules location
LoadModule jk_module modules/mod_jk.so
# Where to find workers.properties
# Update this path to match your conf directory location (put workers.properties next to httpd.conf)
JkWorkersFile conf/workers.properties
# Where to put jk shared memory
# Update this path to match your local state directory or logs directory
JkShmFile logs/mod_jk.shm
# Where to put jk logs
# Update this path to match your logs directory location (put mod_jk.log next to access_log)
JkLogFile logs/mod_jk.log
# Set the jk log level [debug/error/info]
JkLogLevel info
# Select the timestamp log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
# Send everything for context /examples to worker named worker1 (ajp13)
JkMount /examples/* worker1
(Make sure that your directories and files match up correctly)
Open up the "
httpd.conf" file and add the following Include line at the end:
- Code: Select all
# Tomcat
Include conf/httpd-mod_jk.conf
Finally, open a root terminal and run the "
lampp start" command followed by "
/opt/lampp/bin/startup.sh". Test your install by running
http://localhost:8080/ and you should see the Tomcat page. To stop Tomcat, in the terminal type "
/opt/lampp/bin/shutdown.sh".
Yes, I could have scripted this so it can install and remove Tomcat and...yes, I could have provided simple shell code to launch/modify lampp start and stop process. Yes, I'm aware of the other factors that I didn't cover (such as why put folders inside of lampp directory, why not outside? what about security?) but again its only a quick solution. I have already thought about that and already modded the
lampp shell code to include start and stop of Tomcat. I can assist if you needed OR just wait for the next release of Xampp for Linux.
- Again, only a quick fix.
LK