Login as root
$ sudo su
Install updates
$ apt-get update && apt-get upgrade
Install Tomcat from the Ubuntu repository
$ apt-get install tomcat8
Install the tomcat8-docs and tomcat8-admin
$ apt-get install tomcat8-docs tomcat8-examples tomcat8-admin
Start, stop or restart Tomcat
$ sudo systemctl start tomcat8
$ sudo systemctl stop tomcat8
$ sudo systemctl restart tomcat8
Set tomcat manager user
$ sudo nano /var/lib/tomcat8/conf/tomcat-users.xml
Insert following lines
<role rolename="manager-gui"/>
<user username="tomcat" password="tomcat" roles="manager-gui"/>
Restart tomcat
$ sudo systemctl restart tomcat8
Source https://www.linode.com/docs/websites/frameworks/apache-tomcat-on-ubuntu-16-04
How to fix following error:
Job for tomcat8.service failed because the control process exited with error code. See "systemctl status tomcat8.service" and "journalctl -xe" for details. invoke-rc.d: initscript tomcat8, action "start" failed.
$ sudo nano /etc/default/tomcat8
Set JAVA_HOME
JAVA_HOME=/usr/lib/jvm/java-8-oracle
You saved my day, Mister! Thank you!