Versions Compared

Key

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

...

I needed to install the WebObjects deployment environment on a CentOS 5.2 64 bit box, and by combining tidbits of information from the mailing lists and the wiki, I was able to have a working environment. This is how I did it :

1. You need to install a Java SDK. DON'T use the Java stuff from GNU, use a JDK from Sun instead. In my case, I installed JDK 1.5.0_16 from a RPM I got from java.sun.com. I also created two symbolink links :

Code Block
ln -s /usr/java/jdk1.5.0_16 /usr/java/jdk1.5
vi ln -s /usr/java/jdk1.5/bin/java /usr/bin/java

and you need to change your path in your bash profile (_~/.bash_profile) to have this path :

Code Block
PATH=$PATH:/usr/java/jdk1.5/bin:$HOME/bin

2. Get the WebObjects installer from mDimension's Web site :

Code Block

wget http://webobjects.mdimension.com/wolips/WOInstaller.jar
[root@wohost ~]# 

and install it like this :

Code Block

sudo /usr/java/jdk1.5/bin/java -jar WOInstaller.jar 5.4.3 /opt
[root@wohost

WebObjects frameworks are now installed in /opt

Code Block

[root@ ~]# ls -l /opt/
total 12
drwxr-xr-x 3 root root 4096 Nov  9 08:19 Developer
drwxr-xr-x 4 root root 4096 Nov  9 08:19 Library
drwxr-xr-x 3 root root 4096 Nov  9 08:20 Local
[root@wohost ~]# 

3. 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

sudo groupadd appserveradm
[root@wohost ~]# sudo useradd -g appserveradm appserver
[root@wohost ~]# NEXT_ROOT=/opt; export NEXT_ROOT
[root@wohost

and fix some permissions :

Code Block

[root@ ~]# chown -R appserver:appserveradm $NEXT_ROOT/Library/WebObjects/JavaApplications/wotaskd.woa/wotaskdopt/Local
[root@wohostroot@ ~]# chmod 750 $NEXT_ROOT/Library/WebObjects/JavaApplications/wotaskd.woa/wotaskd
[root@wohost ~]# chown -R appserver:appserveradm /opt/Local/Library/WebObjects/
[root@wohostroot@ ~]# chmod 750 $NEXT_ROOT/opt/Library/WebObjects/JavaApplications/JavaMonitor.woa/JavaMonitor
[root@wohostroot@ ~]# chownchmod appserver:appserveradm $NEXT_ROOT750 /opt/Library/WebObjects/JavaApplications/JavaMonitorwotaskd.woa/JavaMonitor/Contents/Resources/SpawnOfWotaskd.sh
[root@wohostroot@ ~]# chownchmod appserver:appserveradm750 /opt/Library/WebObjects/JavaApplications/wotaskd.woa/Contents/Resources/SpawnOfWotaskd.sh
[root@wohostwotaskd

4. Now we can start wotask and Monitor

Code Block

[root@ ~]# su - appserver

Edit the bash profile of the appserver, and add this line :

Code Block

NEXT_ROOT=/opt; export NEXT_ROOT

and run it manually in your current shell :

Code Block

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

You can start wotaskd and Monitor to make sure that they run without any problems :

appserver@wohost ~$ $NEXT_ROOT/Library/WebObjects/JavaApplications/wotaskd.woa/wotaskd

...

&

...


appserver@wohost

...

~

...

$

...

$NEXT_ROOT/Library/WebObjects/JavaApplications/JavaMonitor.woa/JavaMonitor

...

-WOPort

...

56789

...

&

5. Last step : compiling and installing the Apache module

Get the source of the module (adaptor) from Wonder. You only need the Adaptors (and its subfolders) folder.

Edit make.config and change the value of ADAPTOR_OS to LINUX.

and at the line before "endif\n#end Linux", add :

Code Block

CC=gcc

Go to the ApacheXX folder that match your Apache version. In my case, I'm using Apache 2.2 built from source and installed in /usr/local/apache.

Code Block

[root@ Adaptors]# cd Apache2.2/
[root@ Apache2.2]# make
[root@wohostroot@ Apache2.2]# /usr/local/apache/bin/apxs -i -a -n WebObjects mod_WebObjects.la
[root@wohostroot@ Apache2.2]# cp -rp /opt/Library/WebObjects/WODocumentRoot/WebObjects /usr/local/apache/htdocs
[root@wohostroot@ Apache2.2]# cp apache.conf /usr/local/apache/conf/extra/webobjects.conf
vi webobjects.conf
----> #LoadModule WebObjects_module           modules/mod_WebObjects.so
WebObjectsAlias /apps/WebObjects
[root@wohost ~]# chmod 750 /opt/Library/WebObjects/JavaApplications/wotaskd.woa/Contents/Resources/SpawnOfWotaskd.sh

And edit /usr/local/apache/conf/extra/webobjects.conf to comment the LoadModule WebObjects_module line. You can also change the WebObjectsAlias property, in my case I use /apps/WebObjects.

Check for any errors with apachectl configtest, and if everything's ok, you are good to go. You can install your first app, don't forget that your app must be accessible by the appserver user or the appserveradm group. If your app don't start or if Monitor complains about a path, it might be a permission problem.