Start with installing Oracle Java
sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java8-installer |
Now install tomcat7
sudo apt-get install tomcat7 |
To run on ports below 1024, authbind needs to be enabled
sudo nano /etc/default/tomcat7 |
change #AUTHBIND=no to AUTHBIND=yes
sudo touch /etc/authbind/byport/80 sudo chmod 500 /etc/authbind/byport/80 sudo chown tomcat7 /etc/authbind/byport/80 |
set JAVA_HOME
sudo nano /etc/default/tomcat7 |
Add JAVA_HOME=/usr/lib/jvm/java-8-oracle
You should now be able to start tomcat7