Hi. You should move it away fron that dir or it will be accessible bei /ROOT.something
Consider splitting CATALINA_HOME (like /opt/tomcat9 or /opt/tomcat9.112) and CATALINA BASE(like /opt/tomcat9.base). So the package will be updated under CATALINA_HOME and your config, log and webapps reside under CATALINA_BASE. This is working perfectly smooth. Plus you could just switch back to an older version by pointing to another CATALINA_HOME without recreating your specific files. Check RUNNING.txt chapter 3. Best regards Peter > Am 08.10.2026 um 15:47 schrieb Christoph Kukulies via users > <[email protected]>: > > A (hopefully) last question: previously I had my tomcat ROOT app in > /var/lib/tomcat9/webapps/ROOT. Could I leave it there and symlink it to > /opt/tomcat/webapps/ROOT? > Would it be dangerous to rename the original /ope/tomcat/webapps/ROOT > /opt/tomcat/webapps/ROOT.sometingelse ? Or should I move it totally out of > the way? > -- > Christoph > > >> Am 08.10.2026 um 15:39 schrieb Christoph Kukulies <[email protected]>: >> >> OK, fixed it. Did the chown -R tomcat:tomcat /opt/apache-tomcat-9.0.122 >> Somewhere I read (maybe AI? :) that it would be an idea to have >> /opt/apache-tomcat-9.0.122 symlinked to /opt/tomcat. >> I did that but still got an error that the PID file couldn't be crated on >> catalina startup (/opt/tomcat9/temp not found). Then I additionally >> symlinked /opt/tomcat9 -> /opt/tomcat >> and that worked. I'm seeing the backend through my haproxy frontend now >> (which still is the Apache Tomcat/9.0.122 greeting page.) >> >> -- >> Christoph >> >> >> >>> Am 08.10.2026 um 15:26 schrieb Christoph Kukulies via users >>> <[email protected]>: >>> >>> Thanks, Olaf, for your remarks. My first attempt to start tomcat9 as a >>> service failed. >>> >>> /opt/tomcat/logs is empty. >>> >>> This I find in syslog: >>> >>> 2026-10-08T15:19:48.039843+02:00 mail (artup.sh)[5205]: tomcat9.service: >>> Failed to execute /opt/tomcat/bin/startup.sh: Permission denied >>> >>> Everything under /opt/tomcat is owned by root:root >>> >>> I have a user "tomcat". Also group "tomcat" is existing. >>> >>> /opt/tomcat/bin/startup.sh is -rw-r-x--- root. root Sep 10 08:55 startup.sh >>> >>> Any clues? Is the service started under user tomcat? Wouldn't be wrong. >>> OTOH the tomcat tree should be owned by tomcat then. >>> >>> -- >>> Christoph >>> >>> >>> >>>> Am 08.10.2026 um 15:12 schrieb Olaf Kock <[email protected]>: >>>> >>>> >>>> Am 08.10.26 um 12:49 schrieb Christoph Kukulies via users: >>>>> I'm planning to install (reinstall) tomcat9 on my Ubuntu 24.04 server. I >>>>> had installed it manually before but since Ubuntu 24.04 the service got >>>>> masked. >>>>> >>>>> When unpacking the tar distribution of tomcat9 it usually goes to >>>>> /opt/tomcat(9) or this is at least the recommended location. In my >>>>> /etc/tomcat9 directory >>>>> there still is my configuration (server.xml). How do I best integrate my >>>>> existing configuration into the newly installed one in /opt/tomcat? >>>>> Symlink to server.xml? >>>> >>>> It's your decision how much you want to mirror the Unix-integration to >>>> have all configuration files available in /etc, or if you accept to have >>>> all tomcat9-related files in /opt/tomcat9. Personally, for a >>>> self-installed (and updated) version, I'd either leave it all in one place >>>> (/opt/tomcat9), or create a script for a repeatable installation (that >>>> extracts the files to the same locations for future upgrades). >>>> >>>> Well, as I said "personally": I'd leave everything in /opt/tomcat9 (see >>>> below for caveats). >>>> >>>> How to best integrate the existing settings? I'd diff the existing >>>> server.xml against the downloaded one, and mirror whatever your personal >>>> settings are. >>>> >>>>> Are there other configurations files to take care of? >>>> >>>> Any and all that you have changed yourself. Again, a diff tool is your >>>> friend. For your own installation, you might want to create bin/setenv.sh, >>>> which can set environment variables. I'm not sure how and/or if this was >>>> handled a different way in the Ubuntu package. >>>> >>>> Pay attention to repeatability (e.g. backup and documentation): The next >>>> upgrade will overwrite all the files, including server.xml and >>>> webapps/ROOT, if you just unzip it on top of the existing installation. >>>> Depending on your preferences, you can make /opt/tomcat9 a symlink to >>>> /opt/tomcat-9.0.x and use this as staging ground for upgrades, so that you >>>> never overwrite, but have the opportunity to diff the next with the >>>> current version before you change the symlink's target. >>>> >>>> Of course, when you make this a daemon, make sure to create a dedicated >>>> user for it and don't run Tomcat as root. >>>> >>>> Olaf >>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: [email protected] >>>> For additional commands, e-mail: [email protected] >>>> >>> >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
