Archive

Archive for August, 2011

Starting JOnAS as a Service on Linux

August 18th, 2011 No comments

Here is a startup script for JOnAS, on Linux. It is a nice way to automatically start JOnAS when Linux reboots. It is quite trivial to write but I am sure it will turn out useful for anyone who is still not familiar with startup scripts on Linux. Call it jonas and save it in the directory /etc/init.d. You must be root to do that.

#! /bin/bash
# chkconfig: 2345 95 20
# description: Description of the script
# processname: jonas 
#
#jonas Start the jonas server.
#

NAME="Jonas 5.2.1"
JONAS_HOME=/home/test/jonas-full-5.2.1
JONAS_USER=test
LC_ALL=fr_FR
export JONAS_HOME  JONAS_USER LC_ALL
cd $JONAS_HOME/logs
case "$1" in
  start)
    echo -ne "Starting $NAME.\n"
    /bin/su $JONAS_USER -c "$JONAS_HOME/bin/jonas -bg start "
    ;;

  stop)
    echo -ne "Stopping $NAME.\n"
    /bin/su $JONAS_USER -c "$JONAS_HOME/bin/jonas stop "
    ;;

  *)
    echo "Usage: /etc/init.d/jonas {start|stop}"
    exit 1
    ;;
esac

exit 0

Read more…

Categories: CentOS, JOnAS, Linux Tags:

Running 2 instances of JOnAS on the same Linux server

August 7th, 2011 No comments

To run another instance of JOnAS 5.2.1 on the same server one needs to change the ports of the new instance.
Initially, the JONAS_BASE environment variable points to /home/test/JonasInstances/instance1
To create a second instance, I just run the newjb command.
2nd instance with newjb
Read more…

Categories: JOnAS Tags: