Wiki source code of Windows Deployment WO 5.4
Version 44.1 by fjecker on 2010/07/12 10:59
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | = Overview = | ||
| 2 | |||
| 3 | Howto deploy WebObjects 5.4 under Windows | ||
| 4 | |||
| 5 | = What you need = | ||
| 6 | |||
| 7 | * Windows 2003 Server; Windows XP Professional | ||
| 8 | * Apache 2.2 | ||
| 9 | * Java 1.5 | ||
| 10 | * a Mac with WebObjects 5.4 installed | ||
| 11 | |||
| 12 | = Install Java and Apache = | ||
| 13 | |||
| 14 | * download and install [[Java 1.5>>http://java.sun.com/javase/downloads/previous.jsp]] (you had to install the multilingual option). | ||
| 15 | * download and install [[apache 2.2>>http://httpd.apache.org]] | ||
| 16 | |||
| 17 | = Copy WebObjects files from your Mac = | ||
| 18 | |||
| 19 | In this description WebObjects will be installed on drive C: and apache is located under c:/apache. | ||
| 20 | |||
| 21 | Create the following directory tree under Windows | ||
| 22 | |||
| 23 | {{code}} | ||
| 24 | |||
| 25 | C:/Apple | ||
| 26 | Library | ||
| 27 | Frameworks | ||
| 28 | WebObjects | ||
| 29 | Configuration | ||
| 30 | JavaApplications | ||
| 31 | Local | ||
| 32 | Library | ||
| 33 | Frameworks | ||
| 34 | WebObjects | ||
| 35 | Applications | ||
| 36 | Configuration | ||
| 37 | Extensions | ||
| 38 | |||
| 39 | {{/code}} | ||
| 40 | |||
| 41 | Copy the listed Frameworks from /System/Library/Frameworks to C:/Apple/Frameworks: | ||
| 42 | |||
| 43 | {{code}} | ||
| 44 | |||
| 45 | JavaDirectToWeb.framework | ||
| 46 | JavaDTWGeneration.framework | ||
| 47 | JavaEmbedding.framework | ||
| 48 | JavaEOAccess.framework | ||
| 49 | JavaEOApplication.framework | ||
| 50 | JavaEOControl.framework | ||
| 51 | JavaEODistribution.framework | ||
| 52 | JavaEOGeneration.framework | ||
| 53 | JavaEOInterface.framework | ||
| 54 | JavaEOInterfaceCocoa.framework | ||
| 55 | JavaEOInterfaceSwing.framework | ||
| 56 | JavaEOProject.framework | ||
| 57 | JavaEORuleSystem.framework | ||
| 58 | JavaEOTool.framework | ||
| 59 | JavaFoundation.framework | ||
| 60 | JavaFrameEmbedding.framework | ||
| 61 | JavaJDBCAdaptor.framework | ||
| 62 | JavaJNDIAdaptor.framework | ||
| 63 | JavaWebObjects.framework | ||
| 64 | JavaWebServicesClient.framework | ||
| 65 | JavaWebServicesGeneration.framework | ||
| 66 | JavaWebServicesSupport.framework | ||
| 67 | JavaWOExtensions.framework | ||
| 68 | JavaWOJSPServlet.framework | ||
| 69 | |||
| 70 | {{/code}} | ||
| 71 | |||
| 72 | Copy JavaMonitor.woa and wotaskd.woa from /System/Library/WebObjects/JavaApplications to c:/Apple/Library/JavaApplications | ||
| 73 | |||
| 74 | Copy the content of /System/Library/WebObjects/WODocumentRoot to your apache document root directory. If you don't use D2W or D2JC I think you can omit the both Java folders. | ||
| 75 | |||
| 76 | At least copy the jar files from /Library/WebObjects/Extensions to c:/Apple/Local/Library/WebObjects/Extensions. | ||
| 77 | |||
| 78 | {{code}} | ||
| 79 | |||
| 80 | axis.jar | ||
| 81 | axis-ant.jar | ||
| 82 | commons-discovery-0.2.jar | ||
| 83 | commons-logging-1.0.4.jar | ||
| 84 | derby.jar | ||
| 85 | derbyclient.jar | ||
| 86 | jaxrpc.jar | ||
| 87 | log4j-1.2.14.jar | ||
| 88 | saaj.jar | ||
| 89 | serializer.jar | ||
| 90 | servlet.jar | ||
| 91 | wsdl4j-1.5.1.jar | ||
| 92 | xalan.jar | ||
| 93 | xercesImpl.jar | ||
| 94 | xml-apis.jar | ||
| 95 | |||
| 96 | {{/code}} | ||
| 97 | |||
| 98 | = Add environment variable = | ||
| 99 | |||
| 100 | Under "System" add the environment variable NEXT//ROOT = C:/Apple// | ||
| 101 | |||
| 102 | = Installing the Apache Adaptor = | ||
| 103 | |||
| 104 | Copy the [[mod//WebObjects.so//>>http://webobjects.mdimension.com/wonder/mod_WebObjects/Apache2.2/windows/mod_WebObjects.so]] file to c:/apache/modules | ||
| 105 | |||
| 106 | {{info title="Hint"}} | ||
| 107 | |||
| 108 | In some cases apache won't launch on a Windows Server system with this module. | ||
| 109 | In this case you should install the .Net Framework (3.x) on your system. | ||
| 110 | |||
| 111 | {{/info}} | ||
| 112 | |||
| 113 | = Configuring Apache = | ||
| 114 | |||
| 115 | Open the httpd.conf file in c:/apache/conf and search for the line "LoadModule rewrite//module modules/mod//rewrite.so" and put the following
line right befor that: | ||
| 116 | |||
| 117 | {{code}} | ||
| 118 | |||
| 119 | LoadModule WebObjects_module modules/mod_WebObjects.so | ||
| 120 | |||
| 121 | {{/code}} | ||
| 122 | |||
| 123 | At the end of the httpd.conf file add the following lines: | ||
| 124 | |||
| 125 | {{code}} | ||
| 126 | |||
| 127 | # WebObjects 5.4: Enable the WebObjects module. loadModule should be added before mod_rewrite | ||
| 128 | Include conf/extra/httpd-webobjects.conf | ||
| 129 | |||
| 130 | {{/code}} | ||
| 131 | |||
| 132 | Find the <Directory /> entry and comment out the last two lines | ||
| 133 | |||
| 134 | {{code}} | ||
| 135 | |||
| 136 | <Directory /> | ||
| 137 | Options FollowSymLinks | ||
| 138 | AllowOverride None | ||
| 139 | # Order deny,allow | ||
| 140 | # Deny from all | ||
| 141 | </Directory> | ||
| 142 | |||
| 143 | {{/code}} | ||
| 144 | |||
| 145 | Create the file httpd-webobjects.conf in your c:/apache/conf/extra folder: | ||
| 146 | |||
| 147 | {{code}} | ||
| 148 | |||
| 149 | # WebObjects 5.4: Enable the WebObjects module. Should be loaded before mod_rewrite | ||
| 150 | # LoadModule WebObjects_module modules/mod_WebObjects.so | ||
| 151 | |||
| 152 | # Path to the Document Root of your Webserver, | ||
| 153 | # it should contain a directory named WebObjects | ||
| 154 | WebObjectsDocumentRoot c:/apache/htdocs | ||
| 155 | |||
| 156 | # You can change the 'cgi-bin' part of WebObjectsAlias to whatever you | ||
| 157 | # prefer (such as Apps), but the 'WebObjects' part is required. | ||
| 158 | WebObjectsAlias /Apps/WebObjects | ||
| 159 | |||
| 160 | # Here are the 3 possible configuration modes. | ||
| 161 | # The apache module uses one of them to get information | ||
| 162 | # about your deployed applications. | ||
| 163 | # 1085 is the reserved port on which wotaskd processes listen to by default. | ||
| 164 | |||
| 165 | # Host List Configuration | ||
| 166 | # wotaskd is started automatically on supported platforms, | ||
| 167 | # so this is the default mode. | ||
| 168 | # The apache module gets its configuration from the wotaskds | ||
| 169 | # listed on the configuration line | ||
| 170 | # For multiple hosts: | ||
| 171 | # WebObjectsConfig http://<name-of-a-host>:<port-on-a-host>,http://<name-of-another-host>:<port-on-a-host> <interval> | ||
| 172 | # For localhost: | ||
| 173 | WebObjectsConfig http://localhost:1085 10 | ||
| 174 | |||
| 175 | # Multicast Configuration | ||
| 176 | # The apache module gets its configuration from all wotaskds | ||
| 177 | # that respond to the multicast call on the subnet | ||
| 178 | # WebObjectsConfig webobjects://239.128.14.2:1085 10 | ||
| 179 | |||
| 180 | # File Configuration | ||
| 181 | # The apache module gets its configuration from one file | ||
| 182 | # WebObjectsConfig file://<path-to-a-xml-config-file> 10 | ||
| 183 | |||
| 184 | # To enable public access to the WOAdaptorInfo page, uncomment the following line | ||
| 185 | # WebObjectsAdminUsername public | ||
| 186 | |||
| 187 | # To enable the WOAdaptorInfo page with restricted access, | ||
| 188 | # uncomment the next two lines and set the user and password | ||
| 189 | # To access the WOAdaptorInfo page with restricted access, | ||
| 190 | # use a URL like: http://webserver/cgi-bin/WebObjects/WOAdaptorInfo?user+password. | ||
| 191 | # WebObjectsAdminUsername user | ||
| 192 | # WebObjectsAdminPassword password | ||
| 193 | |||
| 194 | # To change the logging options, read the following comments: | ||
| 195 | # The option name is "WebObjectsLog" and the first value indicates the path of the log file. | ||
| 196 | # The second value indicates the log level. There are five, in decreasing informational order: | ||
| 197 | # "Debug", "Info", "Warn", "Error", "User" | ||
| 198 | # | ||
| 199 | # Note: To enable logging, touch '/tmp/logWebObjects' as the administrator user (usually root). | ||
| 200 | # | ||
| 201 | # The following line is the default: | ||
| 202 | # WebObjectsLog /Library/WebObjects/Logs/WebObjects.log Debug | ||
| 203 | |||
| 204 | {{/code}} | ||
| 205 | |||
| 206 | You had to restart your Apache Service to apply your changes. | ||
| 207 | |||
| 208 | = Installing WOTaskDaemon as a Windows Service = | ||
| 209 | |||
| 210 | To install wotaskd as a Window service you need a third party tool. | ||
| 211 | In example you can use FireDaemon and add a new Service: | ||
| 212 | Executable: C:ppleibraryebObjectsavaApplicationsotaskd.woaotaskd.CMD | ||
| 213 | Working Directory:C:ppleibraryebObjectsavaApplicationsotaskd.woa | ||
| 214 | |||
| 215 | (If someone find a freeware doing the same, please let us know) | ||
| 216 | |||
| 217 | To test the system you can also install WO Monitor as a service: | ||
| 218 | Executable: C:ppleibraryebObjectsavaApplicationsavaMonitor.woaavaMonitor.CMD | ||
| 219 | Working Directory:C:ppleibraryebObjectsavaApplicationsavaMonitor.woa | ||
| 220 | |||
| 221 | You can also use Microsoft's instsrv and srvany to register Wotaskd's cmd as a service. | ||
| 222 | |||
| 223 | Those tools are bundled with Microsoft Windows 2003 resource kit and are free to [[download>>http://www.microsoft.com/downloads/details.aspx?familyid=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en]]. | ||
| 224 | The following KB article [[KB 469536>>http://support.microsoft.com/kb/469536/fr]] explains how to use those tools to run script files as services (sorry, it's in french, I haven't found its translation but a search on google on srvany should do the job ) | ||
| 225 | |||
| 226 | = Testing the installation = | ||
| 227 | |||
| 228 | Now that everything should be set up properly, it is time for a small test. First, let's look if wotaskd is working. | ||
| 229 | |||
| 230 | Open a browser and go to http:~/~/<myhost>:1085If it works, you should see the host's configuration displayed in the browser. Now, start WOMonitor (double click on ...avaMonitor.woaavaMonitor.CMD) if it is not already running as a service. | ||
| 231 | Wait a few seconds, then point the browser to http:~/~/<myhost>:56789 | ||
| 232 | |||
| 233 | You should see Monitor's main window. Now you can start deploying your applications. |