Installation of Apache Tomcat 9 is an Open Source Application Server and java servlet container which is developed by Apache Org. Tomcat used to implementation of java EE specializations including java servlet page(JSP), java servlet, JavaEL, and WebSocket, etc, and provides to run java code. We can install tomcat 9 using yum install or from source on Linux.
Installation of Apache Tomcat 9 Using Source Code:
Apache Tomcat also provides by default a connector HTTP 8080 but you can change to port 80 in server.xml file.
Check Out: Change tomcat Port
- Java 8 required
- Implement servlet 4.0
- JSP 2.3
- WebSocket 1.1
- EL 3.0
- JASPIC 1.1
- Supports for TLS virtual hosting (SNI)
- Support for using OpenSSL for TLS
Let’s install Apache Tomcat 9
I have downloaded Apache tomcat 8 versions from the official site of Tomcat Download
Note: For installing Tomcat there must be JAVA installed on your Machine.
Check Out: Tomcat SetClasspath
Step 1: I’m assuming you have already installed JAVA on your machine so I will skip this step. If not installed, you can install it from here.
In my machine, I have checked java version installed on the machine by command java –version
Step 2: you will have extract the downloaded package of tomcat in order to install it on the machine. So run this command to extract the package.
tar xvfz apache-tomcat-9.0.8.tar.gz
After the above step, the output is.
Check Out: Installation Of Java 8 On Redhat/CentOs 7
Step 3: Before starting Tomcat Service it’s required to set the
echo "export CATALINA_HOME='/opt/tomcat/'" >> ~/.bashrc
Step 4: Make directory under /opt/ and Move tomcat to /opt/ directory.
mv Desktop/apache-tomcat-9.0.8 /opt/tomcat/
Now you will have to start the tomcat server by running the script which is located at this location.
Go the location and type ./startup.sh and Now you will get this output.
I have extracted the file on desktop location so you can also move these files to /opt/ directory it will set the path according to the location you specify.
Step 5: Go to browser to check whether is working or not and type http://yourip:8080 or localhost:8080
YouTube link: Install Tomcat9
You’re done install tomcat from source 9 yum