apache and tomcat as service
There are several ways to configure your computer to run a service on
startup. The one that I use in my RH 9.0 configuration is to add the
link to /etc/rc.d/rc3.d, for those computers that boot up in text mode.
For computers that boot into Xwindows, add the link to /etc/rc.d/rc5.d.
Assuming that I wanted to start the apache server (httpd) on one of my
computers that boots directly into xwindows, I would add a link in the
/etc/rc.d/rc5.d directory to the service script residing in the
/etc/rc.d/init.d directory.
As root, create a symbolic link to the script:
cd /etc/rc.d/rc5.d
ln -s ../init.d/httpd S92httpd
That's all that there is to it. You've created a symbolic link, named
S92httpd, in your /etc/rc.d/rc5.d directory to the actual file, httpd,
that is in the /etc/rc.d/init.d directory. The next time you boot your
computer, all of the services listed in the /etc/rc.d/rc5.d that start
with S will be started, in numerical order.
(Remember the priority of services. Some services depend on other
services before they can run properly. For instance, I use nfs on most
computers. nfs requires that portmap and nfslock be started before it
can run, so I named the three services S13portmap, S14nfslock, and
S60nfs. Currently, I'm not running tomcat, but I am trying out resin,
that requires httpd. On that computer, I start httpd as S85httpd and
resinctl as S90resinctl.)
If you boot up in text mode, change rc5.d to rc3.d.
|