Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 7039  / 2 Years ago, tue, january 25, 2022, 1:24:45

I have Tomcat set up to launch at start up on my Ubuntu box. Trouble is, I have to manually supply a root password on each boot. Is it possible for this to be automated? Do I just supply an command parm? If so, what is the syntax? Thank you!


More From » startup

 Answers
4

I'm unsure about how you have pulled this off, but it does sound like you have tomcat start up when you log in rather than when the machine boots. Am I right?


Anyway, you should have it start when it boots. The following procedures should be done as root. When in use, init will do them as root.


The quick and dirty way:


Given that your start script is /usr/local/tomcat/bin/startup.sh the just add that line to the file /etc/rc.local and reboot.


The right way:


Make an upstart script. I haven't really done that before, but I saw this: https://gist.github.com/2924017 which might work.
Put the file (tomcat.conf) in /etc/init/ and reboot.


As a service, you can start, stop, restart and get status on services by doing:


start tomcat
stop tomcat
restart tomcat
status tomcat

This is of course how all services in Ubuntu behave. (gdm, apache, ssh, etc..)


Hope it helps :)


[#36025] Thursday, January 27, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
landarre

Total Points: 254
Total Questions: 96
Total Answers: 109

Location: Burundi
Member since Sun, Apr 16, 2023
1 Year ago
;