Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
[appserver@ ~]$ NEXT_ROOT=/opt; export NEXT_ROOT

3. Next, we need to install the Wonder version wotaskd and JavaMonitor.

Code Block

mkdir -p /opt/Local/Library/WebObjects/JavaApplications
cd /opt/Local/Library/WebObjects/JavaApplications
wget http://webobjects.mdimension.com/hudson/job/Wonder/lastSuccessfulBuild/artifact/dist/wotaskd.woa.tar.gz
tar zxf wotaskd.woa.tar.gz
rm wotaskd.woa.tar.gz
wget http://webobjects.mdimension.com/hudson/job/Wonder/lastSuccessfulBuild/artifact/dist/JavaMonitor.woa.tar.gz
tar zxf JavaMonitor.woa.tar.gz
rm JavaMonitor.woa.tar.gz

4. Now we need to change some permissions. To follow the conventions from Mac OS X, we will create two users to run wotaskd and Monitor under this user :

...

Code Block
chown -R appserver:appserveradm /opt/Local
chown -R appserver:appserveradm /opt/Library
chmod 750 /opt/Local/Library/WebObjects/JavaApplications/JavaMonitor.woa/JavaMonitor
chmod 750 /opt/Local/Library/WebObjects/JavaApplications/wotaskd.woa/Contents/Resources/SpawnOfWotaskd.sh
chmod 750 /opt/Local/Library/WebObjects/JavaApplications/wotaskd.woa/wotaskd

45. Now we can start wotask and Monitor

...

Code Block
[appserver@ ~]$ $NEXT_ROOT/Local/Library/WebObjects/JavaApplications/wotaskd.woa/wotaskd &
[appserver@ ~]$ $NEXT_ROOT/Local/Library/WebObjects/JavaApplications/JavaMonitor.woa/JavaMonitor -WOPort 56789 &

Apache

56. Last step : compiling and installing the Apache module

For Ubuntu distributions :
Code Block
sudo apt-get install apache2 apache2.2-common apache2-mpm-prefork apache2-utils apache2-threaded-dev ssl-cert

...

(you will need httpd-devel and gcc)

For CentOS, RedHat or Fedora distributions :
Code Block
yum install httpd
yum install mod_ssl
yum install httpd-devel
chkconfig httpd on
/etc/init.d/httpd start

...

You can also find pre-built binaries of the module at webobjects.mdimension.com.

If no pre-built binaries exist for your platform, follow those instructions:

...

Code Block
#!/bin/bash

# chkconfig: - 90 20
# description: Provides WebObjects services

# Source function library.
. /etc/rc.d/init.d/functions

NEXT_ROOT="/opt"
export NEXT_ROOT

PATH="/bin:/usr/bin:/usr/java/jdk1.5/bin"
export PATH

USER=appserver

# See how we were called.
case "$1" in
	start)
		echo -n "Starting wotaskd and Monitor: "
		su $USER -c "$NEXT_ROOT/Local/Library/WebObjects/JavaApplications/wotaskd.woa/wotaskd -WOPort 1085 &"
		su $USER -c "$NEXT_ROOT/Local/Library/WebObjects/JavaApplications/JavaMonitor.woa/JavaMonitor -WOPort 56789 &"
		echo
		;;
	stop)
		echo -n "Shutting down wotaskd and Monitor: "
		WOTASKD_PID=`ps aux | awk '/WOPort 1085/ && !/awk/ {print $2}'`
		kill $WOTASKD_PID
		MONITOR_PID=`ps aux | awk '/WOPort 56789/ && !/awk/ {print $2}'`
		kill $MONITOR_PID
		echo
		;;
	restart)
		$0 stop
		$0 start
		;;
	*)
		echo -n "Usage: $0 {start|stop|restart}"
		exit 1
esac

if [ $# -gt 1 ]; then
	shift
	$0 $*
fi

exit 0

...

You also need to add the script with chkconfig so that everything start up after a reboot. If you named the above script as "webobjects", do :

For CentOS, RedHat or Fedora distributions :
Code Block
sudo /sbin/chkconfig --add webobjects
sudo /sbin/chkconfig webobjects on
For Ubuntu :
Code Block
sudo update-rc.d webobjects defaults 90 20

...