F I R S T S T E P S : B R I N G J B O S S T O L I F E
JAVACMD=$JAVA_HOME/bin/java
# Minimal jar file to get JBoss started.
CLASSPATH=$CLASSPATH:$JBOSS_HOME/bin/run.jar
# Add the tools.jar file so that Tomcat can find the Java compiler.
CLASSPATH="$CLASSPATH:$JAVA_HOME/lib/tools.jar"
if [ "$1" = "start" ] ; then
shift
$JAVACMD $JBOSS_OPTS classpath $CLASSPATH org.jboss.Main c tomcat > /dev/null 2>&1 &
echo $! > /var/run/jboss.pid
elif [ "$1" = "stop" ] ; then
shift
kill 15 cat /var/run/jboss.pid
rm rf /var/run/jboss.pid
elif [ "$1" = "run" ] ; then
shift
$JAVACMD $JBOSS_OPTS classpath $CLASSPATH org.jboss.Main c tomcat "$@"
else
echo "Usage:"
echo "jboss (start|run|stop)"
echo " start start jboss in the background"
echo " run start jboss in the foreground"
echo " stop stop jboss"
exit 0
fi
Before you go any further test your installation by calling the startup script in the /etc/init.d
by entering this at the prompt ./jboss start and ./jboss stop and check if JBoss is started
and also stopped respectively.
Now you have only to create two symbolic links in the run level 3 /etc/init.d/rc3.d and 5
/etc/init.d/rc5.d directories. The first link is the start link and the second is the kill link
whereas the first letter indicates start (S) or kill (K). The next two digits indicate the order
they are started or stopped (the lower the number the later it gets called) and when digits
are equal then the order is not defined for this number. The rest is a string indicating the
service being started. JBoss should be started late and stopped early. Therefore an example
would be "S01JBoss" and "K23JBoss". Create these two symbolic links at the prompt with
ln s ../jboss S01JBoss and ln s ../jboss K23JBoss . Note that in command "ln" the target
comes before the name of the link.
Now restart your Unix server and check if started properly
23
footer
Our partners:
PHP: Hypertext Preprocessor Cheap Web Hosting
JSP Web Hosting
Ontario Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Java Hosting
Cheapest Hosting
Visionwebhosting.net Business web hosting division of Vision Web Hosting Inc.. All rights reserved