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