Adding Tomcat to XAMPP in Linux

Problems with the Linux version of XAMPP, questions, comments, and anything related.

Adding Tomcat to XAMPP in Linux

Postby leupi » 01. September 2009 20:12

I am running Ubuntu 9.04 with XAMPP 1.7.1 and would like to install Tomcat. I saw that there was a Tomcat plug in that I could install if running Windows; is there anything like that for Linux? If not, what would the Tomcat installation process be?

Thanks,
Todd
leupi
 
Posts: 1
Joined: 01. September 2009 20:08

Re: Adding Tomcat to XAMPP in Linux

Postby lkause » 28. September 2009 14:43

http://tomcat.apache.org/connectors-doc ... pache.html

Running through it now to see if it works.
lkause
 
Posts: 6
Joined: 28. September 2009 05:39

Temp Solution - Adding Tomcat to XAMPP in Linux 1.7.2

Postby lkause » 29. September 2009 10:47

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
lkause
 
Posts: 6
Joined: 28. September 2009 05:39


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 9 guests