apt-get -y install python-software-properties
sudo add-apt-repository ppa:webupd8team/java
apt-get update
sudo apt-get -y install oracle-java8-installer tomcat8 postgreql postgreql-client
java -version

java version “1.8.0_111″
Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)

vi /etc/default/tomcat8

JAVA_OPTS= —-> -Xmx128m -> Xmx3000m // tomcatin kullanacağı ram miktarı
AUTHBIND=yes

vi /etc/tomcat8/server.xml

8080 olan portlar 80
8443 olan portlar 443

cd /etc/authbind/byport/
touch 443
touch 80
chown tomcat8 *
chmod 500 *
service tomcat8 restart

ve ya

/etc/init.d/tomcat8 restart