Download Apache Tomcat:
http://tomcat.apache.org
Extract the file "
apache-tomcat-9.0.0.M13.tar.gz" in the folder you want to install Tomcat:
/opt/apache-tomcat-9.0.0.M13
$ tar -xf ~/Downloads/apache-tomcat-9.0.0.M13.tar.gz -C /opt/
Change the folder permissions:
$ chmod -R 755 /opt/apache-tomcat-9.0.0.M13/
$ sudo chown -R mtitek:mtitek /opt/apache-tomcat-9.0.0.M13/
Create a symbolic link of the Tomcat installation folder:
$ sudo ln -s /opt/apache-tomcat-9.0.0.M13/ /opt/apache-tomcat
$ sudo chown -R mtitek:mtitek /opt/apache-tomcat
You should replace
mtitek:mtitek with your actual user/group names.
Verify the version of Tomcat:
$ /opt/apache-tomcat/bin/version.sh
Using CATALINA_BASE: /opt/apache-tomcat
Using CATALINA_HOME: /opt/apache-tomcat
Using CATALINA_TMPDIR: /opt/apache-tomcat/temp
Using JRE_HOME: /opt/jdk
Using CLASSPATH: /opt/apache-tomcat/bin/bootstrap.jar:/opt/apache-tomcat/bin/tomcat-juli.jar
Server version: Apache Tomcat/9.0.0.M13
...
Start Tomcat:
$ /opt/apache-tomcat/bin/startup.sh
Access the default page of Tomcat:
http://localhost:8080
Stop Tomcat:
$ /opt/apache-tomcat/bin/shutdown.sh