Java Reference
In-Depth Information
runlevel is overwritten by whatever you specify. There is more to this; see the
manpage for chkconfig for details.
Now, before we put JBoss under management, we need to make a script
for it. Or rather, we need to modify the one provided by JBoss. In the bin
subdirectory of JBoss, you will find a script called jboss_init_redhat.sh .
You will notice that it has the “ chkconfig mojo” in it—that is, the
chkconfig: ” comment line. We mentioned this in passing when we looked
at the atd init script, but we didn't tell you what those three numbers after the
colon actually mean. The first is the list of runlevels in which you want the
program to run. The second is the start priority, which is the number that will
follow the S in the rcX.d runlevel symlink directory. The third number is the
stop priority, which is the number that will follow the K in the rcX.d runlevel
symlink directory.
These start and stop priority numbers can be very important indeed. Some
services (like NFS) depend upon others (like portmap). Your JBoss server might
depend on a service like mysqld or postgresql. Don't toy with these orders
lightly. You can seriously mess up your services if you don't know what you are
doing. Still, you will probably have to tweak things to get them completely
right. Just be cautious and think about every change.
Example 20.4 is the script as it comes with JBoss 3.2.3.
There are three things we have to change here. The first are the runlevels
in the “ chkconfig: ” line (we'll show you the changed lines with a couple of
lines of context):
#
# chkconfig: 345 80 20
# description: JBoss EJB Container
#
Next, we may need to change the paths to JBoss and to the Java runtime.
In our case, if you installed into /usr/local and created the symbolic link as
we suggested, you don't need to change the JBOSS_HOME , but you have to
change the JAVAPTH variable: 14
14. We are assuming you have set up your Java SDK as described in Chapter 6. If your java*
commands are located somewhere else, change this path to point at them.
Search WWH ::




Custom Search