Score:0

Startup.sh file does not exist after installing tomcat9 with YUM

bf flag

I installed tomcat9 with the command below

sudo su
yum install tomcat9

But in the tomcat9 directory at /usr/share/tomcat9/bin, the startup.sh file is not found. There are only 3 files below:

$ls /usr/share/tomcat9/bin/
bootstrap.jar  catalina-tasks.xml  tomcat-juli.jar

I try to run tomcat9 also error:

/usr/sbin/tomcat9 start
Failed to start tomcat.service: Unit tomcat.service not found.

Tomcat version :

$java -cp /usr/share/tomcat9/lib/catalina.jar org.apache.catalina.util.ServerInfo
Server version: Apache Tomcat/9.0.71
Server built:   Apr 13 2023 00:00:00 UTC
Server number:  9.0.71.0
OS Name:        Linux
OS Version:     6.1.25-37.47.amzn2023.x86_64
Architecture:   amd64
JVM Version:    17.0.7+8-LTS-224
JVM Vendor:     Oracle Corporation

OS is Amazon Linux 2023

$cat /etc/os-release
NAME="Amazon Linux"
VERSION="2023"
ID="amzn"
ID_LIKE="fedora"
VERSION_ID="2023"
PLATFORM_ID="platform:al2023"
PRETTY_NAME="Amazon Linux 2023"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2023"
HOME_URL="https://aws.amazon.com/linux/"
BUG_REPORT_URL="https://github.com/amazonlinux/amazon-linux-2023"
SUPPORT_END="2028-03-01"

How do I fix it to run?

in flag
Which version of which distribution are you using?
quangkid avatar
bf flag
@GeraldSchneider I run command : `java -cp /usr/share/tomcat9/lib/catalina.jar org.apache.catalina.util.ServerInfo` and it show `Server version: Apache Tomcat/9.0.71 Server built: Apr 13 2023 00:00:00 UTC Server number: 9.0.71.0 OS Name: Linux OS Version: 6.1.25-37.47.amzn2023.x86_64 Architecture: amd64 JVM Version: 17.0.7+8-LTS-224 JVM Vendor: Oracle Corporation`
HBruijn avatar
in flag
In general I would expect that when in 2023 somebody packages server/daemon software for distribution in a RPM package that they also create the systemd unit file to have it managed. Then you can use `systemctl start tomcat9` or something
in flag
What **Linux** distribution are you using? And please, edit all additional information into your question instead of in comments.
Score:2
in flag

According to repoquery -l tomcat9 the systemd unit name is tomcat9.

systemctl start tomcat9

relevant configuration files:

  • /etc/tomcat9/tomcat9.conf
  • /etc/sysconfig/tomcat9

There is also a second unit definition if you need multiple tomcat instances:

To create clones of this service:

  1. systemctl enable [email protected]
  2. create catalina.base directory structure in /var/lib/tomcats/name

where name can be an arbitrary name of your choosing.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.