Wiki source code of FreeBSD 8.2 and WebObjects 5.4.3
Version 28.1 by arroz on 2011/04/23 17:58
Show last authors
author | version | line-number | content |
---|---|---|---|
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:** 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. | ||
4 | |||
5 | The following steps assume you have installed the necessary ports. Those include ##java/diablo-jdk16##, ##www/apache22## and ##devel/git##. | ||
6 | |||
7 | ~1. Download ##WOInstaller.jar## from [[http://webobjects.mdimension.com/wolips/]] | ||
8 | |||
9 | 2. As root, create the /usr/local/apple directory: | ||
10 | |||
11 | {{code}} | ||
12 | |||
13 | mkdir /usr/local/apple | ||
14 | |||
15 | {{/code}} | ||
16 | |||
17 | 3. Run the following command to install the WebObjects frameworks in the directory just created: | ||
18 | |||
19 | {{code}} | ||
20 | |||
21 | java -jar WOInstaller.jar 5.4.3 {{/usr/local/apple}} | ||
22 | |||
23 | {{/code}} | ||
24 | |||
25 | 4. Edit ##/etc/rc.conf## and add the following lines: | ||
26 | |||
27 | {{code}} | ||
28 | |||
29 | ## WebObjects ## | ||
30 | JavaMonitor_enable="YES" | ||
31 | wotaskd_enable="YES" | ||
32 | |||
33 | {{/code}} | ||
34 | |||
35 | 5. Run the following commands to create needed directories and set correct permissions: | ||
36 | |||
37 | {{code}} | ||
38 | |||
39 | mkdir /var/run/webobjects/ | ||
40 | mkdir /var/log/webobjects/ | ||
41 | chmod ugo+x /usr/local/apple/Library/WebObjects/JavaApplications/wotaskd.woa/wotaskd | ||
42 | chmod ugo+x /usr/local/apple/Library/WebObjects/JavaApplications/JavaMonitor.woa/JavaMonitor | ||
43 | chgrp www /usr/local/apple/Local/Library/WebObjects/Configuration/ | ||
44 | chgrp g+w /usr/local/apple/Local/Library/WebObjects/Configuration/ | ||
45 | |||
46 | {{/code}} | ||
47 | |||
48 | 6. 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. | ||
49 | |||
50 | {{code}} | ||
51 | |||
52 | /usr/local/etc/rc.d/wotaskd start | ||
53 | /usr/local/etc/rc.d/JavaMonitor start | ||
54 | |||
55 | {{/code}} | ||
56 | |||
57 | 7. 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. | ||
58 | |||
59 | {{code}} | ||
60 | |||
61 | git clone https://github.com/projectwonder/wonder.git | ||
62 | |||
63 | {{/code}} | ||
64 | |||
65 | 8. Inside the Project Wonder directory, navigate to the ##Utilities/Adaptors## directory: | ||
66 | |||
67 | {{code}} | ||
68 | |||
69 | cd Utilities/Adaptors | ||
70 | |||
71 | {{/code}} | ||
72 | |||
73 | 9. Edit the ##make.config## file, and set the OS to FreeBSD by changing the following line: | ||
74 | |||
75 | {{code}} | ||
76 | |||
77 | # Set the platform you are building on | ||
78 | ADAPTOR_OS = FreeBSD | ||
79 | |||
80 | {{/code}} | ||
81 | |||
82 | 10. 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. | ||
83 | |||
84 | {{code}} | ||
85 | |||
86 | gmake | ||
87 | |||
88 | {{/code}} | ||
89 | |||
90 | ~11. After successful compilation, enter ##Utilities/Adaptors/Apache2.2## directory and install the module on Apache: | ||
91 | |||
92 | {{code}} | ||
93 | |||
94 | cd Apache2.2 | ||
95 | apxs -i -a -n WebObjects mod_WebObjects.la | ||
96 | |||
97 | {{/code}} | ||
98 | |||
99 | 12. 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.// | ||
100 | |||
101 | 13. 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): | ||
102 | |||
103 | * Change ##None## to ##All## in the ##Allow## line of the following configuration section: | ||
104 | |||
105 | {{code}} | ||
106 | |||
107 | <Directory /> | ||
108 | AllowOverride None | ||
109 | Order deny,allow | ||
110 | Allow from all | ||
111 | </Directory> | ||
112 | |||
113 | {{/code}} | ||
114 | |||
115 | * Comment out the following line and section, if you want to use the default ##/cgi-bin/WebObects## URL for the WebObjects module: | ||
116 | |||
117 | {{code}} | ||
118 | |||
119 | # ScriptAlias /cgi-bin/ "/usr/local/www/apache22/cgi-bin/" | ||
120 | |||
121 | {{/code}} | ||
122 | |||
123 | {{code}} | ||
124 | |||
125 | #<Directory "/usr/local/www/apache22/cgi-bin"> | ||
126 | # AllowOverride None | ||
127 | # Options None | ||
128 | # Order allow,deny | ||
129 | # Allow from all | ||
130 | #</Directory> | ||
131 | |||
132 | {{/code}} | ||
133 | |||
134 | 14. 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: | ||
135 | |||
136 | {{code}} | ||
137 | |||
138 | cp apache.conf /usr/local/etc/apache22/Includes/wo.conf | ||
139 | |||
140 | {{/code}} | ||
141 | |||
142 | 15. Edit the destination file (##/usr/local/etc/apache22/Includes/wo.conf##). You need to make two changes: | ||
143 | |||
144 | * Comment out the LoadModule line, as the module is already loaded by ##httpd.conf##. | ||
145 | * Set ##WebObjectsDocumentRoot## to ##/usr/local/www/apache22/data##: | ||
146 | |||
147 | {{code}} | ||
148 | |||
149 | WebObjectsDocumentRoot /usr/local/www/apache22/data | ||
150 | |||
151 | {{/code}} | ||
152 | |||
153 | 16. Edit ##/etc/rc.conf## again and add the following lines: | ||
154 | |||
155 | {{code}} | ||
156 | |||
157 | apache22_enable="YES" | ||
158 | |||
159 | {{/code}} | ||
160 | |||
161 | 17. Run the following command to launch Apache: | ||
162 | |||
163 | {{code}} | ||
164 | |||
165 | /usr/local/etc/rc.d/apache22 start | ||
166 | |||
167 | {{/code}} | ||
168 | |||
169 | 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. |