38.5 Tomcat Application Server
Last updated
This section describes how to deploy the Tomcat application server on the FreeBSD operating system.
Install using the pkg package manager:
# pkg install tomcat110If installing using Ports:
# cd /usr/ports/www/tomcat110/
# make install cleanThe Tomcat 11 installation directory is located at /usr/local/apache-tomcat-11.0.
/usr/local/apache-tomcat-11.0/
├── bin/
├── conf/
│ ├── server.xml
│ └── web.xml
├── webapps/
├── logs/
└── work/Its main directory structure:
bin/
Stores startup, shutdown, and other script files
conf/
Stores configuration files, including server.xml (main configuration file, copied from server.xml.sample) and web.xml (default web application configuration, copied from web.xml.sample)
webapps/
Web application deployment directory
logs/
Log file directory
work/
Temporary working directory for compiled JSP files
Add to startup items and set the Tomcat service to start at boot:
Start the Tomcat service:
Open ip:8080, for example http://192.168.179.150:8080/, to access the Tomcat default page:
Tip
The 192.168.179.150 in the above example is a placeholder and needs to be replaced with the actual value.

The main Tomcat configuration file is /usr/local/apache-tomcat-11.0/conf/server.xml, which defines core components such as service ports, connectors, engines, and hosts. By default, Tomcat listens on port 8080 for HTTP connections. The AJP (Apache JServ Protocol) connector is not enabled by default; if needed, uncomment it in server.xml to enable port 8009. To modify the port or configure HTTPS support, edit this configuration file.
Web applications should be deployed in the /usr/local/apache-tomcat-11.0/webapps/ directory; Tomcat will automatically load WAR packages or unpacked web application directories under this directory.
Apache Software Foundation. Apache Tomcat 11 Configuration Reference[EB/OL]. [2026-04-17]. https://tomcat.apache.org/tomcat-11.0-doc/config/index.html, Configuration reference for Tomcat 11 components.
Apache Software Foundation. Apache Tomcat 11 Migration Guide[EB/OL]. [2026-04-17]. https://tomcat.apache.org/migration-11.0.html, Details the Jakarta EE specification version implemented by Tomcat 11 and notes for migrating from older versions.
Last updated
# service tomcat110 enable
tomcat110 enabled in /etc/rc.conf# service tomcat110 start
Starting tomcat110.