Version 35.1 by arroz on 2011/04/30 14:55

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 17. 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.