jump to navigation

Tomcat6 installation March 2, 2008

Posted by lemonpress in dev environment installation.
trackback

Prerequisits

  1. Make sure you uninstall Tomcat if you have one installed already, otherwise Tomcat’s Windows Service Installer will fail with bizarre message about permissions
  2. Make sure you have JRE 5 and Java EnvVars all set in System>Advalced>Environment Variables (JAVA-HOME, Path in System EnvVars, optionally Path in User’s Vars and CLASSPATH)
  3. Just in case set a new EnvVar CATALINA-HOME=c:Tomcat6. This is my home dir for Tomcat, although WSI claims it will register CATALINA-HOME env-var automatically, last time it didn’t.
  4. you can optionally read Setup notes herehttp://tomcat.apache.org/tomcat-6.0-doc/, although the install with WSI should be trivial, if nothing goes wrong.
  5. You may want to restart PC, although it may be an overkill these days.
  6. Choosing Port for Tomcat is a bit of a guesswork: you can start all web services before doing Tomcat installation and run SysInternalsSuit tool tcpview.exe. On my PC I mistakenly uninstalled .NET framework and never got around to installing it back. So tcpview gives me frighteningly sounding windows error message, but never mind, it still runs and scans the ports. Make a list of all taken TCP ports. Optionally you can check which processes are running on these ports using procexp.exe from the same SysInternalsSuit. Make a list of ports and process IDs of interest in tcpview then go to procexp and check the names and descriptions against process numbers. Finally you can figure out which ports you can take, obviously the port num should be > 1024. Anything in 80XX range will be fine. Often servers require additional ports, some of which may be temporary and some grab free ports and make them permanent. To be dead sure that your chosen port and any additional ports the Tomcat may decide to grab will be available, start all your servers, i.e. JBoss, MySQL and so on. And then do the installation of Tomcat. If there is a conflict it will be discovered immediatelly, and it will also avoid potential future conflicts of ports.

Installation

  1. Download Windows Service Installer for Tomcat6 from here: http://tomcat.apache.org/download-60.cgi and save in C:Downloads
  2. you can also download zip‘ed Tomcat, but only for reference. Do not try to run bin/startup.bat or bin/tomcat6.exe in it. Firstly, because it is restricted to port 8080, and in my case, port 8080 is already taken by JBoss.
  3. Turn off Firewall – it is not essential, but it prevents Windows complaining about security when WSI tries to grab the port.
  4. Run WSI and choose your config settings. Mine are
    Home Dir: C:Tomcat6
    Port: 8086
    Check box: Run as Windows Service
    ( I will change it to manual startup later, but for now this setting will give you an immediate feedback if installation succeeded)
    login: admin admin

    Test it

    Start Browser and type: http://localhost:8086

    If you have any .war files try to deploy and access them.

    Finish Off

    Go to firewall settings and add port 8086 to exceptions, select scope: local network

    Turn on Firewall

    Go to Control Panel > Administrative Tools > Services and change Apache Tomcat6 service to Start “manual”.

    This is it.


Comments»

No comments yet — be the first.