Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

WebObjects/Web Applications/Deployment/FreeBSD 6.2 WO5.3.3

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

Setup WebObjects 5.3.3 on FreeBSD 6.2 release (i386) Rev 0.8 2007-04-11 Francois BIENTZ (francois.bientz@voila.fr) Document based on the How-to :Setup WebObjects on Linux (Stefan Apelt) : http://www.tetlabors.de/wo/setup_webobjects_on_linux.html. Other platforms http://www.tetlabors.de/wo/ Thanks to Stefan Apelt, Ari Maniatis and Piotr Intres (Gentoo install) What you need : FreeBSD 6.2 X86 box a Mac and OSX 10.4.9 XCode 2.4.1, WebObjects 5.3.3 dev installed. or a Mac and OSX 10.4.9 server WebObjects 5.3.3 deploy installed. Install Java and Apache You can can build and install the native Java - using the ports system (see http://www.freebsd.org/java) - or download the diablo Java 1.5 package from the FreeBSD foundation:http://www.freebsdfoundation.org/downloads/java.shtml file: diablo-jdk-freebsd6.i386.1.5.0.07.01.tbz. Install Apache : I used apache13 from ports/www WebObjects 5.3.3 installation from OSX or OSX server On FreeBSD create these directories: /usr/local/apple/Library /usr/local/apple/Local/Library Directories/Files to copy from OSX to FreeBSD: FreeBSD: in /usr/local/apple/Library/Frameworks (OSX : /System/Library/Frameworks) /JavaDirectToWeb.framework /JavaDTWGeneration.framework /JavaEOAccess.framework /JavaEOApplication.framework /JavaEOCocoa.framework /JavaEOControl.framework /JavaEODistribution.framework /JavaEOGeneration.framework /JavaEOInterface.framework /JavaEOInterfaceCocoa.framework /JavaEOInterfaceSwing.framework /JavaEOProject.framework /JavaEORuleSystem.framework /JavaEOTool.framework /JavaFoundation.framework /JavaJDBCAdaptor.framework /JavaJNDIAdaptor.framework /JavaWebObjects.framework /JavaWebServicesClient.framework /JavaWebServicesGeneration.framework /JavaWebServicesSupport.framework /JavaWOExtensions.framework /JavaWOJSPServlet.framework /JavaXML.framework /JDBCEOAdaptor.framework /JNDIEOAdaptor.framework FreeBSD: in /usr/local/apple/Library/PrivateFrameworks (OSX : /System/Library/PrivateFrameworks) /EOPlaceholders.framework /JavaMonitor.framework FreeBSD: in /usr/local/apple/Library/WebObjects (OSX : /System/Library/WebObjects) /JavaApplications /WODocumentRoot FreeBSD: in /usr/local/apple/Local/Library/WebObjects/Extensions (OSX: /Library/WebObjects/Extensions) axis-ant.jar axis.jar commons-discovery.jar commons-logging.jar jaxrpc.jar log4j-1.2.8.jar saaj.jar wsdl4j.jar Install the Apache adaptor for FreeBSD edit /etc/profile and add : NEXT_ROOT=/usr/local/apple export NEXT_ROOT OS= FREEBSD export OS log off an log in (with a user login) then su Download the binary for FreeBSD 6.1 or Compile using Wo 5.2 Solaris Copy mod_WebObjects.so into /usr/local/libexec/apache. Configure Apache for WebObjects 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/mod_WebObjects.so #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://239.128.14.2:1085 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/httpd.conf. Search for the line "LoadModule rewrite_module ..." and insert the following lines right _before_ it: Include /usr/local/etc/apache/webobjects.conf SetHandler WebObjects </Location> 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 address, too. The explanation within httpd.conf about this is very good. ServerName yourhost.yourdomain.com Save and exit. Now, to see if everything is right, try: /usr/local/sbin/apachectl configtest If it says "Syntax OK", you are fine. Else, try to find and correct the errors it reports. Start Apache and WO Services Start Apache: /usr/local/sbin/apachectl start Start wotaskd : $NEXT_ROOT/Library/WebObjects/JavaApplications/wotaskd.woa/wotaskd & Start JavaMonitor and test the installation 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 similar to the following: Your application's URL is: http://yourhost.yourdomain.com:56789/cgi-bin/WebObjects/JavaMonitor.woa Open this URL in a web browser. Create startup scripts for wotaskd and javamonitor Install lsof from the ports Create /usr/local/etc/rc.d/110.wotaskd.sh #!/bin/sh NEXTROOT=/usr/local/apple case "$1" in start) export PATH=/usr/local/bin:$PATH export NEXT_ROOT=${NEXTROOT} ${NEXTROOT}/Library/WebObjects/JavaApplications/wotaskd.woa/wotaskd & echo -n ' wotaskd' ;; stop) lsof -i tcp:1085 |grep LISTEN | sort -u | awk '{print"kill -9 " $2}' | sh ;; *) echo "" echo "Usage: `basename $0` { start | stop }" echo "" exit 64 ;; esac Then chmod +x /usr/local/etc/rc.d/110.wotaskd.sh Create /usr/local/etc/rc.d/150.javamonitor.sh #!/bin/sh 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 56789 & echo -n 'JavaMonitor' ;; stop) lsof -i tcp:56789 |grep LISTEN | sort -u |awk '{print"kill -9 "$2}' | sh ;; *) echo "" echo "Usage: `basename $0` { start | stop }" echo "" exit 64 ;; esac Then chmod +x /usr/local/etc/rc.d/150.javamonitor.sh JDBC jars location. for mySQL: put the mysql-connector-java-5.0.3-bin.jar in /usr/local/apple/Local/Library/WebObjects/Extensions.