July 16, 2012

Installing Tomcat6 on Ubuntu 12.04

Precise Pangolin is the new ubuntu 12.04 version name


Installing tomcat  on 12.04 is pretty straight forward.
The best and a most robust way of installing tomcat(any version) on ubuntu is

1. Downloading the core distribution of tomcat from here
2. Unzip/Extract the tar.gz file in tomcat folder
3. Set CATALINA_HOME environment variable to tomcat-folder
    and add the same into PATH
3. Go to tomcat/bin folder
   "sudo sh startup.sh" and to shut down "sudo sh shutdown.sh"

P.S - In case if you are getting "java.net.connectexception" error, which happens when some other is using default (apache tomcat) port 8080, you can do the following
       - go to "tomcat/conf/server.xml" file and changing the value of port under this connecter-xml tag. It will be something below.


"<Connector port="8080" protocol="HTTP/1.1" 
               connectionTimeout="20000" 
               redirectPort="8443" />"


For newbies this wont make much sense..
To know which app is using which port you can execute the following command
netstat -anltp | grep "LISTEN"

To integrate tomcat server and its plugin to eclipse
1. go to..
Window -> Preferences -> Server -> RuntimeEnvironment -> Add -> tomcat-version -> tomcat-home-directory and choose JDK instead of JRE, save all the configuration .. 

2. install mongrel/sysdeo tomcat-plugin from marketplace.





0 comments:

Post a Comment