Howto Jonas on sme server

cellspacing="0">

Howto Jonas on sme server

Author: MasterSleepy
Contributor: 
Release: SME Server 7.x
License: style="color: rgb(255, 0, 0); font-weight: bold;">GPL style="font-weight: bold;">

style="background-color: rgb(255, 255, 255); text-align: left; vertical-align: middle;">

Problem: You want to install href="http://jonas.objectweb.org">Jonas on your sme
server
Solution: Follow this Howto


STEP 1: Download
java jdk and upload it to your sme server

Go to java.sun.com
and download jdk
For my example I use jdk-1_5_0_06-linux-i586-rpm.bin
ATTENTION:
adapt all document jdk filename depending witch file you download


STEP
2: 
Install Java jdk

class="def_bold">[root@server root]# chmod a+x
jdk-1_5_0_06-linux-i586-rpm.bin
[root@server root]# ./jdk-1_5_0_06-linux-i586-rpm.bin
[root@server
root]# ln -s /usr/java/jdk1.5.0_06 /usr/java/jdk

After executing bin file, you can remove both file
jdk-1_5_0_06-linux-i586-rpm.bin
and jdk-1_5_0_06-linux-i586.rpm


STEP 3: Download Jonas
last version

Go to href="http://forge.objectweb.org/project/showfiles.php?group_id=5">Jonas
download website.
For this howto I download Jonas 4.7.6
jonas4.7.6-tomcat5.5.15.tgz

class="def_bold">[root@server root]# wget http://download.fr2.forge.objectweb.org/jonas/jonas4.7.6-tomcat5.5.15.tgz


STEP 4: Unpack archive

Unzip and move it

class="def_bold">[root@server root]# tar -xvzf jonas4.7.6-tomcat5.5.15.tgz
[root@server root]# mv JONAS_4_7_6 /opt/
[root@server root]# cd /opt
[root@server root]# ln -s JONAS_4_7_6 jonas


STEP 5: Create user and group

class="def_bold">[root@server root]# groupadd jonas
[root@server root]# useradd -g jonas -d /opt/jonas jonas
[root@server
root]# chown -R jonas:jonas /opt/jonas/
[root@server
root]# chmod 770 /opt/jonas/

STEP 6: Create statup script

Edit /etc/rc.d/init.d/jonas with your favorite text editor, it should contain the following :

#! /bin/bash
#
# jonas Start the jonas server.
#

NAME="Jonas 4.7.6"
JONAS_HOME=/opt/jonas
JAVA_HOME=/usr/java/jdk
JONAS_USER=jonas
LC_ALL=fr_FR
export JONAS_HOME JAVA_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/unix/jonas -bg start"
    ;;

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

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

exit 0

class="def_bold">


STEP 7: Make startup script runable and make tomcat start automatically at boot

class="def_bold">[root@server root]# chmod 755 /etc/rc.d/init.d/jonas
[root@server root]# ln -s /etc/rc.d/init.d/jonas /etc/rc.d/rc7.d/S98jonas
[root@server
root]# ln -s /etc/rc.d/init.d/jonas /etc/rc.d/rc6.d/K02jonas
[root@server root]# ln -s /etc/rc.d/init.d/jonas /etc/rc.d/rc2.d/K02jonas
[root@server root]# ln -s /etc/rc.d/init.d/jonas /etc/rc.d/rc1.d/K02jonas
[root@server root]# ln -s /etc/rc.d/init.d/jonas /etc/rc.d/rc0.d/K02jonas

Category: 
Howtos pour E-Smith/SME