Preparing the system
Extracting the WebObjects Runtime
Before you can install the WebObjects Runtime you must first extract the necessary files from the WebObjects Runtime disk image that Apple uses to distribute the software. You will need to use a Mac to do this as the DMG file format is not supported by other platforms.
- Fetch the WebObjects 5.3.3 Runtime from Apple's website
- Mount the disk image on a Mac and copy the package archive from within the package's Resources folder to the FreeBSD system's ports distfiles directory. Note: The following assumes you have sudo installed on the FreeBSD system
Alternative File extraction technique
It is possible to extract the required package archive from the DMG without mounting it using the following commands.
Updating the FreeBSD Ports tree
The Ports tree for FreeBSD is constantly being updated and it is important that you have updated the local ports tree before proceeding any further.
Use portsnap to update the ports tree
Java for FreeBSD can be installed either as a package or a port. Either way requires that certain items be downloaded manually, for instructions on downloading and installing the Sun JDK from source visit the FreeBSD Java Project website. The binary JDK distribution for FreeBSD is known as Diablo and is available from the FreeBSD Foundation Java Downloads site. Although WebObjects is certified against JDK 1.4, there are no known issues with using JDK 1.5 and it is suggested that you try this version first.
Installing the Diablo JDK 1.5 port after downloading the necessary distfiles might look something like this:
Download and extract the WOCOM:WOPorts bundle into your home directory
Installing a web server
If you intend to setup a WOAdaptor front end on the machine then it is recommended you install the web server of your choice first. Currently supported web servers are Apache, nginx and lighttpd.
To install Apache 1.3 + SSL you would do this:
Installing the WebObjects Runtime
Configure & Install the WebObjects Deployment port
The WebObjects Deployment port allows you to automatically install the webobjects runtime as well as a variety of WebObjects related dependencies. These include WOAdaptors for Apache and CGI/FastCGI, JDBC & EOF plugins (for FrontBase, PostgreSQL, MySQL & OpenBase), Project Wonder and WOProject.
You can configure your preferred options and install the port like this:
Configuring JavaMonitor & wotaskd
To use JavaMonitor and wotaskd you will need to configure them to run on startup.
Edit /etc/rc.conf and add the following lines:
To run them manually without rebooting do the following:
Even if you run them manually, you still need to add the lines above to the /etc/rc.conf.
Configuring the web server
If you are using Apache as your front end, and have installed the WebObjects Apache module, you will need to make some minor modifications to the standard configuration to make things work.
- Comment out the ScriptAlias /cgi-bin/ statement
The standard apache config comes with a ScriptAlias to allow /cgi-bin/ scripts to be run, this interferes with the default webobjects config so you will want to disable it.
- Include the webobjects.conf file
If you are using Apache 1.3 add the following line to the end of your /usr/local/etc/apache/httpd.conf file: If you are using Apache 2.2 the configuration file will already be installed in the following location: You will need to edit it for your specific installation. In particular, you may need to change WebObjectsAlias from /cgi-bin/WebObjects to /Apps/WebObjects or else Apache gets confused. The easiest way to do this is to replace 'cgi-bin' throughout the webobjects.conf file with 'Apps'.
If you are using nginx as your front end, and have installed the FastCGI adaptor, you will need to add the following declaration to the server configuration in order to enable the adaptor.
You will also need to enable the FastCGI service to run on startup by adding the following line to /etc/rc.conf
If you are using lighttpd as your front end, and have installed the FastCGI adaptor, you will need to add the following declaration to the server configuration in order to enable the adaptor.
Deploying an Application
The traditional method for deploying a WebObjects application is to do a split install. This involves installing the application bundle into one location, and the web server resources into another.
Installing the application
Installing the application bundle is simply a case of transferring the application to the appropriate location on the deployment server. This might look something like this:
Installing the web server resources
Next you need to install any web server resources that belong to your application. If you have a separate bundle already with just these resources you can just copy the bundle directly into /usr/local/www/webobjects/WebObjects like we did with the application bundle previously. If you don't have a separate split install bundle you can install the necessary files this way: