Deploying on FreeBSD 6.x and 7.x (WO 5.3.3)
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 Unknown macro: noformat. Click on this message for details.
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
Unknown macro: noformat. Click on this message for details.
Installing Java
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:
Unknown macro: noformat. Click on this message for details.
Extracting WOPorts
Download and extract the
into your home directoryUnknown macro: noformat. Click on this message for details.
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:
Unknown macro: noformat. Click on this message for details.
To install Apache 2.2 (which always includes SSL) you would do this:
- Unknown macro: noformat. Click on this message for details.
Edit /etc/rc.conf and add the following lines:
Unknown macro: noformat. Click on this message for details.
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:
Unknown macro: noformat. Click on this message for details.
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:
Unknown macro: noformat. Click on this message for details.
To run them manually without rebooting do the following:
Unknown macro: noformat. Click on this message for details.
Even if you run them manually, you still need to add the lines above to the /etc/rc.conf.
Configuring the web server
Apache
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: Unknown macro: noformat. Click on this message for details.
If you are using Apache 2.2 the configuration file will already be installed in the following location: Unknown macro: noformat. Click on this message for details.
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'.
Nginx
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.
Unknown macro: noformat. Click on this message for details.
You will also need to enable the FastCGI service to run on startup by adding the following line to /etc/rc.conf
Unknown macro: noformat. Click on this message for details.
Lighttpd
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.
Unknown macro: noformat. Click on this message for details.
Verify the Installation
Apache
With no additional applications installed, you should be able to test part of your installation now. This assumes that you have Apache configured properly.
Unknown macro: noformat. Click on this message for details.
Then with a web browser, visit http://HOSTNAME:56789/. The JavaMonitor application should appear. You should immediately set a password for the JavaMonitor if you do not have some other mechanism in place for restricting access to this application.
To shut down manually:
Unknown macro: noformat. Click on this message for details.
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:
Unknown macro: noformat. Click on this message for details.
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:
Unknown macro: noformat. Click on this message for details.
Installing Wonder
Project Wonder is installed into Local/Library/Frameworks (not Library/Frameworks).
The steps below assume that you have installed the 'curl' utility and that you are running as root.
Unknown macro: noformat. Click on this message for details.