Koozali.org: home of the SME Server

help installing tomcat

Offline isotropic

  • *
  • 6
  • +0/-0
help installing tomcat
« on: Yesterday at 04:31:12 AM »
Good evening, gentlemen.
I'm Isotropic, from Brazil. And I came to ask: can anyone help me install Apache Tomcat?
I use SME version 10.1.
I'd like to install Tomcat version 9.x, but I always get an error. It runs at boot but stops shortly after.

Stopping ProtocolHandler http-nio-8080.

Thank you.

Offline ReetP

  • *
  • 3,954
  • +6/-0
Re: help installing tomcat
« Reply #1 on: Yesterday at 11:37:06 AM »
This is not a 5 minute job.

A start is here

https://linuxize.com/post/how-to-install-tomcat-9-on-centos-7/

You can follow the first parts down to the systemd unit file.

Create that and then you will need a dropin file as per this:

https://forums.koozali.org/index.php/topic,54569.msg286027.html#msg286027

THisis the important bit:

/etc/systemd/system/tomcat.service.d/51custom.conf

Code: [Select]
[Install]
WantedBy= sme-server.target


(You can do the same thing but put it in /usr/lib/systemd/system is you prefer)

You will need a key:

Code: [Select]
config set tomcat service status enabled access public
Probably a post-upgrade/reboot and see if the service is up:

Code: [Select]
systemctl status tomcat
After that then you need to look at access - you could use AllowHosts and TCPPort keys in the config above to open ports and limit access.

Note :

Quote
In most cases, when running Tomcat in a production environment, you will use a load balancer or reverse proxy . It’s a best practice to allow access to port 8080 only to your internal network.

This is only a VERY rough and untested guide - you will lneed to do a lot of reading, and I suggest you build a test VM and experiment on that before using it in production.

Note also - v11 is around the corner. Instructions would be similar though.



...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation

Offline isotropic

  • *
  • 6
  • +0/-0
Re: help installing tomcat
« Reply #2 on: Today at 02:30:06 AM »
Good evening.
Coming back to thank you for your help.
I was able to install and configure Tomcat. It's running perfectly thanks to the support I received.
Thank you.
Best regards.

Offline ReetP

  • *
  • 3,954
  • +6/-0
Re: help installing tomcat
« Reply #3 on: Today at 08:34:10 AM »
Cool!!
...
1. Read the Manual
2. Read the Wiki
3. Don't ask for support on Unsupported versions of software
4. I have a job, wife, and kids and do this in my spare time. If you want something fixed, please help.

Bugs are easier than you think: http://wiki.contribs.org/Bugzilla_Help

If you love SME and don't want to lose it, join in: http://wiki.contribs.org/Koozali_Foundation