Java Reference
In-Depth Information
appropriate symlinks to the rcX.d directories. 13 So, first we have to take an
init script and modify it to run JBoss.
20.5.2
RedHat and its stepchild, Fedora, use a program called chkconfig to automate
the setup and integration of init scripts.
The chkconfig program has four basic functions. Two involve adding and
removing services from management. That's our main interest here, but we'll
get to that in a moment. The other two involve querying and setting the run-
levels in which services run. That is the more common use, so we'll look at
those first.
RedHat/Fedora chkconfig
[root@host238 root]# chkconfig --list ntpd
ntpd 0:off 1:off 2:off 3:on 4:off 5:on 6:off
TIP
chkconfig --list without specifying a service name will list all the services
managed by chkconfig , including those that are provided by xinetd , which we
will not cover here.
As you can see, ntpd runs at runlevels 3 and 5, and does not run at any
others. The --list argument lets you query the runlevels.
[root@host238 root]# chkconfig --levels 2345 ntpd on
[root@host238 root]# chkconfig --list ntpd
ntpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
The --levels argument lets you specify a list of runlevels that will apply
to the named service. The last argument may be on or off to specify which
setting to apply to those runlevels. The current value ( on or off ) for a specified
13. Just a quick reminder that not all Linux distributions name their directories or scripts in
precisely the same way, but they all use something similar. By examining the /etc/inittab
file and the contents of the /etc directory, you should be able to figure out the details of any
given distribution. Over time, more and more distributions have come to exactly match the
naming scheme described here. RedHat, Fedora, and Debian, for example, all follow this
naming scheme.
Search WWH ::




Custom Search