To install Apache Tomcat:
-
(Optional) It is recommended to update the system with the latest security patch.
-
Install OpenJDK.
For Java 8:
|
›_ Console |
|
|
For Java 11:
|
›_ Console |
|
|
-
Download Tomcat 10.
|
›_ Console |
|
|
-
Create a directory.
|
›_ Console |
|
|
-
Extract the archived file to
/opt/tomcat.
|
›_ Console |
|
|
-
Change the ownership of the
/opt/directoryto tomcat user.
|
›_ Console |
|
|
-
Set executable permissions to scripts.
|
›_ Console |
|
|
-
Create Apache Tomcat Systemd file
/etc/systemd/system/tomcat.serviceto manage the Tomcat service throughsystemctland add the lines below.
|
›_ Console |
|
|
Change the values according to your system configuration.
/etc/systemd/system/tomcat.service file output
-
Reload the daemon.
|
›_ Console |
|
|
-
Start and enable the Tomcat service.
|
›_ Console |
|
|
-
Confirm that the Tomcat service is running.
|
›_ Console |
|
|
Tomcat Service Status
-
Open
http://<apache_tomcat_-server-ip>:8080in any web browser and verify if Apache Tomcat page is visible.
Browser Output over page 8080