I am working on a fresh install of Ubuntu 10.04 TLS. Here are my notes for the install…
I wanted to see what is available for my version of Ubuntu
I found the complete install of the TomCat6 system
I did not want the following packages:
apt-get install tomcat6-admin
apt-get install tomcat6-user |
Since I am going to use the Apache mod pass through here is my apache install notes.
Install apache 2.2.x
I then installed the Apache Mod JK
apt-get install libapache2-mod-jk |
I went ahead and installed mysql 5.1, this is NOT necessary for most people:
apt-get install mysql-server-5.1 |
NOTE: This blog post is a work in progress and is not completed, stay tuned.
Most people don’t know this but you can change the Java version from 1.5 (default) to 1.6 just by dragging the preference.
Open -> Applications -> Utilities -> Java -> Java Preferences
It is a bit slow so give it a few moments. Once it is open you can choose the Java version just by dragging it in the list. I needed it for changing the versions of Red5 compiling the programs.
So I had this project where we needed to have the Tomcat handle the JSP pages from a website. I had to install a few mod to apache and then setup the ProxyPass to handle the requests. Now I may have enabled too many mods so you can activate them one at a time until you get it working. Here are the mods I added to Ubuntu 8.10 standard install:
proxy_ajp.load, proxy_balancer, proxy_connect.load, proxy_http.load, proxy.load
AGAIN, I may have activated too many but I will need some of them for things like ruby later. I did not alter any of the information in these files.
Here is the site config I added to the virtual host file:
<IfModule mod_proxy.c>
ProxyPass /DIRECTORY ajp://localhost:8009/DIRECTORY
</IfModule> |
Where the directory pass through is the same as /webapps/DIRECTORY on Tomcat6
Next we had to make some changed to some of the files which might not apply to your application:
nano etc/tomcat6/policy.d/04webapps.policy |
In that file we had to make some changes to the read and write:
permission java.io.FilePermission "/FOLDER/APPLICATION/sessions/*", "read, write"; |
Note that we put in the application in the home folder of a user and then did an “ln -s” into the TomCat6 webapps folder so that the user could change the files for the application. It needed to write session information to a folder and have permissions.
I hope this helps anyone trying to get things going.