Last modified by David Avendasora on 2014/02/28 02:10

Hide last authors
David Avendasora 44.1 1 This page describes the steps to install WebObjects 5.4.3 from scratch on a modern FreeBSD 8.2 system. This instructions do not include using the WOPort, as described inĀ [[doc:documentation.Home.Deployment.Platforms.Deploying on FreeBSD 6\.x and 7\.x (WO 5\.3\.3).WebHome]]. Although the WOPort would save a lot of time, it's not being actively maintained, and AFAIK does not support WO 5.4.3. This instructions are based on WOInstaller.jar, and provide all the necessary steps to a working deployment environment, including Apache web server integration.
Scott Neal 14.1 2
Bastian Triller 40.1 3 The following steps assume you have installed the necessary ports. Those include java/diablo-jdk16, www/apache22 and devel/git.
Scott Neal 14.1 4
Scott Neal 42.1 5 ~1. Download {{code language="none"}}WOInstaller.jar{{/code}} from [[http:~~/~~/wocommunity.org/documents/tools>>url:http://wocommunity.org/documents/tools||shape="rect"]]
arroz 30.1 6
arroz 22.1 7 2. As root, create the /usr/local/apple directory:
8
9 {{code}}
10 mkdir /usr/local/apple
11
12 {{/code}}
13
14 3. Run the following command to install the WebObjects frameworks in the directory just created:
15
16 {{code}}
arroz 32.1 17 java -jar WOInstaller.jar 5.4.3 /usr/local/apple
arroz 22.1 18
19 {{/code}}
20
Scott Neal 42.1 21 4. Edit {{code language="none"}}/etc/rc.conf{{/code}} and add the following lines:
arroz 22.1 22
23 {{code}}
24 ## WebObjects ##
25 JavaMonitor_enable="YES"
26 wotaskd_enable="YES"
27
28 {{/code}}
29
30 5. Run the following commands to create needed directories and set correct permissions:
31
32 {{code}}
33 mkdir /var/run/webobjects/
34 mkdir /var/log/webobjects/
35 chmod ugo+x /usr/local/apple/Library/WebObjects/JavaApplications/wotaskd.woa/wotaskd
36 chmod ugo+x /usr/local/apple/Library/WebObjects/JavaApplications/JavaMonitor.woa/JavaMonitor
37 chgrp www /usr/local/apple/Local/Library/WebObjects/Configuration/
Scott Neal 42.1 38 chmod g+w /usr/local/apple/Local/Library/WebObjects/Configuration/
arroz 22.1 39
40 {{/code}}
41
Scott Neal 42.1 42 6. Place these two files in {{code language="none"}}/usr/local/etc/rc.d/{{/code}} directory:Ā [[attach:WO.Deploying on FreeBSD 8.2 and WebObjects 5.4.3@wotaskd]] andĀ [[attach:WO.Deploying on FreeBSD 8.2 and WebObjects 5.4.3@JavaMonitor]]
arroz 22.1 43
Scott Neal 42.1 44 7. Run the following commands to start {{code language="none"}}wotaskd{{/code}} and {{code language="none"}}JavaMonitor{{/code}}. After running this commands, your system should be running wotaskd and JavaMonitor. You can verify that by running {{code language="none"}}top{{/code}} or {{code language="none"}}ps{{/code}}. Also, you should take the time now to configure JavaMonitor, including setting the administration password.
arroz 32.1 45
arroz 22.1 46 {{code}}
47 /usr/local/etc/rc.d/wotaskd start
48 /usr/local/etc/rc.d/JavaMonitor start
49
50 {{/code}}
51
arroz 32.1 52 8. We need to checkout Project Wonder to obtain a copy of the Apache adaptor source. To do that, cd to a work directory, and run the following command. This will checkout Project Wonder from GitHub.
arroz 22.1 53
54 {{code}}
Bastian Triller 40.1 55 git clone https://github.com/wocommunity/wonder.git
arroz 22.1 56
57 {{/code}}
arroz 26.1 58
Scott Neal 42.1 59 9. Inside the Project Wonder directory, navigate to the {{code language="none"}}Utilities/Adaptors{{/code}} directory:
arroz 26.1 60
61 {{code}}
62 cd Utilities/Adaptors
63
64 {{/code}}
65
Scott Neal 42.1 66 10. Edit the {{code language="none"}}make.config{{/code}} file, and set the OS to FreeBSD by changing the following line:
arroz 26.1 67
68 {{code}}
69 # Set the platform you are building on
70 ADAPTOR_OS = FreeBSD
71
72 {{/code}}
73
Scott Neal 42.1 74 ~11. Run the {{code language="none"}}gmake{{/code}} command on that directory. Note that you have to run {{code language="none"}}gmake{{/code}} and not {{code language="none"}}make{{/code}}. Also, do not change directory to {{code language="none"}}Apache2.2{{/code}}. The command should be run on the {{code language="none"}}Utilities/Adaptors{{/code}} directory.
arroz 26.1 75
76 {{code}}
77 gmake
78
79 {{/code}}
80
Scott Neal 42.1 81 12. After successful compilation, enter {{code language="none"}}Utilities/Adaptors/Apache2.2{{/code}} directory and install the module on Apache:
arroz 26.1 82
83 {{code}}
84 cd Apache2.2
85 apxs -i -a -n WebObjects mod_WebObjects.la
86
87 {{/code}}
88
Scott Neal 42.1 89 13. Edit the {{code language="none"}}/usr/local/etc/apache22/httpd.conf{{/code}} file and make sure the {{code language="none"}}LoadModule{{/code}} line for the WebObjects module appears before {{code language="none"}}LoadModule{{/code}} for {{code language="none"}}mod_rewrite{{/code}}. If not, swap the order of both lines.
arroz 26.1 90
Scott Neal 42.1 91 14. Still in {{code language="none"}}/usr/local/etc/apache22/httpd.conf{{/code}} file, tweak the following configurations (you can do however you want, this are just suggestions to make it run plain and simply):
arroz 26.1 92
Scott Neal 42.1 93 * Change {{code language="none"}}None{{/code}} to {{code language="none"}}All{{/code}} in the {{code language="none"}}Allow{{/code}} line of the following configuration section:
arroz 26.1 94
95 {{code}}
96 <Directory />
97 AllowOverride None
98 Order deny,allow
99 Allow from all
100 </Directory>
101
102 {{/code}}
103
Scott Neal 42.1 104 * Comment out the following line and section, if you want to use the default {{code language="none"}}/cgi-bin/WebObects{{/code}} URL for the WebObjects module:
arroz 26.1 105
106 {{code}}
107 # ScriptAlias /cgi-bin/ "/usr/local/www/apache22/cgi-bin/"
108
109 {{/code}}
110
111 {{code}}
112 #<Directory "/usr/local/www/apache22/cgi-bin">
113 # AllowOverride None
114 # Options None
115 # Order allow,deny
116 # Allow from all
117 #</Directory>
118
119 {{/code}}
120
Scott Neal 42.1 121 15. Assuming you're still in Wonder's {{code language="none"}}Utilities/Adaptors/Apache2.2{{/code}} directory (cd to it if you left it in the previous step), copy the following file to the Apache configuration directory:
arroz 26.1 122
123 {{code}}
124 cp apache.conf /usr/local/etc/apache22/Includes/wo.conf
125
126 {{/code}}
127
Scott Neal 42.1 128 16. Edit the destination file ({{code language="none"}}/usr/local/etc/apache22/Includes/wo.conf{{/code}}). You need to make two changes:
arroz 26.1 129
Scott Neal 42.1 130 * Comment out the LoadModule line, as the module is already loaded by {{code language="none"}}httpd.conf{{/code}}.
131 * Set {{code language="none"}}WebObjectsDocumentRoot{{/code}} to {{code language="none"}}/usr/local/www/apache22/data{{/code}}:
arroz 26.1 132
133 {{code}}
134 WebObjectsDocumentRoot /usr/local/www/apache22/data
135
136 {{/code}}
137
Scott Neal 42.1 138 17. Edit {{code language="none"}}/etc/rc.conf{{/code}} again and add the following lines:
arroz 26.1 139
140 {{code}}
141 apache22_enable="YES"
142
143 {{/code}}
144
Pascal Robert 36.1 145 18. Run the following command to launch Apache:
arroz 26.1 146
147 {{code}}
148 /usr/local/etc/rc.d/apache22 start
149
150 {{/code}}
151
Scott Neal 42.1 152 You should now have a working web server and WebObjects deployment environment. Try to open your browser and access {{code language="none"}}http://<your-server-name>/cgi-bin/WebObjects/app.woa{{/code}} and you should see the error "The requested application was not found on this server." generated by the WebObjects adaptor.
Pascal Robert 36.1 153
154 ===== Project Wonder =====
155
Scott Neal 42.1 156 To install Project Wonder, assuming you performed all the previous steps and checked out Wonder from GitHub, do the following steps logged in as your username (not root!):
Pascal Robert 36.1 157
Scott Neal 42.1 158 ~1. Install the port {{code language="none"}}devel/apache-ant{{/code}} if not yet installed.
Pascal Robert 36.1 159
160 2. Run the following command:
161
162 {{code}}
163 mkdir -p "~/Library/Application Support/WOLips/"
164
165 {{/code}}
166
Scott Neal 42.1 167 3. On that directory, create a file named {{code language="none"}}wolips.properties{{/code}} with the following content, adjusted to your paths:
Pascal Robert 36.1 168
169 {{code}}
170 #Wed Sep 17 01:33:31 WEST 2008
171 wo.system.root=/usr/local/apple
172 wo.user.frameworks=/home/<username>/Library/Frameworks
173 wo.system.frameworks=/usr/local/apple/Library/Frameworks
174 wo.bootstrapjar=/usr/local/apple/Library/WebObjects/JavaApplications/wotaskd.woa/WOBootstrap.jar
175 wo.network.frameworks=
176 wo.api.root=
177 wo.network.root=
178 wo.extensions=/usr/local/apple/Local/Library/WebObjects/Extensions
179 wo.user.root=/home/<username>
180 wo.local.frameworks=/usr/local/apple/Local/Library/Frameworks
181 wo.apps.root=/usr/local/apple/Local/Library/WebObjects/Applications
182 wo.local.root=/usr/local/apple/Local
183 wo.systemroot=/usr/local/apple
184 wo.wosystemroot=/usr/local/apple
185 wo.wolocalroot=/usr/local/apple/Local
186 wo.localroot=/usr/local/apple/Local
187 wo.server.root=/usr/local/www/apache22/data/WebObjects
188
189 {{/code}}
190
Scott Neal 42.1 191 4. Create {{code language="none"}}/usr/local/www/apache22/data/WebObjects{{/code}} directory with write permission for group {{code language="none"}}wheel{{/code}} (or whatever group you are on).
Pascal Robert 36.1 192
193 5. Run the following command:
194
195 {{code}}
196 chmod -R g+w /usr/local/apple/Local/Library
197
198 {{/code}}
199
200 Note that you can use more restrict permissions than the ones showed here. This should be only considered as an example.
201
Scott Neal 42.1 202 6. {{code language="none"}}cd{{/code}} into the Wonder directory.
Pascal Robert 36.1 203
204 7. Run the commands:
205
206 {{code}}
207 ant frameworks
208 ant frameworks.install
209
210 {{/code}}
211
212 This will compile and install Wonder in your system, including the web server resources of Wonder frameworks, like Ajax.