Ensure Java is installed. Tomcat 8.5 needs Java 7 or later. Tomcat 9 needs Java 8 or later
Assumes /tomcat exists (recommended as a distinct mount point/partition). Alternatively you may choose to use /opt/tomcat (default location for package manager controlled installs).
It is not recommended to access the default Apache Tomcat management screens via Internet Explorer. You will see several formatting issues including missing graphics etc.
Download latest appropriate version and copy it to /tomcat on your target server.
The Core tar.gz file is recommendedLinux Users & Groups
As 'root'...
useradd --system --create-home --user-group --home-dir /opt/tomcat --shell /bin/false --comment "Apache Tomcat" tomcat
cat /etc/passwd | grep tomcat
cat /etc/group | grep tomcat
As 'root'...
tar xvf apache-tomcat-9*.tar.gz -C /tomcat
ln -s /tomcat/apache-tomcat-9.0.54 /tomcat/latest
rm /tomcat/apache-tomcat-9.0.54.tar.gz
Set Permissions
chown -R tomcat:tomcat apache-tomcat-9.0.54
chown -R tomcat:tomcat latest
chmod o+x /tomcat/latest/bin/
export JAVA_HOME=/bin
export CATALINA_HOME=/tomcat/latest
export CATALINA_BASE=$CATALINA_HOME
Add these variables to the end of /tomcat/.bash_profilechown -R tomcat:tomcat /tomcat/.bash_profile
As 'root'...
vi /etc/systemd/system/tomcat.service
systemctl daemon-reload
systemctl enable tomcat
systemctl start tomcat
systemctl status tomcat
When Tomcat is running, the following URL should be available...
http://localhost:8080/