We will have to change the ownership of the directory to tomcat's user and group: sudo chown -R tomcat: /opt/tomcatĪs well we will make the scripts inside the bin directory executable: sudo chmod +x /opt/tomcat/latest/bin/*.sh Create a systemd unit file The tomcat user we set up earlier needs to have access to Tomcat 9 directory. Later, if you want to update your Tomcat installation, you can unpack the latest version and change the symlink to point to the latest version. Once the download is complete, we will extract the zip file and move it to the / opt / tomcat directory: unzip apache-tomcat-*.zipįor, have more control over versions and updates, we will create a symbolic link that will point to the installation directory: sudo ln -s /opt/tomcat/apache-tomcat-* /opt/tomcat/latest When we are clear about the file to download, we will move to / tmp directory and download the zip file with wget. As of this writing, the latest version is 9.0.10. Let's download the latest version of Tomcat 9.0.x since download page.
INSTALL APACHE TOMCAT UBUNTU INSTALL
We can install them by typing: sudo apt install unzip wget We will use wget and unzip to download and extract the Tomcat 9 file. Now let's create a new system user and group with home directory in / opt / tomcat, which will run the Tomcat service: sudo useradd -m -U -d /opt/tomcat -s /bin/false tomcat Download Tomcat 9 If you prefer to install Oracle Java instead of OpenJDK, see the instructions that a colleague posted some time ago. La installing the OpenJDK package on Ubuntu 18.04 it is quite simple: 7 Configure Tomcat Web Manager Interface.