Installing an application server
Tomcat is one of the most popular Applications Servers. We recommend using Tomcat 8.5 to run GeoNetwork Enterprise.
If you are running Windows, follow these step to install Tomcat:
-
Visit the Apache Tomcat Download page:
- Apache Tomcat 9.5.x (Recommended)
- Apache Tomcat 8.5.x
Apache Tomcat 10.2.x is not supported at this time.
-
Under Binary Distributions download 32-bit/64-bit Windows Service Installer (pgp, sha512).
-
Run the installer file. When prompted for the elements to install, check the Native and Service Startup options.
-
From the Windows Start menu select Apache Tomcat → Configure Tomcat to open Tomcat Properties.
-
Change to the Log On tab, select:
- Local System account: selected
- Allow service to interact with desktop: checked
-
Return to the General tab.
Press Apply to update the service
Use Stop and Restart to restart the service
Tomcat is available directly from the Ubuntu package manager. This approach is recommended as updates and security fixes are managed as part of your operating system.
Reference:
- Ubuntu documentation
- Ubunutu tomcat9 package
To install tomcat9
package:
-
Install tomcat9 using :command:
apt-get
: -
Optional: By default Tomcat will use ¼ of system memory, to set a lower limit adjust
CATALINA_OPTS
using :file:setenv.sh
.Define
CATALINA_OPTS
by creating/etc/tomcat9/bin/setenv.sh
:The
-X
java options must be listed before any-D
system properties. -
Optional: Tomcat's default port number is 8080. It can be modified in :file:
/etc/tomcat9/server.xml
. -
Tomcat is a setup as a linux :command:
service
with start, status, restart and stop actions:Changes to tomcat configuration such as
setenv.sh
andserver.xml
require service restart to take effect. -
You can access Tomcat using your web browser
http://<hostname>:8080
Manual install of Apache Tomcat:
-
Download a Tomcat 9 install package:
-
Uncompress the Tomcat 9 install package:
-
Create a Tomcat user and set permissions:
-
Create/Edit the Tomcat service file:
and add this:
[Unit] Description=Tomcat 9 servlet container After=network.target [Service] Type=forking User=tomcat Group=tomcat Environment="JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/jre" Environment="JAVA_OPTS=-Djava.security.egd=file:///dev/urandom" Environment="CATALINA_BASE=/opt/tomcat/latest" Environment="CATALINA_HOME=/opt/tomcat/latest" Environment="CATALINA_PID=/opt/tomcat/latest/temp/tomcat.pid" Environment="CATALINA_OPTS=-Xms512M" ExecStart=/opt/tomcat/latest/bin/startup.sh ExecStop=/opt/tomcat/latest/bin/shutdown.sh [Install] WantedBy=multi-user.target
-
Optional: By default Tomcat will use a quarter of system memory, to set a lower limit adjust
CATALINA_OPTS
using :file:setenv.sh
.Define
CATALINA_OPTS
by creating/etc/tomcat9/bin/setenv.sh
:The
-X
java options must be prepended before any-D
system properties. -
Setup the Service
-
Test that Tomcat is running
Starting/stopping Tomcat
Using Tomcat Manager
To start the Tomcat server, follow these steps:
-
Open the Tomcat Manager using the start menu: Start → Tomcat → Tomcat Manager
-
Change the General tab check Server Status.
-
Use the Start button to start the service.
- Use the Stop button to start the service.
Using scripts
To start the server:
- Navigate to the Tomcat bin folder (CATALINA_HOME/bin)
- Run
startup.bat
To stop the server:
- Navigate to the Tomcat bin folder (CATALINA_HOME/bin)
- Run
shutdown.bat
Tomcat is a setup as a linux service with start, status, restart and stop actions.
To start the Tomcat server, follow these steps:
To stop the Tomcat server, follow these steps:
Changes to tomcat configuration such as setenv.sh
and server.xml
require service restart to take effect.
Tomcat is a setup as a linux service with start, status, restart and stop actions.
To start the Tomcat server, follow these steps:
To stop the Tomcat server, follow these steps:
Changes to tomcat configuration such as setenv.sh
and server.xml
require service restart to take effect.