

Locate the path to the installed Java version using alternatives command. Since we installed JDK, create the JAVA_HOME environment as follows.

echo 'export CATALINA_HOME="/opt/tomcat"' > /etc/profile.d/tomcat.shĭepending on the Java package installed, set JRE_HOME (if you installed JRE) or JAVA_HOME (if you installed JDK) environment variable for the Java version you have installed. Set CATALINA_HOME environment variable to point to the base path of the Tomcat installation, which in this case is, /opt/tomcat. Various environment variables are used by the Tomcat startup scripts to prepare the command that runs Tomcat daemon. The command above extracts the contents of apache-tomcat-9.0.36.tar.gz tarball to the installation directory, /opt/tomcat. mkdir /opt/tomcat tar xzf apache-tomcat-10.0.8.tar.gz -C /opt/tomcat -strip-components=1 Once the download of the binary distribution is complete, installation of Apache Tomcat using the binary distribution is as easy as extracting it to some specific directory, which in this case, we used /opt/tomcat directory. wget Install Apache Tomcat on Rocky Linux 8 As of this writing, Apache Tomcat 10.0.8 is the current stable release. Navigate to Apache Tomcat download’s page and grab Apache Tomcat binary distribution tarball. OpenJDK 64-Bit Server VM 18.9 (build 11.0.12+7-LTS, mixed mode, sharing) Download Apache Tomcat Binary Distribution OpenJDK Runtime Environment 18.9 (build 11.0.12+7-LTS) Java -version openjdk version "11.0.12" LTS
