Difference between revisions of "Install Apache Tomcat"

From Fusion Registry Wiki
Jump to navigation Jump to search
(Installing the Apache Tomcat)
(Installing the Apache Tomcat)
 
(20 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
[[Category:How_To]]
 +
[[Category:Fusion Registry Install]]
 
=Overview=
 
=Overview=
 
Fusion Registry Core, Fusion Edge Server and other modules are Java applications which run under a Java Web Application Server.  
 
Fusion Registry Core, Fusion Edge Server and other modules are Java applications which run under a Java Web Application Server.  
Line 7: Line 9:
 
Download and install [http://tomcat.apache.org/ Apache Tomcat].
 
Download and install [http://tomcat.apache.org/ Apache Tomcat].
  
Choose either Tomcat 8.5 or 9.0.
+
Choose either Tomcat 8.5 or 9.0. The Fusion Registry does not work with version 10 or later of Apache Tomcat.
  
Tomcat's default configuration is to serve any applications on port 8080. That means, the Fusion Registry user interface will be available on the following URL:<br>
+
=Set the Java runtime options=
<nowiki>http://localhost:8080/FusionRegistry</nowiki>
 
  
You will need to choose a different port if an application is already using port 8080.
+
Tomcat needs to be configured to set certain Java options when it starts. The most important is to set the amount of memory that the Fusion Registry service will be allocated. A minimum of 4GB is recommended and the following explains how to do that.
  
* Go to tomcat>conf folder
+
====Windows====
* Edit server.xml
+
* Go to <code>tomcat\bin</code> folder
 +
* Create a file called <code>setenv.bat</code> with the following content
 +
set "JAVA_OPTS=-Xmx4G"
 +
 
 +
====Linux====
 +
* Go to the <code>tomcat/bin</code> folder
 +
* Create a file called <code>setenv.sh</code> with the following content (it does not need to have 'x' executable permissions, but must be readable 'r')
 +
export JAVA_OPTS="-Xmx4G"
 +
 
 +
==== GMT ====
 +
It is also reccomended to set the timezone to GMT
 +
 
 +
-Duser.timezone=GMT
 +
 
 +
e.g.
 +
 
 +
set "JAVA_OPTS=-Xmx4G -Duser.timezone=GMT"
 +
 
 +
====Special purpose Java runtime options====
 +
Other Java runtime options that can be set for special purposes and are explained in [[Tomcat setenv file]] article.
 +
 
 +
=Changing the Tomcat port number (optional)=
 +
Tomcat's default configuration is to serve its applications on port 8080. That means, by default, the Fusion Registry user interface will be available on the following URL:<br>
 +
<code>http://localhost:8080/FusionRegistry</code>
 +
 
 +
You will need to choose a different port if other software on the machine is already using port 8080.
 +
 
 +
* Go to <code>tomcat/conf</code> folder
 +
* Edit <code>server.xml</code>
 
* Search "Connector port"
 
* Search "Connector port"
* Replace "8080" by your port number
+
* Replace "8080" by your port number (8081 for instance)
 
* Restart tomcat server.
 
* Restart tomcat server.

Latest revision as of 06:55, 24 January 2024

Overview

Fusion Registry Core, Fusion Edge Server and other modules are Java applications which run under a Java Web Application Server.

A number of different open source and commerical options are available, but this guide explains how to install the free to use Apache Tomcat.

Installing the Apache Tomcat

Download and install Apache Tomcat.

Choose either Tomcat 8.5 or 9.0. The Fusion Registry does not work with version 10 or later of Apache Tomcat.

Set the Java runtime options

Tomcat needs to be configured to set certain Java options when it starts. The most important is to set the amount of memory that the Fusion Registry service will be allocated. A minimum of 4GB is recommended and the following explains how to do that.

Windows

  • Go to tomcat\bin folder
  • Create a file called setenv.bat with the following content
set "JAVA_OPTS=-Xmx4G"

Linux

  • Go to the tomcat/bin folder
  • Create a file called setenv.sh with the following content (it does not need to have 'x' executable permissions, but must be readable 'r')
export JAVA_OPTS="-Xmx4G"

GMT

It is also reccomended to set the timezone to GMT

-Duser.timezone=GMT

e.g.

set "JAVA_OPTS=-Xmx4G -Duser.timezone=GMT"

Special purpose Java runtime options

Other Java runtime options that can be set for special purposes and are explained in Tomcat setenv file article.

Changing the Tomcat port number (optional)

Tomcat's default configuration is to serve its applications on port 8080. That means, by default, the Fusion Registry user interface will be available on the following URL:
http://localhost:8080/FusionRegistry

You will need to choose a different port if other software on the machine is already using port 8080.

  • Go to tomcat/conf folder
  • Edit server.xml
  • Search "Connector port"
  • Replace "8080" by your port number (8081 for instance)
  • Restart tomcat server.