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

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Ā [[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.
2
3 The following steps assume you have installed the necessary ports. Those include java/diablo-jdk16, www/apache22 and devel/git.
4
5 ~1. Download {{code language="none"}}WOInstaller.jar{{/code}} from [[http:~~/~~/wocommunity.org/documents/tools>>url:http://wocommunity.org/documents/tools||shape="rect"]]
6
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}}
17 java -jar WOInstaller.jar 5.4.3 /usr/local/apple
18
19 {{/code}}
20
21 4. Edit {{code language="none"}}/etc/rc.conf{{/code}} and add the following lines:
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/
38 chmod g+w /usr/local/apple/Local/Library/WebObjects/Configuration/
39
40 {{/code}}
41
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]]
43
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.
45
46 {{code}}
47 /usr/local/etc/rc.d/wotaskd start
48 /usr/local/etc/rc.d/JavaMonitor start
49
50 {{/code}}
51
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.
53
54 {{code}}
55 git clone https://github.com/wocommunity/wonder.git
56
57 {{/code}}
58
59 9. Inside the Project Wonder directory, navigate to the {{code language="none"}}Utilities/Adaptors{{/code}} directory:
60
61 {{code}}
62 cd Utilities/Adaptors
63
64 {{/code}}
65
66 10. Edit the {{code language="none"}}make.config{{/code}} file, and set the OS to FreeBSD by changing the following line:
67
68 {{code}}
69 # Set the platform you are building on
70 ADAPTOR_OS = FreeBSD
71
72 {{/code}}
73
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.
75
76 {{code}}
77 gmake
78
79 {{/code}}
80
81 12. After successful compilation, enter {{code language="none"}}Utilities/Adaptors/Apache2.2{{/code}} directory and install the module on Apache:
82
83 {{code}}
84 cd Apache2.2
85 apxs -i -a -n WebObjects mod_WebObjects.la
86
87 {{/code}}
88
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.
90
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):
92
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:
94
95 {{code}}
96 <Directory />
97 AllowOverride None
98 Order deny,allow
99 Allow from all
100 </Directory>
101
102 {{/code}}
103
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:
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
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:
122
123 {{code}}
124 cp apache.conf /usr/local/etc/apache22/Includes/wo.conf
125
126 {{/code}}
127
128 16. Edit the destination file ({{code language="none"}}/usr/local/etc/apache22/Includes/wo.conf{{/code}}). You need to make two changes:
129
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}}:
132
133 {{code}}
134 WebObjectsDocumentRoot /usr/local/www/apache22/data
135
136 {{/code}}
137
138 17. Edit {{code language="none"}}/etc/rc.conf{{/code}} again and add the following lines:
139
140 {{code}}
141 apache22_enable="YES"
142
143 {{/code}}
144
145 18. Run the following command to launch Apache:
146
147 {{code}}
148 /usr/local/etc/rc.d/apache22 start
149
150 {{/code}}
151
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.
153
154 ===== Project Wonder =====
155
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!):
157
158 ~1. Install the port {{code language="none"}}devel/apache-ant{{/code}} if not yet installed.
159
160 2. Run the following command:
161
162 {{code}}
163 mkdir -p "~/Library/Application Support/WOLips/"
164
165 {{/code}}
166
167 3. On that directory, create a file named {{code language="none"}}wolips.properties{{/code}} with the following content, adjusted to your paths:
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
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).
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
202 6. {{code language="none"}}cd{{/code}} into the Wonder directory.
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.