Saturday, February 6, 2021

Tomcat9 on Ubuntu 20.04 and getting catalina.out

Blogging after ages for something I haven't found from multiple web searches. Something that might be useful for others

After you've installed tomcat9, do the following:
sudo apt-get install tomcat9

sudo touch /var/log/tomcat9/catalina.out

sudo chown syslog:adm /var/log/tomcat9/catalina.out

sudo usermod -a -G tomcat syslog

sudo chmod 770 /var/log/tomcat9

sudo systemctl restart rsyslog

sudo service tomcat9 restart

Now you'll be able to follow your logs just like previous installations

sudo tail -f /var/log/tomcat9/catalina.out

No comments: