Open main menu

Wikibooks β

WebObjects/Web Applications/Deployment/FreeBSD WO5.3

< WebObjects‎ | Web Applications/Deployment

Setup WebObjects 5.3.1 or 5.3.2 on FreeBSD 6.1 release (i386) Rev 0.8 2007-05-22 Francois BIENTZ (

Document based on the How-to :Setup WebObjects on Linux (Stefan Apelt) : Other platforms

Thanks to Stefan Apelt, Ari Maniatis and Piotr Intres (Gentoo install)

What you need :

  • FreeBSD 6.1 X86 box
  • a Mac and OSX 10.4.7 XCode 2.4, WebObjects dev installed.
  • or a Mac and OSX 10.4.7 server WebObjects 5.3.1 deploy installed.


Install Java and ApacheEdit

You can can build and install the native Java - using the ports system (see - or download the diablo Java 1.5 package from the FreeBSD foundation: file: diablo-jdk-freebsd6.i386.

Install Apache : I used the apache+ssl- port

WebObjects 5.3.2 installation from OSX or WebObjects 5.3.1 from OSX serverEdit

On FreeBSD create these directories:


Directories/Files to copy from OSX to FreeBSD:

FreeBSD: in /usr/local/apple/Library/Frameworks (OSX : /System/Library/Frameworks)


FreeBSD: in /usr/local/apple/Library/Java (OSX : /System/Library/Java)


FreeBSD: in /usr/local/apple/Library/PrivateFrameworks (OSX : /System/Library/PrivateFrameworks)


FreeBSD: in /usr/local/apple/Library/WebObjects (OSX : /System/Library/WebObjects)


FreeBSD: in /usr/local/apple/Local/Library/WebObjects/Extensions (OSX: /Library/WebObjects/Extensions)


Install the Apache adaptor for FreeBSDEdit

edit /etc/profile and add :

export NEXT_ROOT
export OS

log off an log in (with a user login) then su

Copy into /usr/local/libexec/apache.

Configure Apache for WebObjectsEdit

Copy the configuration file for WebObjects to the Apache conf folder:

cp webobjects.conf /usr/local/etc/apache/

The webobjects.conf file :

# WebObjects : Enable the WebObjects module.

LoadModule WebObjects_module /usr/local/libexec/apache/
#AddModule mod_WebObjects.c

# Path to the Document Root of your Webserver, 
# it should contain a directory named WebObjects
WebObjectsDocumentRoot /usr/local/www/data

# You can change the 'cgi-bin' part of WebObjectsAlias to whatever you
# prefer (such as Apps), but the 'WebObjects' part is required.
WebObjectsAlias /cgi-bin/WebObjects

# Here are the 3 possible configuration modes.
# The apache module uses one of them to get information
# about your deployed applications.
# 1085 is the reserved port on which wotaskd processes listen to by default.

# Host List Configuration
# wotaskd is started automatically on supported platforms,
# so this is the default mode.
# The apache module gets its configuration from the wotaskds
# listed on the configuration line
# For multiple hosts:
# WebObjectsConfig http://<name-of-a-host>:<port-on-a-host>,http://<name-of-another-host>:<port-on-a-host> <interval>
# For localhost: 
WebObjectsConfig http://localhost:1085 10

# Multicast Configuration
# The apache module gets its configuration from all wotaskds
# that respond to the multicast call on the subnet
# WebObjectsConfig webobjects:// 10

# File Configuration
# The apache module gets its configuration from one file
# WebObjectsConfig file://<path-to-a-xml-config-file> 10

# To enable public access to the WOAdaptorInfo page, uncomment the following line
# WebObjectsAdminUsername public

# To enable the WOAdaptorInfo page with restricted access,
# uncomment the next two lines and set the user and password
# To access the WOAdaptorInfo page with restricted access, 
# use a URL like: http://webserver/cgi-bin/WebObjects/WOAdaptorInfo?user+password.
# WebObjectsAdminUsername user
# WebObjectsAdminPassword password

# To change the logging options, read the following comments:
# The option name is "WebObjectsLog" and the first value indicates the path of the log file.
# The second value indicates the log level. There are five, in decreasing informational order:
#       "Debug",    "Info",    "Warn",    "Error",    "User"
# Note: To enable logging, touch '/tmp/logWebObjects' as the administrator user (usually root).
# The following line is the default:
# WebObjectsLog /tmp/WebObjects.log Debug

Edit /usr/local/etc/apache/httpsd.conf. Search for the line "LoadModule rewrite_module ..." and insert the following lines right _before_ it:

Include /usr/local/etc/apache/webobjects.conf
<Location /cgi-bin/./>
SetHandler WebObjects

Search for the line "AddModule mod_rewrite.c" and put the following line right after that:

AddModule mod_WebObjects.c

Search for a line "ServerName ..." and put your DNS host name in there. If you do not have one, you can use your IP adress, too. The explanation within httpd.conf about this is very good.


Save and exit. Now, to see if everything is right, try:

/usr/local/sbin/httpsdctl configtest

If it says "Syntax OK", you are fine. Else, try to find and correct the errors it reports.

Start Apache and WO ServicesEdit

Start Apache: /usr/local/sbin/httpdsctl start

Start wotaskd : $NEXT_ROOT/Library/WebObjects/JavaApplications/wotaskd.woa/wotaskd &

Start JavaMonitor and test the installationEdit

The last step before adding application is starting JavaMonitor and see if it works: $NEXT_ROOT/Library/WebObjects/JavaApplications/JavaMonitor.woa/JavaMonitor -WOPort 56789

After JavaMonitor is launched, you will see a line similiar to the following:

Your application's URL is:

Open this URL in a web browser.

Create startup scripts for wotaskd and javamonitorEdit

Install lsof from the ports

Create /usr/local/etc/rc.d/



case "$1" in
           export PATH=/usr/local/bin:$PATH
           export NEXT_ROOT=${NEXTROOT}
           ${NEXTROOT}/Library/WebObjects/JavaApplications/wotaskd.woa/wotaskd &
           echo -n ' wotaskd'
           lsof -i tcp:1085 |grep LISTEN | sort -u | awk '{print"kill -9 " $2}' | sh
           echo ""
           echo "Usage: `basename $0` { start | stop }"
           echo ""
           exit 64


 chmod +x /usr/local/etc/rc.d/

Create /usr/local/etc/rc.d/



case "$1" in
           export PATH=/usr/local/bin:$PATH
           export NEXT_ROOT=${NEXTROOT}
           ${NEXTROOT}/Library/WebObjects/JavaApplications/JavaMonitor.woa/JavaMonitor -WOPort 56789 &
           echo -n 'JavaMonitor'
           lsof -i tcp:56789 |grep LISTEN | sort -u |awk '{print"kill -9 "$2}' | sh
           echo ""
           echo "Usage: `basename $0` { start | stop }"
           echo ""
           exit 64


 chmod +x /usr/local/etc/rc.d/

JDBC jars location.Edit

for mySQL: put the mysql-connector-java-3.0.17-ga-bin.jar in /usr/local/apple/Local/Library/WebObjects/Extensions.