How to install Tomcat on Fedora 29?

0
544
Tomcat
Tomcat

Java application development is a market that seems to have no end in the near future. More and more people are starting their way into programming with Java and JSP. However, to use servlets and JSP you need a server that can run it. Today, I will teach you how to install Tomcat on Fedora 29.

Tomcat is a software developed with Java that serves as a web server with support for servlets and JSPs. It is developed and updated by members of the Apache Software Foundation and independent volunteers. It is also very easy to set up to get up and running and has a lot of documentation.

So, let’s install it on Fedora 29.

1. Check the Java Version

The first step to install Tomcat in Fedora is to check if you have Java installed. Most likely, yes, but it’s still better to be sure.

Open a terminal and run:

1.- Checking the Java version installed
1.- Checking the Java version installed

As you can see in the image above Java is installed correctly. So, you can continue with the installation.

2. Download and Install Tomcat on Fedora

Now, proceed to download Tomcat from its website. At the time this article has been written, the latest stable version is 9.0.12. So, install wget and then download Tomcat.

2.- Downloading Tomcat
2.- Downloading Tomcat

Then, decompress the downloaded file.

Next, rename the folder to make the process easier.

3.- Rename the folder
3.- Rename the folder

Now, you need to configure environment variables. First, export the CATALINA_HOME variable.

After that, refresh the bash.

4.- Configuring the environment variables
4.- Configuring the environment variables

3. Setting admin user

In order to manage Tomcat, it is necessary to create an administrator user who can perform all the essential tasks that the application allows to do. To do this, you need to edit the file tomcat-users.xml localized on /usr/local/tomcat9/conf/ directory.

And add the following before </tomcat-users>:

5.- Setting a admin user
5.- Setting an admin user

4. Using Tomcat

Before you start using Tomcat, you need to start it.

6.- Starting tomcat
6.- Starting tomcat

Now, you can open the web browser and go to http://IP_ADDRESS:8080/ and you will see this:

7.- Tomcat default page
7.- Tomcat default page

And to visit the manager page, go to http://IP_ADDRESS:8080/manager/html

8.- Access to manager page of Tomcat
8.- Access to manager page of Tomcat

By entering your username and password, you will be able to access the manager section.

9.- Manager page of Tomcat
9.- Manager page of Tomcat

And that’s it.

Conclusion

Tomcat is needed to develop applications with JSP. It is free which minimizes expenses for small or educational projects. It is also well documented and easy to use. Its installation in Fedora 29 is really easy and only requires a few essential commands.

Spread the love
  • 13
    Shares

PS. If you like this post please share it with your friends on the social networks using the buttons above.Thanks.

LEAVE A REPLY

Please enter your comment!
Please enter your name here