I’m working over an SSH connection on a server running suse 11.0. I’m using Apache 2.2.8 as a webserver, but sofar I haven’t been bothered about running it as a daemon because I haven’t had to reboot the server. Now it appears our IT people do that without asking, and so I have to make sure apache restarts automatically. The same goes for Tomcat 6 on the same machine.
I’ve tried to follow the book, and created links to the corresponding scripts in /etc/rc.d/rc3.d:
lrwxrwxrwx 1 root root 10 16. Mär 17:46 S80httpd → …/apache2
lrwxrwxrwx 1 root root 10 16. Mär 17:47 S85tomcat → …/tomcat6
pagod wrote:
> I’m working over an SSH connection on a server running suse 11.0. I’m
> using Apache 2.2.8 as a webserver, but sofar I haven’t been bothered
> about running it as a daemon because I haven’t had to reboot the server.
> Now it appears our IT people do that without asking, and so I have to
> make sure apache restarts automatically. The same goes for Tomcat 6 on
> the same machine.
>
> I’ve tried to follow the book, and created links to the corresponding
> scripts in /etc/rc.d/rc3.d:
> lrwxrwxrwx 1 root root 10 16. Mär 17:46 S80httpd → …/apache2
> lrwxrwxrwx 1 root root 10 16. Mär 17:47 S85tomcat → …/tomcat6
>
> lrwxrwxrwx 1 root root 10 15. Apr 13:34 K01tomcat → …/tomcat6
> lrwxrwxrwx 1 root root 10 15. Apr 13:33 K02httpd → …/apache2
>
> However, this doesn’t seem to be working, neither Apache nor Tomcat are
> started when the server reboots. Have I forgotten something??
chkconfig -a apache2 tomcat6
(or YaST runlevel editor)
thx a lot for the answers – initializing the daemons with chkconfig worked fine
still i don’t understand why it didn’t work when i did it myself should i have edited another file? or was it a problem with the names? i had named the link to apache2 S80httpd and chkconfig named it S12apache2, but surely that wouldn’t be the problem, would it? setting the index to 80 probably didn’t matter either, as it only meant apache was started at the end (before tomcat, which had index 85), but it should have had any interactions with other daemons that were running before anyway.
The init system on SUSE is a bit more elaborate than a script just running through the numbers in sequence. If you look at the hidden files in /etc/init.d, you will see some dependency graphs constructed by the init utilities. That’s why you have to go through the utilities. In return for that little bit of bureaucracy, you get the dependencies automatically determined from the metadata at the top of the init scripts, and not having to work out where in the sequence to insert your service.
ken yap schrieb:
> The init system on SUSE is a bit more elaborate than a script just
> running through the numbers in sequence. If you look at the hidden files
> in /etc/init.d, you will see some dependency graphs constructed by the
> init utilities. That’s why you have to go through the utilities. In
> return for that little bit of bureaucracy, you get the dependencies
> automatically determined from the metadata at the top of the init
> scripts, and not having to work out where in the sequence to insert your
> service.
If you absolutely need the old mechanism with the S<nn>/K<nn> symlinks,
you can reenable it by setting RUN_PARALLEL=“no” in /etc/sysconfig/boot.
But it’s better to work with the system than against it.