
Verify your file paths! If you downloaded a different version or already installed Java, you may have to edit the file path or name. Next from your server, use wget command to download the tar to the tomcat folder from the URL you copied in the previous step: At the time of this article Tomcat 8 is the newest version but feel free to pick whatever version is more up-to-date. Place your cursor under 8.5.32 Binary Distributions, right click on the tar file and select copy link address (as shown in the picture below).

Logged in as root, within the /opt folder make a directory called tomcat and cd into that folder after completion.Ĭd /opt/tomcat Step 2: Install Tomcat Through WgetĬlick this link to the Apache Tomcat 8 Download site. Installing Apache Tomcat 8 Step 1: Create the Tomcat Folder

Let’s create a systemd init file so you can start/restart/stop Tomcat: nano /etc/systemd/system/rviceĮnvironment=CATALINA_PID=/opt/tomcat-latest/tomcat8.pidĮnvironment=TOMCAT_JAVA_HOME=/usr/bin/javaĮnvironment=CATALINA_HOME=/opt/tomcat-latestĮnvironment=CATALINA_BASE=/opt/tomcat-latestĮnvironment="JAVA_OPTS=-Dfile.encoding=UTF-8 -Dnet.sf.ehcache.skipUpdateCheck=true -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:+UseParNewGC -XX:MaxPermSize=128m -Xms512m -Xmx512m"ĮxecStart=/opt/tomcat-latest/bin/startup.shĮnter the underneath commands to start Tomcat and enable it to start on boot: systemctl daemon-reloadįinally, open apache tomcat from your browser, go to your IP or domain with the 8080 port (because Tomcat will always run on the 8080 port) as an example: :8080, replace with your IP or domain.Ĭongratulations! You have successfully installed Tomcat. The first thing to do is to go to Apache Tomcat’s download page and download the latest stable version of Apache Tomcat, At the moment of writing this article it is version 8.5.11: cd /opt & wget Īdd tomcat user and group: ln -s /opt/apache-tomcat-8.5.11 /opt/tomcat-latestĬhown -hR tomcat: /opt/tomcat-latest /opt/apache-tomcat-*
