Tomcat – TecAdmin https://tecadmin.net How to guide for System Administrator's and Developers Sat, 17 Dec 2022 07:38:57 +0000 en-US hourly 1 https://wordpress.org/?v=6.1.1 How to Check Tomcat Version on Linux https://tecadmin.net/check-tomcat-version/ https://tecadmin.net/check-tomcat-version/#respond Thu, 08 Sep 2022 11:01:14 +0000 https://tecadmin.net/?p=31532 Q. How do I find the installed Tomcat version on a Linux system? Tomcat installation provides an shell script version.sh for the Linux-based systems and version.bat for Windows systems. This script provides detailed information about the Tomcat version and other details. This quick blog post will help you to find the Tomcat version installed on [...]

The post How to Check Tomcat Version on Linux appeared first on TecAdmin.

]]>
Q. How do I find the installed Tomcat version on a Linux system?

Tomcat installation provides an shell script version.sh for the Linux-based systems and version.bat for Windows systems. This script provides detailed information about the Tomcat version and other details. This quick blog post will help you to find the Tomcat version installed on your system.

Check Tomcat Version

  1. Use the cd command to switch to the Tomcat installation bin directory. The location of the directory depends on the installation types. The packages installed on the official repository are generally installed under the /etc/tomcat directory. Custom installation is generally done under the /opt or /usr/share directory.
    cd /usr/share/tomcat/bin 
    

    Note: If you still have not found the directory, I have discussed a few methods at the end of this article.

  2. You will find a version.sh script under the bin directory. You can execute this script to find the installed Tomcat version along with a few other details.
    ./version.sh 
    
    Using CATALINA_BASE:   /usr/share/tomcat
    Using CATALINA_HOME:   /usr/share/tomcat
    Using CATALINA_TMPDIR: /usr/share/tomcat/temp
    Using JRE_HOME:        /usr
    Using CLASSPATH:       /usr/share/tomcat/bin/bootstrap.jar:/usr/share/tomcat/bin/tomcat-juli.jar
    Using CATALINA_OPTS:
    Server version: Apache Tomcat/10.0.23
    Server built:   Jul 14 2022 08:16:11 UTC
    Server number:  10.0.23.0
    OS Name:        Linux
    OS Version:     5.15.0-47-generic
    Architecture:   amd64
    JVM Version:    17.0.1+12-LTS-39
    JVM Vendor:     Oracle Corporation
    

Here is the screenshot of the Tomcat version running on a Ubuntu 22.04 system. I have recently installed it from the source code.

Check Tomcat Version
Check Tomcat Version

Note: If you don’t know the installation directory. You can try the following commands to find it.

find / -type d -name "*tomcat*"
find / -type f -name version.sh

Conclusion

It’s a good practice to keep servers up to date. You may also need to check the currently installed Tomcat version to find if a newer version is available. This blog post will help you to find the Tomcat version via the command line interface.

The post How to Check Tomcat Version on Linux appeared first on TecAdmin.

]]>
https://tecadmin.net/check-tomcat-version/feed/ 0
How to Install Tomcat 10 on Debian 10 https://tecadmin.net/how-to-install-tomcat-10-on-debian-10/ https://tecadmin.net/how-to-install-tomcat-10-on-debian-10/#comments Fri, 26 Mar 2021 06:00:53 +0000 https://tecadmin.net/?p=24965 Apache Tomcat is an open-source web server with a servlet container for publishing Java-based web applications. Tomcat is developed and maintained by an open community of developers under the auspices of the Apache Software Foundation. As of today, Tomcat 10 is the latest stable version available for installation on development and production environments. To know [...]

The post How to Install Tomcat 10 on Debian 10 appeared first on TecAdmin.

]]>
Apache Tomcat is an open-source web server with a servlet container for publishing Java-based web applications. Tomcat is developed and maintained by an open community of developers under the auspices of the Apache Software Foundation. As of today, Tomcat 10 is the latest stable version available for installation on development and production environments. To know more about the Apache Tomcat visit apache official site http://tomcat.apache.org/.

This tutorial will help you to how to install Apache Tomcat 10 on Debian 10 Buster Linux system.

Prerequisites

A running Debian 10 system with sudo privileged account shell access.

You can get cheaper instances from DigitalOcean hosting.

Step 1 – Install Java

Tomcat 10 required JRE 8 or higher version installed on your system. If your system doesn’t have JRE installed, Use the following commands to install OpenJDK to fulfil the requirements.

sudo apt update 
sudo apt install default-jdk -y 

Check the current active Java version:

java -version 

openjdk 11.0.9.1 2020-11-04
OpenJDK Runtime Environment (build 11.0.9.1+1-post-Debian-1deb10u2)
OpenJDK 64-Bit Server VM (build 11.0.9.1+1-post-Debian-1deb10u2, mixed mode, sharing)

Step 2 – Create Tomcat User

It is good to have a dedicated user account for running a Tomcat server. To create a new user with the name “tomcat”, which is recommended for security purposes mainly for production deployments.

To create a new account, type:

sudo useradd -m -d /opt/tomcat -U -s /bin/false tomcat 

The above command will create a user and group with the name “tomcat” in your system.

Step 3 – Install Tomcat on Debian 10

The Apache Tomcat development team releases the latest version of Tomcat from time to time. So it will be good check download latest Tomcat version from the official download server. Use the below command to download Tomcat 10.

wget https://dlcdn.apache.org/tomcat/tomcat-10/v10.0.16/bin/apache-tomcat-10.0.16.tar.gz 

After downloading the archive file, extract the file under the tomcat home directory /opt/tomcat with skipping parent folder.

sudo tar xzvf apache-tomcat-10*tar.gz -C /opt/tomcat --strip-components=1 

Next, set the proper file permissions.

sudo chown -R tomcat:tomcat /opt/tomcat/ 
sudo chmod -R u+x /opt/tomcat/bin 

You have now the latest Tomcat application on your system.

Step 4 – Create Tomcat User

Now, configure your tomcat with user accounts to secure access of admin/manager pages. To do this, edit conf/tomcat-users.xml file in your editor and paste the following code inside <tomcat-users> </tomcat-users> tags. We recommend changing the password in the below configuration with high secured password.

sudo nano /opt/tomcat/conf/tomcat-users.xml 

Add the following values. Make sure to change the password for admin and manager access.

<!-- user manager can access only manager section -->
<role rolename="manager-gui" />
<user username="manager" password="_SECRET_PASSWORD_" roles="manager-gui" />

<!-- user admin can access manager and admin section both -->
<role rolename="admin-gui" />
<user username="admin" password="_SECRET_PASSWORD_" roles="manager-gui,admin-gui" />

Save file and close.

Step 5 – Enable Remote Tomcat Access

The default Tomcat manager and host-manager applications are accessible for localhost only. To allow access to these pages from the remote system, you need to modify the following configuration files.

You can either allow specific remote system or allow all. Edit the context.xml file for manager and host manager application:

sudo nano /opt/tomcat/webapps/manager/META-INF/context.xml

Comment out the section added for IP address restriction to allow connections from anywhere.

<Context antiResourceLocking="false" privileged="true" >
  <CookieProcessor className="org.apache.tomcat.util.http.Rfc6265CookieProcessor"
                   sameSiteCookies="strict" />
  <!-- <Valve className="org.apache.catalina.valves.RemoteAddrValve"
         allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" /> -->
  ...
</Context>

Also, edit the context.xml for the host-manager interface and comment on the similar section as above.

sudo nano /opt/tomcat/webapps/host-manager/META-INF/context.xml

Tomcat allow remote access

Save all files and close them.

Step 6 – Create a Tomcat Systemd Unit File

Tomcat provides bash scripts to start, stop service. But, to make it simple, create a start-up script to manage Tomcat as systemd service. Let’s create a tomcat.service file with the following content:

sudo nano /etc/systemd/system/tomcat.service 
[Unit]
Description=Tomcat
After=network.target

[Service]
Type=forking

User=tomcat
Group=tomcat

Environment="JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk-amd64"
Environment="JAVA_OPTS=-Djava.security.egd=file:///dev/urandom"
Environment="CATALINA_BASE=/opt/tomcat"
Environment="CATALINA_HOME=/opt/tomcat"
Environment="CATALINA_PID=/opt/tomcat/temp/tomcat.pid"
Environment="CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC"

ExecStart=/opt/tomcat/bin/startup.sh
ExecStop=/opt/tomcat/bin/shutdown.sh

[Install]
WantedBy=multi-user.target

Reload the systemd daemon service to load newly create files.

sudo systemctl daemon-reload 

Now, start the Tomcat application for the first time.

sudo systemctl start tomcat.service 

Next, enable the tomcat service to auto-start for subsequent system boots. This is more important for the production deployments.

sudo systemctl enable tomcat.service 

As of now, the tomcat application is running on your system. You can verify the service status by executing the command as below. Make sure the status is showing “active (running)“.

sudo systemctl status tomcat.service 

Manage Tomcat with systemd

That’s it. You have successfully configured Tomcat 10 on your Debian system.

Step 7 – Access the Tomcat Web Interface

The default Tomcat server runs on port 8080. As you have configured Tomcat on your system, you can access the web interface from your system. You can access tomcat interfaces by entering your server’s IP address or a domain name pointed to that server, followed by port 8080 in your browser:

Change tecadmin.local with your server ip or domain or localhost.

http://tecadmin.local:8080/

You will see the page like below:

Installing Tomcat 10

Tomcat Manager App is a web application packaged with the Tomcat server application. The Manager interface provides us with the basic functionality we need to manage our deployed web applications.

Click Manager App button home page or directly type /manager in browser url of main Tomcat server to access it.

http://tecadmin.local:8080/manager/

Tomcat 10 Manager Dashboard

Tomcat Host Manager App is another web application packaged with Tomcat server application. Which is used to creates/removes Virtual Hosts within the Tomcat service. A Virtual Host allows you to define multiple hostnames on a single server.

Click Host Manager button home page or directly type /host-manager url in main Tomcat server to access it.

http://tecadmin.local:8080/host-manager/

Tomcat 10 Host Manager Page

Conclusion

Congratulations, You have a running Tomcat server on a Debian system. You can deploy a Java-based application using a tomcat server.

You may also need to create Virtualhosts in Tomcat or Secure your Tomcat applications with Let’s Encrypt SSL certificate.

The post How to Install Tomcat 10 on Debian 10 appeared first on TecAdmin.

]]>
https://tecadmin.net/how-to-install-tomcat-10-on-debian-10/feed/ 2
How To Secure Tomcat with Let’s Encrypt SSL https://tecadmin.net/how-to-install-lets-encrypt-ssl-with-tomcat/ https://tecadmin.net/how-to-install-lets-encrypt-ssl-with-tomcat/#comments Wed, 24 Mar 2021 18:34:57 +0000 https://tecadmin.net/?p=24991 Let’s Encrypt is a certificate authority that provides valid SSL certificates to be used for the web application. It provides certificates freely for everyone with some restrictions. Security first should be the thumb rule for any organization to secure your hard-working code from hackers. It becomes more important while traveling application data over public networks. [...]

The post How To Secure Tomcat with Let’s Encrypt SSL appeared first on TecAdmin.

]]>
Let’s Encrypt is a certificate authority that provides valid SSL certificates to be used for the web application. It provides certificates freely for everyone with some restrictions.

Security first should be the thumb rule for any organization to secure your hard-working code from hackers. It becomes more important while traveling application data over public networks. For this situation, we need to implement end-to-end encryption using TLS.

This tutorial helps you to issue a new let’s encrypt SSL certificate and configure it with the Tomcat web server.

Prerequisites

This tutorial doesn’t cover the Tomcat installation. We are assuming that you already have a Tomcat server running on your system. You can visit Tomcat installation tutorials.

Step 1 – Installing Certbot

Certbot is a command-line utility to create and manage Let’s Encrypt SSL certificates. Which is available for most of the operating systems.

Debian-based users can install certbot by running the following command. Other operating system users can install it from here.

sudo apt install certbot 

Next, create the SSL certificate for your domain. Make sure the domain is already pointed to the tomcat server from DNS. For this tutorial, I am using the tomcat.tecadmin.net subdomain.

sudo certbot certonly --standalone -d tomcat.tecadmin.net 

Once the certificate issued, you can see all the related files at below location:

sudo ls /etc/letsencrypt/live/tomcat.tecadmin.net/ 
Output
cert.pem chain.pem fullchain.pem privkey.pem README

These are all the files you need for the SSL certificate setup.

Step 2 – Configure Tomcat with Let’s Encrypt SSL

Next, configure your Tomcat server to listen on the secure protocol. By default, Tomcat uses 8443 to listen for SSL/TLS requests.

Copy SSL certificate’s and private key files under /opt/tomcat/conf directory:

cd /etc/letsencrypt/live/tomcat.tecadmin.net 
sudo cp {cert,chain,privkey}.pem /opt/tomcat/conf/ 

Then edit the conf/server.xml file available under the Tomcat home directory. In my case Tomcat is installed under /opt/tomcat, So use the below command to edit the configuration file.

sudo nano /opt/tomcat/conf/server.xml 

Remove <!-- and --> to uncomment the following section in configuration file. Also add the certificate section with your certificate files. The configuration will be look like:

    <Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
               maxThreads="150" SSLEnabled="true">
        <SSLHostConfig>
            <Certificate certificateFile="conf/cert.pem"
                 certificateKeyFile="conf/privkey.pem"
                 certificateChainFile="conf/chain.pem" />
        </SSLHostConfig>
    </Connector>

Press CTRL+O to save changes and CTRL+X to exit from the editor.

Now, restart the Tomcat service to apply changes.

sudo systemctl restart tomcat 

That’s it. You have configured Let’s Encrypt SSL with Tomcat.

The next step is to verify the setup.

Step 3 – Verify Tomcat SSL Certificate

Default tomcat with SSL listens on 8443 port. Use your domain with an 8443 port to access Tomcat over the secure socket layer.

  • https://tomcat.tecadmin.net:8443

Setup lets encrypt ssl with tomcat

That’s it. You have successfully configured Let’s Encrypt SSL with Tomcat.

Step 4 – Renew SSL Certificate

The default Let’s Encrypt SSL certificates expire in 90 days. You can easily refresh your SSL certificate anytime within 30 days of expiration.

Type the below command to refresh the SSL certificate.

certbot certonly --standalone -d tomcat.tecadmin.net 

Once successfully renewed. Copy the newly generated certificate files to the Tomcat conf directory.

cd /etc/letsencrypt/live/tomcat.tecadmin.net 
cp {cert,chain,privkey}.pem /opt/tomcat/conf 

Restart the Tomcat service to apply changes.

sudo systemctl restart tomcat 

Conclusion

In this tutorial, You have learned to set up the Let’s Encrypt SSL certificate with the Tomcat web server. Additionally provides you with steps to renew your SSL certificate.

The post How To Secure Tomcat with Let’s Encrypt SSL appeared first on TecAdmin.

]]>
https://tecadmin.net/how-to-install-lets-encrypt-ssl-with-tomcat/feed/ 9
How to Install Tomcat 10 on Ubuntu 20.04 https://tecadmin.net/how-to-install-tomcat-10-on-ubuntu-20-04/ https://tecadmin.net/how-to-install-tomcat-10-on-ubuntu-20-04/#comments Wed, 17 Mar 2021 15:15:16 +0000 https://tecadmin.net/?p=24944 Apache Tomcat is an open-source web server with a servlet container for publishing Java-based web applications. Tomcat is developed and maintained by an open community of developers under the auspices of the Apache Software Foundation. As of today, Tomcat 10 is the latest stable version available for installation on development and production environments. To know [...]

The post How to Install Tomcat 10 on Ubuntu 20.04 appeared first on TecAdmin.

]]>
Apache Tomcat is an open-source web server with a servlet container for publishing Java-based web applications. Tomcat is developed and maintained by an open community of developers under the auspices of the Apache Software Foundation. As of today, Tomcat 10 is the latest stable version available for installation on development and production environments. To know more about the Apache Tomcat visit apache official site http://tomcat.apache.org/.

This tutorial will help you to how to install Apache Tomcat 10 on Ubuntu 20.04 LTS Linux systems.

Prerequisites

A running Ubuntu 20.04 system with shell access of root or sudo privileged account access.

For the newly installed systems recommended to complete initial server setup instructions.

Step 1 – Install Java

You must have JRE (Java runtime environment) installed on your system. Tomcat 10 is required to have JRE 8 or higher version installed on your system. Use the following command to install OpenJDK to fulfil the requirements.

sudo apt update 
sudo apt install default-jdk -y 

Check the current active Java version:

java -version 

openjdk 11.0.13 2021-10-19
OpenJDK Runtime Environment (build 11.0.13+8-Ubuntu-0ubuntu1.20.04)
OpenJDK 64-Bit Server VM (build 11.0.13+8-Ubuntu-0ubuntu1.20.04, mixed mode, sharing)

Step 2 – Create Tomcat User

We recommended running a Tomcat server with a dedicated user account. Create a new user, which is recommended for security purposes mainly for production deployments.

To create a new account, type:

sudo useradd -m -d /opt/tomcat -U -s /bin/false tomcat 

The above command will create a user and group with the name “tomcat” in your system.

Step 3 – Install Tomcat 10

The Apache Tomcat development team releases the latest version of Tomcat from time to time. So it will be good check download latest Tomcat version from the official download server. Use the below command to download Tomcat 10.

wget https://dlcdn.apache.org/tomcat/tomcat-10/v10.0.23/bin/apache-tomcat-10.0.23.tar.gz 

Once the download is completed, extracted the downloaded archive and copy all content to the tomcat home directory.

sudo tar xzvf apache-tomcat-10*tar.gz -C /opt/tomcat --strip-components=1 

Next, set the proper file permissions.

sudo chown -R tomcat:tomcat /opt/tomcat/ 
sudo chmod -R u+x /opt/tomcat/bin 

You have now the latest Tomcat application on your system.

Step 4 – Create Tomcat User

Now, configure your tomcat with user accounts to secure access of admin/manager pages. To do this, edit conf/tomcat-users.xml file in your editor and paste the following code inside <tomcat-users> </tomcat-users> tags. We recommend changing the password in the below configuration with high secured password.

sudo nano /opt/tomcat/conf/tomcat-users.xml 

Add the following values. Make sure to change the password for admin and manager access.

<!-- user manager can access only manager section -->
<role rolename="manager-gui" />
<user username="manager" password="_SECRET_PASSWORD_" roles="manager-gui" />

<!-- user admin can access manager and admin section both -->
<role rolename="admin-gui" />
<user username="admin" password="_SECRET_PASSWORD_" roles="manager-gui,admin-gui" />

Save file and close.

Step 5 – Enable Remote Tomcat Access

The default Tomcat manager and host-manager applications are accessible for localhost only. To allow access to these pages from the remote system, you need to modify the following configuration files.

You can either allow a specific remote system or allow all. Edit the context.xml file for manager and host manager application:

sudo nano /opt/tomcat/webapps/manager/META-INF/context.xml

Comment out the section added for IP address restriction to allow connections from anywhere.

<Context antiResourceLocking="false" privileged="true" >
  <CookieProcessor className="org.apache.tomcat.util.http.Rfc6265CookieProcessor"
                   sameSiteCookies="strict" />
  <!-- <Valve className="org.apache.catalina.valves.RemoteAddrValve"
         allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" /> -->
  ...
</Context>

Similarly edit context.xml for host manager application in text editor:

sudo nano /opt/tomcat/webapps/host-manager/META-INF/context.xml

Comment out the same section to allow connections from anywhere.

<Context antiResourceLocking="false" privileged="true" >
  <CookieProcessor className="org.apache.tomcat.util.http.Rfc6265CookieProcessor"
                   sameSiteCookies="strict" />
  <!--<Valve className="org.apache.catalina.valves.RemoteAddrValve"
         allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" /> -->
  ...
</Context>

Save all files and close it.

Step 6 – Create a Tomcat Systemd Unit File

Tomcat provides bash scripts to start, stop service. But, to make it simple, create a startup script to manage Tomcat as systemd service. Let’s create a tomcat.service file with the following content:

sudo nano /etc/systemd/system/tomcat.service 
[Unit]
Description=Tomcat
After=network.target

[Service]
Type=forking

User=tomcat
Group=tomcat

Environment="JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk-amd64"
Environment="JAVA_OPTS=-Djava.security.egd=file:///dev/urandom"
Environment="CATALINA_BASE=/opt/tomcat"
Environment="CATALINA_HOME=/opt/tomcat"
Environment="CATALINA_PID=/opt/tomcat/temp/tomcat.pid"
Environment="CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC"

ExecStart=/opt/tomcat/bin/startup.sh
ExecStop=/opt/tomcat/bin/shutdown.sh

[Install]
WantedBy=multi-user.target

Reload the systemd daemon service to load newly create files.

sudo systemctl daemon-reload 

Now, start the Tomcat application for the first time.

sudo systemctl start tomcat.service 

Next, enable the tomcat service to auto-start for subsequent system boots. This is more important for the production deployments.

sudo systemctl enable tomcat.service 

As of now, the tomcat application is running on your system. You can verify the service status by executing the command as below. Make sure the status is showing “active (running)“.

sudo systemctl status tomcat.service 
● tomcat.service - Tomcat
     Loaded: loaded (/etc/systemd/system/tomcat.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2021-03-17 10:56:39 IST; 3h 45min ago
    Process: 481049 ExecStart=/opt/tomcat/bin/startup.sh (code=exited, status=0/SUCCESS)
   Main PID: 481056 (java)
      Tasks: 29 (limit: 4539)
     Memory: 264.2M
     CGroup: /system.slice/tomcat.service
             └─481056 /usr/lib/jvm/java-1.11.0-openjdk-amd64/bin/java -Djava.util.logging.config.file>

Mar 17 10:56:39 tecadmin-ubuntu2004 systemd[1]: Starting Tomcat...
Mar 17 10:56:39 tecadmin-ubuntu2004 startup.sh[481049]: Tomcat started.
Mar 17 10:56:39 tecadmin-ubuntu2004 systemd[1]: Started Tomcat.

Step 7 – Access the Tomcat Web Interface

The default Tomcat server runs on port 8080. As you have configured Tomcat on your system, you can access web interface from your system. You can access tomcat interfaces by entering your server’s IP address or a domain name pointed to that server, followed by port 8080 in your browser:

Change tecadmin.local with your server ip or domain or localhost.

http://tecadmin.local:8080/

You will see the page like below:

Installing Tomcat 10

Tomcat Manager App is a web application packaged with the Tomcat server application. The Manager interface provides us with the basic functionality we need to manage our deployed web applications.

Click Manager App button home page or directly type /manager in browser url of main Tomcat server to access it.

http://tecadmin.local:8080/manager/

Tomcat 10 Manager Dashboard

Tomcat Host Manager App is another web application packaged with Tomcat server application. Which is used to creates/removes Virtual Hosts within the Tomcat service. A Virtual Host allows you to define multiple hostnames on a single server.

Click Host Manager button home page or directly type /host-manager url in main Tomcat server to access it.

http://tecadmin.local:8080/host-manager/

Tomcat 10 Host Manager Page

Conclusion

You have a running Tomcat server on Ubuntu system. You may need to create a Virtual host or configure a SSL certificate in Tomcat.

The post How to Install Tomcat 10 on Ubuntu 20.04 appeared first on TecAdmin.

]]>
https://tecadmin.net/how-to-install-tomcat-10-on-ubuntu-20-04/feed/ 5
How to Allow Remote Access to Tomcat Manager https://tecadmin.net/allow-tomcat-manager-access-from-remote-host/ https://tecadmin.net/allow-tomcat-manager-access-from-remote-host/#respond Wed, 27 May 2020 14:40:15 +0000 https://tecadmin.net/?p=21659 The default Tomcat server does not allow remote access to the Manager and HostManager applications. This tutorial will teach you how to configure Tomcat so that remote hosts can access the Manager and HostManager applications. Tomcat have a context file for each deployed web application under the conf/Catalina/localhost directory. It has the file with the [...]

The post How to Allow Remote Access to Tomcat Manager appeared first on TecAdmin.

]]>
The default Tomcat server does not allow remote access to the Manager and HostManager applications. This tutorial will teach you how to configure Tomcat so that remote hosts can access the Manager and HostManager applications.

Tomcat have a context file for each deployed web application under the conf/Catalina/localhost directory. It has the file with the same name as the web app like manager.xml or host-manager.xml.

So, if the file is not present, you need to create a file conf/Catalina/localhost/manager.xml and specify the rule to allow remote hosts.

sudo nano ${CATLINA_HOME}/conf/Catalina/localhost/manager.xml 

Add the following content.

<Context privileged="true" antiResourceLocking="false" 
         docBase="{catalina.home}/webapps/manager">
    <Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="^.*$" />
</Context>

You also need to create an XML file for the host-manager web app to allow access for remote hosts.

sudo nano ${CATLINA_HOME}conf/Catalina/localhost/host-manager.xml 

Add the following content.

<Context privileged="true" antiResourceLocking="false" 
         docBase="{catalina.home}/webapps/host-manager">
    <Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="^.*$" />
</Context>

After you create the XML files, you must restart the Apache server in order to read the new files. Now, when you access the manager or host-manager web app, you will be prompted for authentication.

The post How to Allow Remote Access to Tomcat Manager appeared first on TecAdmin.

]]>
https://tecadmin.net/allow-tomcat-manager-access-from-remote-host/feed/ 0
How to Install Tomcat 9 on Ubuntu 20.04 https://tecadmin.net/install-tomcat-ubuntu-20-04/ https://tecadmin.net/install-tomcat-ubuntu-20-04/#comments Wed, 27 May 2020 14:39:36 +0000 https://tecadmin.net/?p=21652 The Apache Tomcat 9 is the latest version available for installation. Tomcat is an open-source web server for Java-based applications developed by the Apache Foundation. We use Tomcat for deploying Java Servlet and JSP applications. To know more about the Apache Tomcat visit apache official site http://tomcat.apache.org/. Prerequisites A running Ubuntu 20.04 system with shell [...]

The post How to Install Tomcat 9 on Ubuntu 20.04 appeared first on TecAdmin.

]]>
The Apache Tomcat 9 is the latest version available for installation. Tomcat is an open-source web server for Java-based applications developed by the Apache Foundation. We use Tomcat for deploying Java Servlet and JSP applications. To know more about the Apache Tomcat visit apache official site http://tomcat.apache.org/.

Prerequisites

A running Ubuntu 20.04 system with shell access of root or sudo privileged account access.

Installing Java

You must have Java installed on your system to run the tomcat server. Tomcat 9 is required to have Java 8 or a higher version installed on your system. Use the following command to install OpenJDK on your system or skip if already installed.

sudo apt install openjdk-11-jdk

Check the current active Java version:

java -version

openjdk version "11.0.7" 2020-04-14
OpenJDK Runtime Environment (build 11.0.7+10-post-Ubuntu-3ubuntu1)
OpenJDK 64-Bit Server VM (build 11.0.7+10-post-Ubuntu-3ubuntu1, mixed mode, sharing)

Create A Tomcat Account

We recommend creating a separate user account to run the tomcat web server on the Ubuntu system. This will be good for security purposes.

To create account execute following command:

sudo useradd -m -d /opt/tomcat -U -s /bin/false tomcat

The above command will create a user and group with the name “tomcat” on your system.

Download Tomcat Archive

The Apache Tomcat development team releases the latest version of Tomcat from time to time. So it will be good check download latest Tomcat version from the official download server. Use the below command to download Tomcat 9.0.58.

wget https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.58/bin/apache-tomcat-9.0.58.tar.gz

Once the file is downloaded, extracted the archive file and copy all content to the tomcat home directory.

tar xzf apache-tomcat-9.0.58.tar.gz
sudo mv apache-tomcat-9.0.58/* /opt/tomcat/

Also, set the proper ownership of all files.

sudo chown -R tomcat:tomcat /opt/tomcat/

You can also download Tomcat 8 instead of Tomcat 9 and change above commands accordingly. Remaining steps will be same for both.

Enable Host/Manager Remote Access

By default Tomcat manager and host-manager, pages are accessible from the localhost system only. To allow access to these pages from the remote system, you need to create the following configuration files.

First create manager xml file:

sudo nano /opt/tomcat/conf/Catalina/localhost/manager.xml

Add the following content

<Context privileged="true" antiResourceLocking="false"
         docBase="{catalina.home}/webapps/manager">
    <Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="^.*$" />
</Context>

Then create host-manager xml file:

vim /opt/tomcat/conf/Catalina/localhost/host-manager.xml

Add the following content

<Context privileged="true" antiResourceLocking="false"
         docBase="${catalina.home}/webapps/host-manager">
    <Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="^.*$" />
</Context>

Save both files and close.

Create Tomcat Access Credentials

Now, configure your tomcat with user accounts to secure access of admin/manager pages. To do this, edit conf/tomcat-users.xml file in your editor and paste the following code inside <tomcat-users> </tomcat-users> tags. We recommend changing the password in the below configuration with high secured password.

sudo nano /opt/tomcat/conf/tomcat-users.xml

Add the following values. Make sure to change the password for admin and manager access.

<!-- user manager can access only manager section -->
<role rolename="manager-gui" />
<user username="manager" password="_SECRET_PASSWORD_" roles="manager-gui" />

<!-- user admin can access manager and admin section both -->
<role rolename="admin-gui" />
<user username="admin" password="_SECRET_PASSWORD_" roles="manager-gui,admin-gui" />

Save file and close.

Create A Tomcat Startup Script

Tomcat provides bash scripts to start, stop service. But, to make it simpl, create a startup script to manage Tomcat as systemd service. Let’s create a tomcat.service file with the following content:

sudo nano /etc/systemd/system/tomcat.service
[Unit]
Description=Tomcat
After=network.target

[Service]
Type=forking

User=tomcat
Group=tomcat

Environment="JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64"
Environment="JAVA_OPTS=-Djava.security.egd=file:///dev/urandom"
Environment="CATALINA_BASE=/opt/tomcat"
Environment="CATALINA_HOME=/opt/tomcat"
Environment="CATALINA_PID=/opt/tomcat/temp/tomcat.pid"
Environment="CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC"

ExecStart=/opt/tomcat/bin/startup.sh
ExecStop=/opt/tomcat/bin/shutdown.sh

[Install]
WantedBy=multi-user.target

Reload the systemd daemon service to apply changes

sudo systemctl daemon-reload

Then, enable and start Tomcat service on your system

sudo systemctl enable tomcat
sudo systemctl start tomcat

Accessing Tomcat

Tomcat server works on port 8080 default. To access Tomcat on the web browser by connecting your server on port 8080.

If you are connecting from the local machine then use http://localhost or use the IP address for the remote system with port:

http://host.tecadmin.net:8080

install tomcat on Ubuntu 20.04

http://host.tecadmin.net:8080/manager/html

Tomcat manager access ubuntu 20.04

http://host.tecadmin.net:8080/host-manager/html

Tomcat host manager ubuntu 20.04

Conclusion

You have a running Tomcat server on Ubuntu system. You may need to create a Virtual host or configure a SSL certificate in Tomcat.

The post How to Install Tomcat 9 on Ubuntu 20.04 appeared first on TecAdmin.

]]>
https://tecadmin.net/install-tomcat-ubuntu-20-04/feed/ 1
How to Install Tomcat 9 on CentOS/RHEL 8 https://tecadmin.net/install-tomcat-9-on-centos-8/ https://tecadmin.net/install-tomcat-9-on-centos-8/#comments Sun, 22 Dec 2019 13:00:24 +0000 https://tecadmin.net/?p=20028 Apache Tomcat 9 is the latest version available for the installation of the Tomcat web server. Tomcat is an open-source web server for Java-based applications developed by the Apache Foundation. We use Tomcat for deploying Java Servlet and JSP applications. To know more about the Apache Tomcat visit apache official site http://tomcat.apache.org/. This tutorial will [...]

The post How to Install Tomcat 9 on CentOS/RHEL 8 appeared first on TecAdmin.

]]>
Apache Tomcat 9 is the latest version available for the installation of the Tomcat web server. Tomcat is an open-source web server for Java-based applications developed by the Apache Foundation. We use Tomcat for deploying Java Servlet and JSP applications. To know more about the Apache Tomcat visit apache official site http://tomcat.apache.org/.

This tutorial will help you to install and configure the Tomcat 9 server on CentOS 8 and RHEL 8 Linux systems.

Prerequisites

  • Shell access
  • sudo priviledged account access

Step 1 – Install Java

Java is the primary requirement for running Tomcat 9 on CentOS 8 Linux system. Make sure you have Java 8 or higher version installed in your system. Use the following command to install OpenJDK on your system.

sudo dnf install openjdk 

Then check the installed Java version

java -version

openjdk version "11.0.7" 2020-04-14 LTS
OpenJDK Runtime Environment 18.9 (build 11.0.7+10-LTS)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.7+10-LTS, mixed mode, sharing)

Step 2 – Create Tomcat User

Many system administrators run Tomcat as a root user which is not the correct way for security purposes. So, create a separate account to run your Tomcat server on your system.

sudo useradd -m -d /opt/tomcat -U -s /bin/false tomcat 

The above command will create a user with the name “tomcat” with a group named “tomcat”.

Step 3 – Download Tomcat 9 Archive

The Apache Tomcat is available on official download pages, Where you can select the nearest peers to download Tomcat faster. To download Apache Tomcat archive file from Apache tomcat official download server use the following command:

wget https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.70/bin/apache-tomcat-9.0.70.tar.gz 

Then extract the archive file and copy all the files under the tomcat home directory

tar xzf apache-tomcat-9.0.70.tar.gz 
sudo mv apache-tomcat-9.0.70/* /opt/tomcat/ 

Also, set the proper ownership of all files.

sudo chown -R tomcat:tomcat /opt/tomcat/ 

Step 4 – Enable Host/Manager for Remote IP

By default Tomcat manager and host-manager, pages are enabled to access from localhost only. To access these pages from the remote system, you have to allow your IP or IP range in the application-specific context.xml file.

  • Manager – /opt/tomcat/webapps/manager/META-INF/context.xml
  • Host Manager – /opt/tomcat/webapps/host-manager/META-INF/context.xml

Edit both of the above files one by one and add your IP address (like 192.168.1.10) or range of IP addresses to allow access. For reference see the below screenshot.

Tomcat enable remote access

You can also totally comment on these Valve entries to allow all.

Step 5 – Setup User Accounts

Now, configure your tomcat with user accounts to secure access to admin/manager pages. To do this, edit /opt/tomcat/conf/tomcat-users.xml file in your editor and paste the following code inside <tomcat-users> </tomcat-users> tags. We recommend changing the password in the below configuration with high secured password.

<!-- user manager can access only manager section -->
<role rolename="manager-gui" />
<user username="manager" password="_SECRET_PASSWORD_" roles="manager-gui" />

<!-- user admin can access manager and admin section both -->
<role rolename="admin-gui" />
<user username="admin" password="_SECRET_PASSWORD_" roles="manager-gui,admin-gui" />

Save the file and close.

Step 6 – Create Tomcat Start Script

Tomcat provides bash scripts to start, and stop service. But, to make it simple, create a startup script to manage Tomcat as systemd service. Let’s create a tomcat.service file with the following content:

sudo vim /etc/systemd/system/tomcat.service 

Add the below snippet.

[Unit]
Description=Tomcat 9
After=network.target

[Service]
Type=forking

User=tomcat
Group=tomcat

Environment="JAVA_HOME=/usr/lib/jvm/jre"
Environment="JAVA_OPTS=-Djava.security.egd=file:///dev/urandom"
Environment="CATALINA_BASE=/opt/tomcat"
Environment="CATALINA_HOME=/opt/tomcat"
Environment="CATALINA_PID=/opt/tomcat/temp/tomcat.pid"
Environment="CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC"

ExecStart=/opt/tomcat/bin/startup.sh
ExecStop=/opt/tomcat/bin/shutdown.sh

[Install]
WantedBy=multi-user.target

Reload the systemd daemon service to apply changes

sudo systemctl daemon-reload 

Then, enable and start the Tomcat service on your system

sudo systemctl enable tomcat.service 
sudo systemctl start tomcat.service 
Step 7 – Access Tomcat in Browser

Tomcat server works on port 8080 default. To access Tomcat on the web browser by connecting your server to port 8080.

If you are connecting from the local machine then use the localhost. To connect from a remote machine use the IP address of the system with port:

 http://localhost:8080 

Install Tomcat on CentOS 8

Conclusion

You have a running Tomcat 9 server on CentOS 8 system. You may need to create a Virtual host or configure a SSL certificate in Tomcat.

The post How to Install Tomcat 9 on CentOS/RHEL 8 appeared first on TecAdmin.

]]>
https://tecadmin.net/install-tomcat-9-on-centos-8/feed/ 3
How to Install Tomcat 9 on Debian 11/10/9 https://tecadmin.net/install-apache-tomcat-9-on-debian/ https://tecadmin.net/install-apache-tomcat-9-on-debian/#comments Sat, 24 Mar 2018 03:43:34 +0000 https://tecadmin.net/?p=15651 Apache Tomcat 9 is the latest version available for installation. Apache Tomcat is a product of the Apache Software Foundation. It is an open-source implementation of the Java Servlet and JavaServer Pages (JSP) technologies. Tomcat is a web server used for hosting the Java-based web application. The current Apache Tomcat 9.0.50 release is available. This [...]

The post How to Install Tomcat 9 on Debian 11/10/9 appeared first on TecAdmin.

]]>
Apache Tomcat 9 is the latest version available for installation. Apache Tomcat is a product of the Apache Software Foundation. It is an open-source implementation of the Java Servlet and JavaServer Pages (JSP) technologies. Tomcat is a web server used for hosting the Java-based web application.

The current Apache Tomcat 9.0.50 release is available. This tutorial will guide you through step by step installation of the Apache Tomcat server on Debian. Let’s follow to Install Apache Tomcat 9 on Debian 10/9/8.

Step 1 – Prerequisites

You must have root user or sudo privileged user access to install Tomcat on the Debian system. Login to your Debian system with shell access. Use SSH to get access to the remote Linux system.

ssh root@debian 

Now update the apt package manager cache and upgrade the current packages of the system.

sudo apt update
sudo apt upgrade

Step 2 – Install Java

You must have Java installed on the system before installing Apache Tomcat on a Linux VPS. Tomcat 9 required Java 8 or later versions to work.

java -version

java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)

If you don’t have Java installed on your system or installed a lower version, Use this tutorial to install Java 8 on a Debian machine.

Step 3 – Install Apache Tomcat 9 on Debian

You need to download the Tomcat archive from its official download website or mirrors. Download Apache Tomcat 9 archive file using following commands or you can visit Tomcat 9 official download page for download most recent available version.

wget https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.58/bin/apache-tomcat-9.0.58.tar.gz
tar xzf pache-tomcat-9.0.58.tar.gz
mv apache-tomcat-9.0.58 /usr/local/tomcat9

Step 4 – Configure Tomcat on Debian

Configure the required environment variables for the Tomcat. Set CATALINA_HOME to the extracted tomcat directory. Also, set Java environment variables as per Java installed on your system. Set all these variables in a file /etc/profile.d/tomcat9.sh.

echo 'export CATALINA_HOME="/usr/local/tomcat9"' > /etc/profile.d/tomcat9.sh
echo 'export JAVA_HOME="/usr/lib/jvm/java-8-oracle"' >> /etc/profile.d/tomcat9.sh
echo 'export JRE_HOME="/usr/lib/jvm/java-8-oracle/jre"' >> /etc/profile.d/tomcat9.sh

This file will automatically load variables after system reboot. To load in current environment run command:

source /etc/profile.d/tomcat9.sh

Step 5 – Setup Tomcat User Accounts

Y need to create user accounts to secure and access admin/manager pages. Edit conf/tomcat-users.xml file in your editor and paste inside <tomcat-users> </tomcat-users> tags.

<!-- user manager can access only manager section -->
<role rolename="manager-gui" />
<user username="manager" password="_SECRET_PASSWORD_" roles="manager-gui" />

<!-- user admin can access manager and admin section both -->
<role rolename="admin-gui" />
<user username="admin" password="_SECRET_PASSWORD_" roles="manager-gui,admin-gui" />

Step 6 – Enable Host/Manager for Remote IP

The default manager and host-manager web pages are enabled to access from localhost only. To access these pages from the remote system, you have to allow your IP or IP range in the application-specific context.xml file.

Manager File: ./webapps/manager/META-INF/context.xml
Host Manager File: ./webapps/host-manager/META-INF/context.xml

Edit the above files and add your IP address like the screenshot. After making changes restart the Tomcat service.

Tomcat enable remote access

Step 7 – Start Tomcat Service

Tomcat is very easy to use, There is no need to compile its source. You simply extract the archive and start the tomcat server. Tomcat by default start on port 8080, So make sure no other application using the same port.

chmod +x ./bin/startup.sh
./bin/startup.sh

[Sample Output]

Using CATALINA_BASE:   /usr/local/tomcat9
Using CATALINA_HOME:   /usr/local/tomcat9
Using CATALINA_TMPDIR: /usr/local/tomcat9/temp
Using JRE_HOME:        /usr/lib/jvm/java-8-oracle/jre
Using CLASSPATH:       /usr/local/tomcat9/bin/bootstrap.jar:/usr/local/tomcat9/bin/tomcat-juli.jar
Tomcat started.

Use below command to stop tomcat server on your system.

./bin/shutdown.sh

Step 8 – Access Tomcat in Browser

Tomcat service uses default port 8080. Open your favorite web browser and connect to your server on port 8080. This will provide access to the Tomcat setup on your system.

Access Tomcat Home- This is default home screen of tomcat 9. There are no authentication required to access this page..

http://localhost.com:8080 

Access Manager App- Click on Manager App link displayed on home page.This page is allowed for Admin and Manager access both.

http://example.com:8080/manager/html 

Access Host Manager Page:- Click on the Host Manager link on your Tomcat home.This page is allowed for Admin access only.

http://example.com:8080/host-manager/html 

Tomcat 9 on Debian

The post How to Install Tomcat 9 on Debian 11/10/9 appeared first on TecAdmin.

]]>
https://tecadmin.net/install-apache-tomcat-9-on-debian/feed/ 5
How to Change Tomcat Port https://tecadmin.net/change-tomcat-default-port/ https://tecadmin.net/change-tomcat-default-port/#comments Sat, 25 Jun 2016 03:25:49 +0000 https://tecadmin.net/?p=10575 If you are using a standalone instance of Tomcat in your production environment and are facing connectivity issues related to the port, you may need to change the default port of Tomcat. The default port of Tomcat is the standard port on which it listens for incoming requests. These ports are non-standard and are commonly [...]

The post How to Change Tomcat Port appeared first on TecAdmin.

]]>
If you are using a standalone instance of Tomcat in your production environment and are facing connectivity issues related to the port, you may need to change the default port of Tomcat. The default port of Tomcat is the standard port on which it listens for incoming requests. These ports are non-standard and are commonly locked by an administrator.

However, if you’ve installed Tomcat as a standalone server and want to change its listening port to a non-standard one, then this article is for you. In this post, we will look at some quick tips on how you can change the default port of Tomcat in a few easy steps. Read ahead to know more!

Changing the Tomcat Port

The first step is to identify the location of the Tomcat installation directory. If you have installed Tomcat from default repositories, it should be installed under the /etc/tomcat{VERSION} directory. For the manual installation, you need to find the correct location.

Then edit server.xml file located under the Tomcat installation directory.

sudo nano /etc/tomcat9/server.xml 

Find the below content in the configuration file

    <Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />

Replace port 8080 with your required port. For example, we are changing the default tomcat port to 8081.

    <Connector port="8081" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />

After making the above changes restart the tomcat service. You will see that now tomcat is started on port 8081 or the port you configured. Access tomcat on the new port in a web browser.

Change Tomcat default Port

Conclusion

Changing the Tomcat port is helpful and required in many cases, the port is already occupied by another service or you may also run multiple Tomcat versions on a single server. This blog post helps you to change the Tomcat port on your system.

The post How to Change Tomcat Port appeared first on TecAdmin.

]]>
https://tecadmin.net/change-tomcat-default-port/feed/ 1
How to Install Tomcat 9 on Fedora 34/33 and CentOS/RHEL 7 https://tecadmin.net/install-apache-tomcat-9-on-centos/ https://tecadmin.net/install-apache-tomcat-9-on-centos/#comments Tue, 15 Dec 2015 05:02:43 +0000 https://tecadmin.net/?p=9370 Tomcat is developed by Apache Foundations. Apache Tomcat is an open-source web server for a Java-based web application. Tomcat is licensed under Apache License version 2. Apache Tomcat team has announced its latest Tomcat 9.0.50 release on July 02, 2021. This article will help you to install Tomcat 9 on CentOS, RHEL, and Fedora systems. [...]

The post How to Install Tomcat 9 on Fedora 34/33 and CentOS/RHEL 7 appeared first on TecAdmin.

]]>
Tomcat is developed by Apache Foundations. Apache Tomcat is an open-source web server for a Java-based web application. Tomcat is licensed under Apache License version 2. Apache Tomcat team has announced its latest Tomcat 9.0.50 release on July 02, 2021.

This article will help you to install Tomcat 9 on CentOS, RHEL, and Fedora systems. To install other version of tomcat visit Tomcat 8 on CentOS & Red Hat.

Step 1 – Prerequisites

Tomcat 9 is designed to run on Java SE 8 and later. So make sure you have installed the correct version on your system.

java -version

openjdk version "11.0.7" 2020-04-14 LTS
OpenJDK Runtime Environment 18.9 (build 11.0.7+10-LTS)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.7+10-LTS, mixed mode, sharing)

If you don’t have Java installed on your system or installed a lower version, use the following link to install Java first.

Step 2 – Download Tomcat Archive

Download Apache Tomcat 9 archive file using following commands or you can visit Tomcat 9 official download page for download most recent available version. After downloading extract archive file in /usr/local directory. You may change this location as per your setup.

wget wget http://www-us.apache.org/dist/tomcat/tomcat-9/v9.0.50/bin/apache-tomcat-9.0.50.tar.gz
tar xzf apache-tomcat-9.0.50.tar.gz
sudo mv apache-tomcat-9.0.50 /usr/local/tomcat9 

Step 3 – Set Environment Variables

Let’s configure the CATALINA_HOME environment variable in your system using the following commands. It is required to run the Tomcat server.

echo "export CATALINA_HOME="/usr/local/tomcat9"" >> ~/.bashrc
source ~/.bashrc

Step 4 – Setup User Accounts

Finally we need to create user accounts to secure and access admin/manager pages. Edit conf/tomcat-users.xml file in your editor and paste inside <tomcat-users> </tomcat-users> tags.

vim /usr/local/tomcat9/conf/tomcat-users.xml
<!-- user manager can access only manager section -->
<role rolename="manager-gui" />
<user username="manager" password="_SECRET_PASSWORD_" roles="manager-gui" />

<!-- user admin can access manager and admin section both -->
<role rolename="admin-gui" />
<user username="admin" password="_SECRET_PASSWORD_" roles="manager-gui,admin-gui" />

Step 5 – Start Tomcat Service

Tomcat is very easy to use, There is no need to compile its source. You simply extract the archive and start the tomcat server. Tomcat by default start on port 8080, So make sure no other application using the same port.

cd /usr/local/tomcat9
./bin/startup.sh

[Sample Output]

Using CATALINA_BASE:   /usr/local/tomcat9
Using CATALINA_HOME:   /usr/local/tomcat9
Using CATALINA_TMPDIR: /usr/local/tomcat9/temp
Using CLASSPATH:       /usr/local/tomcat9/bin/bootstrap.jar:/usr/local/tomcat9/bin/tomcat-juli.jar
Tomcat started.

Step 6 – Access Tomcat in Browser

Tomcat server default works on port 8080. Access tomcat on a web browser by connecting your server on port 8080.

Access Tomcat Home:- This is default tomcat home page. There are no authentication required to access this page..

http://localhost:8080 

Install Apache Tomcat 9

Access Manager App Page:- Click on Manager App button on home page.This page is allowed for Admin and Manager access both.

http://localhost:8080/manager/html 

Install Apache Tomcat 9

Access Host Manager Page:- Click on Host Manager button on home page.This page is allowed for Admin access only.

http://localhost:8080/host-manager/html 

The post How to Install Tomcat 9 on Fedora 34/33 and CentOS/RHEL 7 appeared first on TecAdmin.

]]>
https://tecadmin.net/install-apache-tomcat-9-on-centos/feed/ 7