Version 38.1 by arroz on 2011/04/30 15:32

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