How To Change Tomcat Port Number On Redhat / Cent0S7

I will show how to change default tomcat port number in Linux and tomcat admin, ajp, server port numbers lists are 8005, 8009, and 8080.

When you will allow tomcat to listen on the default port, you must sure that port should not be running on another tomcat instance. you can also access tomcat manager using its port allowed from server file and in the firewall as well.

How To Change Tomcat Port Number:

you can also find the listening port using netstat -tnlp. This will show all the running port on the server. you can also easily find with ps -ef | grep java.

Check Out: Tomcat SetClasspath

Go to the location where tomcat installed.

cd /opt/tomcat9/apache-tomcat-9.0.12/conf/

And look for Server.xml file

How To Change Tomcat

find connector.

change tomcat port

By default, the port is listening on 8080 and we’re going to change it to 9090.

Check Out: Install Tomcat 9

Now restart the tomcat server,

./ && ./

Also, add changed port in the firewall,

firewall-cmd –permanent –add-port=9090/tcp
firewall-cmd –reload

Go to the browser and try to access port 9090.

Check Out: Deploy war Application on Tomcat Server on Redhat 7

As you can see Tomcat is running with port 9090

YouTube link: Tomcat Port 

You’re done how to change default tomcat port list numbers in linux

Share on:

I'm the founder of Curious Viral. I hope this blog will provide you complete information about Linux Technology & I would like to share my technical knowledge with you which I have learned during this period.

Other Posts You May Like...

Leave a comment