WebObjects/Web Applications/Deployment/FreeBSD
Install Java
editFollow the FreeBSD instructions to install the native Java. I (Ari Maniatis) am still using 1.4.2 on our deployment servers, but it is likely that 1.5.x will work fine.
This should also cause the javavmwrapper port to be installed. This makes it easy to switch between different Java VM versions.
Install WebObjects
editInstall gtar (the FreeBSD tar doesn't seem to work for me):
portinstall gtar
Mount the WebObjects CD at /mnt/cdrom and then:
cd /mnt/cdrom/Deployment/SOLARIS ./install.sh -license B-111-AAA-111-AAA-111-AAA-111-AAA-111 -altjvm /usr/local/bin/javavm -adaptorsOnly NO -minimalInstall NO -cgibin /usr/local/www/cgi-bin -docroot /usr/local/www/data -woroot /usr/local/apple -gnutar /usr/local/bin/gnutar
To find your license key, look in your developer installation and find it at:
/System/Library/Frameworks/JavaWebObjects.framework/Resources/License.key
The system then needs to know where NEXT_ROOT lives:
edit /etc/profile and add:
NEXT_ROOT=/usr/local/apple export NEXT_ROOT OS= FREEBSD export OS
Log out and then back in to make sure this takes effect.
Apply updates
editIf necessary, you can apply updates like this:
sh patcher.sh -install WO51Solaris522.tar.gzip
You can download the patcher.sh shell script and the gzip update from Apple's website.
Install the Apache adaptor
editTODO: I've tried but failed to get this working with Apache2
Configure Apache
editAdd the configuration file: cp $NEXT_ROOT/Developer/Examples/WebObjects/Source/Adaptors/Apache/apache.conf /usr/local/etc/apache/webobjects.conf
Add the line:
Include /usr/local/etc/apache/webobjects.conf
- before* LoadModule rewrite_module
Add the line:
AddModule mod_WebObjects.c
- after* AddModule mod_rewrite.c
Edit the configuration file at /usr/local/etc/apache/webobjects.conf:
comment out the line "AddModule mod_WebObjects.c" replace LOCAL_LIBRARY_DIR/WebServer/Documents with /usr/local/www/data
Create a startup scripts for wotaskd and javamonitor
editCreate /usr/local/etc/rc.d/110.wotaskd.sh
#!/bin/sh NEXTROOT=/usr/local/Apple case "$1" in start) if [ -x /usr/local/bin/mysqld_safe ]; then export PATH=/usr/local/bin:$PATH export NEXT_ROOT=${NEXTROOT} ${NEXTROOT}/Library/WebObjects/JavaApplications/wotaskd.woa/wotaskd & echo -n ' wotaskd' fi ;; stop) echo "not supported" ;; *) echo "" echo "Usage: `basename $0` { start | stop }" echo "" exit 64 ;; esac
Create /usr/local/etc/rc.d/150.javamonitor.sh
#!/bin/sh PATH=/usr/local/bin NEXTROOT=/usr/local/Apple case "$1" in start) export PATH=/usr/local/bin:$PATH export NEXT_ROOT=${NEXTROOT} ${NEXTROOT}/Library/WebObjects/JavaApplications/JavaMonitor.woa/JavaMonitor -WOPort 6666 & echo -n 'JavaMonitor' ;; stop) echo "not supported" ;; *) echo "" echo "Usage: `basename $0` { start | stop }" echo "" exit 64 ;; esac