Install Apache Tomcat for an Easit application
Preparations
If this is the first Easit application that you are installing on the server, please create the following directories in the drive of your choice. In our examples we will use D:.
- D:\Easit
- D:\Easit\ApplicationName
- D:\Easit\ApplicationName\config
ApplicationName should be a combination of the name of the application we are installing and for which Easit GO system we are using it with (Ex. JiraConnectorTest, AzureDevopsDev, BrilliantConnectorProd). Once you have created the directory, or verified that the directory exists, please proceed with the steps below.
Download Apache Tomcat
We start with downloading the binary core distribution of the Apache Tomcat version we would like to us.
In most case we should download and use the 64-bit Windows zip located under Binary Distributions // Core.
Rename, remove and update
- Once the download is completed, extract the ZIP file to D:\Easit\ApplicationName. Once the archive have been extracted, rename the directory apache-tomcat-x.x.x to tomcat.
- Open the file tomcat\conf\server.xml in an editor of your choice and update the Server.Service.Connector.port element for the HTTP protocol. This is the port the application will be listening on for incoming requests.
1 2 3 4 5 6 7 8 9 10 11
<Server port="8005" shutdown="SHUTDOWN"> ... <Service name="Catalina"> ... <Connector port="xxxx" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" maxParameterCount="1000" />set </Service> </Server>
- Remove all files and directories inside tomcat\webapps.
- (Optional) Remove all files not supported by your OS. If on Windows, remove all files with the .sh extension. If on Linux, remove all files with the .bat extension.
Download JRE (Java Runtime Environment)
We also need to download Java for the application and Apache Tomcat to use. Make sure you download the ZIP file.
- Eclipse Temurin 17 - Windows x64
- Eclipse Temurin 11 - Windows x64
- Eclipse Temurin 17 - Linux x64
- Eclipse Temurin 11 - Linux x64
Once the download is completed, extract the ZIP file to D:\Easit\ApplicationName\tomcat. Once the archive have been extracted, rename the directory jdk-x.x.x.x-jre to jre.
Install Windows service
- Open CMD as administrator and cd to the bin directory inside the tomcat directory (Ex. D:\Easit\ApplicationName\tomcat\bin).
- Run the command below to set the JAVA_HOME environment variable.
1
D:\Easit\ApplicationName\tomcat\bin>set JAVA_HOME=D:\Easit\ApplicationName\tomcat\jre
- Run the command below to install Apache Tomcat as a Windows service. Update ApplicationName to the correct name (ex. JiraConnectorTest) first.
1
D:\Easit\ApplicationName\tomcat\bin>service.bat install ApplicationName
- Last but not least we need to copy a file and rename it so that we can get a GUI for managing the service. Change the X to the version of Tomcat you are installing and the ApplicationName to the correct name (do NOT remove the w at the end!).
1
D:\Easit\ApplicationName\tomcat\bin>copy tomcatXw.exe ApplicationNamew.exe
Update service settings (Java Options (++JvmOptions))
This is only needed if you are installing Apache Tomcat for a integration or connector from Easit.
Once the service have been installed we need to add an option to the java options list (++JvmOptions). We do this by right clicking on the file ApplicationNamew.exe, choose run as administrator and click on the tab Java. In the section "Java Options", make a new line at the bottom and add the line below.
-Dspring.config.location=file:D:/Easit/ApplicationName/config/
Do NOT use \ in the path, use / as shown.
Summary
Congratulations! You have now installed and setup Apache Tomcat as a Windows service to be used with a Easit application.