How to Install Apache Tomcat Server on CentOS Stream 9. The options for the right Java server is a tricky task. You aim is to have a stable solution for developing and deploying the websites successfully. Apache Tomcat is a popular option as it is reliable, mature and open source with excellent community support. Let’s learn Apache Tomcat.
What is Apache Tomcat
Apache Tomcat is a free and open source Java servlet container developed under the open source environment in 1998. The main aim of Apache Tomcat is to implement the various Java Enterprise Specs, including the Websites API, Java-Server Pages and Java Servlet. The HTTP server is used to serve the static web content. If you want to serve the dynamic content, then use the Servlet. When you combine HTTP and Servlet they become the Apache Tomcat server.
Apache Tomcat is specially designed to use the webserver to manage the dynamic Java based content with the help of HTTP protocols. Tomcat executes Java Servlets to serve web pages that include Java code and Java EE applications.
Advantages of Apache Tomcat
Free and Open source – It is an open source means anyone can use the core file for developing personal or commercial applications.
Lightweight – Tomcat is a lightweight application that enables you to deploy the content easily with fast data processing power.
Flexible – Tomcat is adjustable and customizable, that allows you to customize your application as per your requirements.
Stable – Tomcat provides a stable application that runs independently on apache installation.
Well Documented – The Tomcat documentation library provides comprehensive information to the developer who wants to learn the development of the Tomcat application.
In this post, we will explain how to install Apache Tomcat Server on CentOS Stream 9
First, you will need to create an admin user to access the Tomcat application. You can create it by editing the tomcat-users.xml file:
nano /opt/tomcat/tomcat10/conf/tomcat-users.xml
Add the following lines before the last line:
Save and close the file when you are finished.
By default, Tomcat is configured to be accessed only from the localhost. So you will need to configure Tomcat remote login. To enable remote login for Application Manager, edit the context.xml file:
It is good to configure the Nginx as a reverse proxy to access the Apache Tomcat via port 80. First, install the Nginx package using the following command:
dnf install nginx -y
Once the Nginx package is installed, start and enable the Nginx service using the following command:
1. Open your web browser and access the Apache Tomcat using the URL http://tomcat.example.com. You should see the Tomcat dashboard on the following page:
2. Click on the Manager App. You will be asked to provide an admin username and password as shown below:
3. Provide your admin username, password, and click on the Signin button. You should see the Tomcat Application Manager dashboard on the following page:
4. Click on the Host Manager. You will be asked to provide an admin username and password as shown below:
5. Provide your admin username, password, and click on the Signin button. You should see the Tomcat Host Manager dashboard on the following page:
Great effort. We have learned How to Install Apache Tomcat Server on CentOS Stream 9.
How to Install Apache Tomcat Server on CentOS Stream 9 Conclusion
This post shows you how to install Apache Tomcat on CentOS Stream 9. We also explained how to configure Nginx as a reverse proxy for Tomcat. Now, you can build your Java-based application and deploy it using the Apache Tomcat.
I am a fan of open source technology and have more than 10 years of experience working with Linux and Open Source technologies. I am one of the Linux technical writers for Cloud Infrastructure Services.
51vote
Article Rating
Subscribe
Login and comment with
I allow to create an account
When you login first time using a Social Login button, we collect your account public profile information shared by Social Login provider, based on your privacy settings. We also get your email address to automatically create an account for you in our website. Once your account is created, you'll be logged-in to this account.
DisagreeAgree
Login and comment with
I allow to create an account
When you login first time using a Social Login button, we collect your account public profile information shared by Social Login provider, based on your privacy settings. We also get your email address to automatically create an account for you in our website. Once your account is created, you'll be logged-in to this account.