Install Tomcat 10 Server Using Source Code On Linux 8
We can install tomcat 10 servers either using yum repository or source code in Linux. This is an application server and most widely used to make web-based applications in Linux servers. It’s a java-based process and you have an application running on Linux and we also need to have java installed on the servers.
You may download it from here https://tomcat.apache.org/download-10.cgi
Extract the file using tar -xvf apache-tomcat-10.0.0-M1.tar.gz -C /opt/
Java must be installed before running the below commands.
yum install java-1.8* -y cd /opt/apache-tomcat-10.0.0-M1/bin
Check tomcat process is running using ps -ef | grep java
You will be seeing a port listening in the output.
Check Tomcat port is listening on default port 8080 using netstat -tnlp
Add ports in the firewall using below commands
firewall-cmd --permanent --add-port=8080/tcp firewall-cmd –reload
Now go to the browser to check tomcat is installed correctly and accessible.
Check Out: How To Make EBS Volume To Use On AWS Cloud
If you require to run tomcat on another port, you have to change the port in /opt/apache-tomcat-10.0.0-M1/conf/server.xml
Kill the apache tomcat process using kill -9 processid and start the service again. You will see tomcat will be listening to port 9000 instead of 8080.
netstat -tnlp | grep 9000
Note: Don’t forget to allow the port 9000 in the firewall rules.
In a similar way, you can install any tomcat version using the same method.
You’re done tomcat install using yum