N.B. This installation only covers Windows servers.
This page covers setting Tomcat up for the first time. For applying routine Tomcat security updates to an existing installation, see Updating Tomcat.
To ensure everything is ready, open a command prompt and type in the following command:
java -version
If installed correctly, Java version information should be displayed, reporting Corretto-8.
More information on installing Java, setting JAVA_HOME and adding it to the path can be found here: Installing and Updating Java
Download Apache Tomcat 9 (ZIP distribution, Java 8 compatible) and extract it to a folder named after the version:
C:\path\to\apache-tomcat-9.0.122
The ZIP already contains a folder named this way, so extracting it will normally produce the right name without you doing anything.
Keep the version number in the folder name rather than using a generic name like tomcat. Tomcat updates install the new version alongside the old one rather than over the top of it, so version-named folders make it obvious which installation is which. See Updating Tomcat.
If required, configure the following environment variables:
CATALINA_HOME=C:\path\to\apache-tomcat-9.0.122
CATALINA_BASE=C:\path\to\apache-tomcat-9.0.122
CATALINA_BASE is optional if it is the same location as CATALINA_HOME.
Open a Command Prompt as Administrator and run:
C:\path\to\apache-tomcat-9.0.122\bin\service.bat install iGene --rename
This creates a Windows service named iGene. The rest of this guide, and the Tomcat and Java update guides, use that name.
To run a Command Prompt as Administrator, right-click Command Prompt and select Run as administrator.
Naming the service after the application rather than after Tomcat means the name stays correct when the server is later moved to a newer version of Tomcat, and it tells anyone looking at the server’s services list what the service is actually for.
The --rename part renames tomcat9.exe and tomcat9w.exe to iGene.exe and iGenew.exe so that they match the service. Without it, those tools look for a service called Tomcat9 and have to be given the name explicitly every time they are run.
Configure memory, JVM settings and service options using:
C:\path\to\apache-tomcat-9.0.122\bin\iGenew.exe
On the Java tab, set the Java Virtual Machine path to:
%JAVA_HOME%\bin\server\jvm.dll
The installer will have filled this in with the specific version of Java that was present when the service was created. Replacing it with %JAVA_HOME% means the service follows the JAVA_HOME variable instead, so future Java security updates need only that one variable changing. See Installing and Updating Java.
Start Tomcat using:
net start iGene
Open the following URL in a browser:
http://<server>:8080
If Tomcat is running correctly, the default Tomcat page should be displayed.