If not installed, use the following to install OpenJDK 11 (or 8): sudo apt update sudo apt install default-jdk -y Use code with caution. Step 2: Create a Dedicated Tomcat User
Use curl or wget to download the latest available 8.5 release (e.g., 8.5.100): curl -O https://apache.org Use code with caution. Step 4: Extract and Install apache tomcat 8.5 download for ubuntu
sudo mkdir /opt/tomcat sudo tar xzvf apache-tomcat-8*tar.gz -C /opt/tomcat --strip-components=1 cd /opt/tomcat sudo chgrp -R tomcat /opt/tomcat sudo chmod -R g+r conf sudo chmod g+x conf sudo chown -R tomcat webapps/ work/ temp/ logs/ Use code with caution. Step 5: Configure as a Systemd Service Create a service file to manage Tomcat with systemctl : Apache Archive Distribution Directory If not installed, use the following to install
Before downloading Tomcat, ensure Java is installed. Check your current version with: java -version Use code with caution. Step 5: Configure as a Systemd Service Create
Since it is an archived version, you must use the official Apache Archive Distribution . Navigate to the /tmp directory: cd /tmp