1 | #!/bin/sh
|
---|
2 |
|
---|
3 | ## Install.sh -- Install Greenstone
|
---|
4 |
|
---|
5 | cmd_cp="cp"
|
---|
6 | cmd_cpr="cp -r"
|
---|
7 | cmd_chmod="chmod"
|
---|
8 | cmd_mkdir="mkdir -p"
|
---|
9 | cmd_ln="ln -s"
|
---|
10 | cmd_mv="mv"
|
---|
11 | cmd_rm="rm -i"
|
---|
12 | cmd_rmr="rm -r"
|
---|
13 |
|
---|
14 | thisdir=`pwd`
|
---|
15 | cd ..
|
---|
16 | cd_dir=`pwd`
|
---|
17 | cd "$thisdir"
|
---|
18 |
|
---|
19 | # script must be run from within cdrom/unix directory
|
---|
20 | if [ ! -f "${thisdir}/Install.sh" ]; then
|
---|
21 | echo "Install.sh must be run from the directory in which it resides"
|
---|
22 | echo "Greenstone was not installed"
|
---|
23 | exit 1
|
---|
24 | fi
|
---|
25 |
|
---|
26 | # check that various important directories are on the cd
|
---|
27 | if [ ! -d "${cd_dir}/gsdl" ]; then
|
---|
28 | echo
|
---|
29 | echo "ERROR: Could not locate ${cd_dir}/gsdl"
|
---|
30 | echo "Greenstone was not installed"
|
---|
31 | exit 1
|
---|
32 | fi
|
---|
33 | if [ ! -d "${cd_dir}/Unix/bin/linux" ]; then
|
---|
34 | echo
|
---|
35 | echo "ERROR: Could not locate ${cd_dir}/Unix/bin/linux"
|
---|
36 | echo "Greenstone was not installed"
|
---|
37 | exit 1
|
---|
38 | fi
|
---|
39 |
|
---|
40 |
|
---|
41 | # install to /usr/local by default if user is "root", otherwise
|
---|
42 | # default to users home directory
|
---|
43 | gsdlos=`uname | tr A-Z a-z`
|
---|
44 | if [ "$gsdlos" = "linux" ]; then
|
---|
45 | logname=`whoami`
|
---|
46 | else
|
---|
47 | logname=""
|
---|
48 | fi
|
---|
49 | if [ "$logname" = "" ]; then
|
---|
50 | logname=`logname`
|
---|
51 | fi
|
---|
52 | gsdlhome="/home/${logname}"
|
---|
53 | if [ "$logname" = "root" ]; then
|
---|
54 | gsdlhome="/usr/local"
|
---|
55 | fi
|
---|
56 |
|
---|
57 | # get gsdlhome
|
---|
58 | msg="This script will install Greenstone on your system. You may want
|
---|
59 | to skim through the Install.pdf document that resides in the docs
|
---|
60 | directory on this cd-rom before continuing with the installation.
|
---|
61 |
|
---|
62 | Note that when prompted for input, hitting \"enter\" will select
|
---|
63 | the default (given in square brackets [] at the end of each question).
|
---|
64 | If you're unsure which option to select, use the default.
|
---|
65 |
|
---|
66 | Note also that Install.sh prints out information on any commands
|
---|
67 | it runs on your system in the form \"--> Install.sh: [command]\".
|
---|
68 |
|
---|
69 | It is assumed throughout this installation procedure that you
|
---|
70 | have a webserver installed on your system.
|
---|
71 |
|
---|
72 | For later reference the output of this install script will be
|
---|
73 | recorded in a file called INSTALL_RECORD in the directory into
|
---|
74 | which you choose to install Greenstone.
|
---|
75 |
|
---|
76 | Continue? [y]"
|
---|
77 | echo "$msg"
|
---|
78 | printf "%s" "> "
|
---|
79 | read ans
|
---|
80 | log="${log}${msg}
|
---|
81 | > $ans
|
---|
82 | "
|
---|
83 | if [ "$ans" != "" ] && [ "$ans" != "y" ]; then
|
---|
84 | echo "Greenstone was not installed"
|
---|
85 | exit 0
|
---|
86 | fi
|
---|
87 |
|
---|
88 | msg="
|
---|
89 | Which directory should Greenstone be installed to?
|
---|
90 | Make sure that this directory is on a partition with sufficient
|
---|
91 | free disk space for the installation option you intend
|
---|
92 | selecting.
|
---|
93 | "
|
---|
94 | if [ "$gsdlos" = "linux" ]; then
|
---|
95 | msg="${msg}--A standard linux binary installation requires approximately
|
---|
96 | 50Mb of free disk space (not including additional collections).
|
---|
97 | "
|
---|
98 | fi
|
---|
99 | msg="${msg}--Compiling Greenstone from source code requires approximately
|
---|
100 | 155Mb of free disk space (not including additional collections).
|
---|
101 | --Optional Greenstone demonstration collections may require up
|
---|
102 | to 200Mb of free disk space (you'll be told the size of
|
---|
103 | individual collections before you install them)
|
---|
104 | Enter directory to install Greenstone into. A gsdl directory
|
---|
105 | will be created in this directory. [${gsdlhome}]"
|
---|
106 | echo "$msg"
|
---|
107 | printf "%s" "> "
|
---|
108 | read ans
|
---|
109 | log="${log}${msg}
|
---|
110 | > $ans
|
---|
111 | "
|
---|
112 | if [ "$ans" != "" ]; then
|
---|
113 | gsdlhome="$ans"
|
---|
114 | fi
|
---|
115 |
|
---|
116 | if [ ! -d "$gsdlhome" ]; then
|
---|
117 | msg="
|
---|
118 | Warning: The ${gsdlhome} directory does not exist.
|
---|
119 | Create it? [y]"
|
---|
120 | echo "$msg"
|
---|
121 | printf "%s" "> "
|
---|
122 | read ans
|
---|
123 | log="${log}${msg}
|
---|
124 | > $ans
|
---|
125 | "
|
---|
126 | if [ "$ans" = "" ]; then
|
---|
127 | ans="y"
|
---|
128 | fi
|
---|
129 | if [ "$ans" = "y" ]; then
|
---|
130 | msg="--> Install.sh: [$cmd_mkdir \"$gsdlhome\"]"
|
---|
131 | echo "$msg"
|
---|
132 | log="${log}${msg}
|
---|
133 | "
|
---|
134 | $cmd_mkdir "$gsdlhome"
|
---|
135 | if [ ! -d "$gsdlhome" ]; then
|
---|
136 | echo "ERROR: failed to create $gsdlhome directory"
|
---|
137 | echo "Greenstone was not installed"
|
---|
138 | exit 1
|
---|
139 | fi
|
---|
140 | else
|
---|
141 | echo "Greenstone was not installed"
|
---|
142 | exit 0
|
---|
143 | fi
|
---|
144 | fi
|
---|
145 |
|
---|
146 | # from now on $gsdlhome includes the "/gsdl"
|
---|
147 | gsdlhome="${gsdlhome}/gsdl"
|
---|
148 | msg="--> Install.sh: [$cmd_mkdir \"${gsdlhome}\"]"
|
---|
149 | echo "$msg"
|
---|
150 | log="${log}${msg}
|
---|
151 | "
|
---|
152 | $cmd_mkdir "$gsdlhome"
|
---|
153 | if [ ! -d "$gsdlhome" ]; then
|
---|
154 | echo "ERROR: failed to create $gsdlhome directory"
|
---|
155 | echo "Greenstone was not installed"
|
---|
156 | exit 1
|
---|
157 | fi
|
---|
158 | # set permissions on gsdlhome directory
|
---|
159 | msg="--> Install.sh: [$cmd_chmod u+rwx \"${gsdlhome}\"]"
|
---|
160 | echo "$msg"
|
---|
161 | log="${log}${msg}
|
---|
162 | "
|
---|
163 | $cmd_chmod u+rwx "$gsdlhome"
|
---|
164 |
|
---|
165 | # create initial Uninstall.sh
|
---|
166 | cd "$gsdlhome"
|
---|
167 | echo "#!/bin/sh" > Uninstall.sh
|
---|
168 | echo "" >> Uninstall.sh
|
---|
169 | echo "echo \"remove ${gsdlhome} directory? [y]\"" >> Uninstall.sh
|
---|
170 | echo "read ans" >> Uninstall.sh
|
---|
171 | echo "if [ \"\$ans\" = \"\" ] || [ \"\$ans\" = \"y\" ]; then" >> Uninstall.sh
|
---|
172 | echo " $cmd_rmr \"$gsdlhome\"" >> Uninstall.sh
|
---|
173 | echo "fi" >> Uninstall.sh
|
---|
174 | $cmd_chmod u+x Uninstall.sh
|
---|
175 | cd "$thisdir"
|
---|
176 |
|
---|
177 | # create initial INSTALL_RECORD
|
---|
178 | echo "$log" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
179 |
|
---|
180 | msg="
|
---|
181 | If this installation fails or is cancelled, run the uninstall
|
---|
182 | script (${gsdlhome}/Uninstall.sh) to clean up the partial
|
---|
183 | installation.
|
---|
184 | Continue? [y]"
|
---|
185 | echo "$msg"
|
---|
186 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
187 | printf "%s" "> "
|
---|
188 | read ans
|
---|
189 | echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
190 | if [ "$ans" != "" ] && [ "$ans" != "y" ]; then
|
---|
191 | msg="Greenstone was not installed"
|
---|
192 | echo "$msg"
|
---|
193 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
194 | exit 0
|
---|
195 | fi
|
---|
196 |
|
---|
197 | msg="
|
---|
198 | Installing Greenstone directory structure to ${gsdlhome}"
|
---|
199 | echo "$msg"
|
---|
200 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
201 |
|
---|
202 | # copy gsdl directory across
|
---|
203 | msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/gsdl/\"* \"$gsdlhome\"]"
|
---|
204 | echo "$msg"
|
---|
205 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
206 | $cmd_cpr "${cd_dir}/gsdl/"* "$gsdlhome"
|
---|
207 |
|
---|
208 | # copy setup shell scripts across too
|
---|
209 | msg="--> Install.sh: [$cmd_cp \"${cd_dir}/src/Unix/setup.\"* \"$gsdlhome\"]"
|
---|
210 | echo "$msg"
|
---|
211 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
212 | $cmd_cp "${cd_dir}/src/Unix/setup."* "$gsdlhome"
|
---|
213 |
|
---|
214 | # make sure we have a tmp directory
|
---|
215 | if [ ! -d "$gsdlhome/tmp" ]; then
|
---|
216 | msg="--> Install.sh: [$cmd_mkdir \"$gsdlhome/tmp\"]"
|
---|
217 | echo "$msg"
|
---|
218 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
219 | $cmd_mkdir "$gsdlhome/tmp"
|
---|
220 | fi
|
---|
221 |
|
---|
222 | # make collect directory writable so we can install collections
|
---|
223 | msg="--> Install.sh: [$cmd_chmod u+rwx \"$gsdlhome/collect\"]"
|
---|
224 | echo "$msg"
|
---|
225 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
226 | $cmd_chmod u+rwx "$gsdlhome/collect"
|
---|
227 |
|
---|
228 | # which collections do we want
|
---|
229 | cd "${cd_dir}/collect"
|
---|
230 |
|
---|
231 | msg="
|
---|
232 | The Greenstone demonstration collection has been installed. Would you
|
---|
233 | like to install any other collections from the installation cd-rom? [y]"
|
---|
234 | echo "$msg"
|
---|
235 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
236 | printf "%s" "> "
|
---|
237 | read ans
|
---|
238 | echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
239 | if [ "$ans" = "" ] || [ "$ans" = "y" ]; then
|
---|
240 |
|
---|
241 | msg="
|
---|
242 | Install the greenstone archive (gsarch) - 1Mb? [y]"
|
---|
243 | echo "$msg"
|
---|
244 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
245 | printf "%s" "> "
|
---|
246 | read ans
|
---|
247 | echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
248 | if [ "$ans" = "" ] || [ "$ans" = "y" ]; then
|
---|
249 | msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/gsarch\" \"${gsdlhome}/collect\"]"
|
---|
250 | echo "$msg"
|
---|
251 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
252 | $cmd_cpr "${cd_dir}/collect/gsarch" "${gsdlhome}/collect"
|
---|
253 | fi
|
---|
254 |
|
---|
255 | msg="
|
---|
256 | Install the MSWord and PDF demonstration collection (wordpdf) - 3Mb? [y]"
|
---|
257 | echo "$msg"
|
---|
258 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
259 | printf "%s" "> "
|
---|
260 | read ans
|
---|
261 | echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
262 | if [ "$ans" = "" ] || [ "$ans" = "y" ]; then
|
---|
263 | msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/wordpdf\" \"${gsdlhome}/collect\"]"
|
---|
264 | echo "$msg"
|
---|
265 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
266 | $cmd_cpr "${cd_dir}/collect/wordpdf" "${gsdlhome}/collect"
|
---|
267 | fi
|
---|
268 |
|
---|
269 | msg="
|
---|
270 | Install the Chinese demonstration collection (chinese) - 1Mb? [y]"
|
---|
271 | echo "$msg"
|
---|
272 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
273 | printf "%s" "> "
|
---|
274 | read ans
|
---|
275 | echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
276 | if [ "$ans" = "" ] || [ "$ans" = "y" ]; then
|
---|
277 | msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/chinese\" \"${gsdlhome}/collect\"]"
|
---|
278 | echo "$msg"
|
---|
279 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
280 | $cmd_cpr "${cd_dir}/collect/chinese" "${gsdlhome}/collect"
|
---|
281 | fi
|
---|
282 |
|
---|
283 | msg="
|
---|
284 | Install the food and nutrition library (fnl) - 175 Mb? [y]"
|
---|
285 | echo "$msg"
|
---|
286 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
287 | printf "%s" "> "
|
---|
288 | read ans
|
---|
289 | echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
290 | if [ "$ans" = "" ] || [ "$ans" = "y" ]; then
|
---|
291 | msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/fnl\" \"${gsdlhome}/collect\"]"
|
---|
292 | echo "$msg"
|
---|
293 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
294 | $cmd_cpr "${cd_dir}/collect/fnl" "${gsdlhome}/collect"
|
---|
295 | fi
|
---|
296 |
|
---|
297 | msg="
|
---|
298 | Install the language extraction demonstration collection (folktale) - 2Mb? [y]"
|
---|
299 | echo "$msg"
|
---|
300 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
301 | printf "%s" "> "
|
---|
302 | read ans
|
---|
303 | echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
304 | if [ "$ans" = "" ] || [ "$ans" = "y" ]; then
|
---|
305 | msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/folktale\" \"${gsdlhome}/collect\"]"
|
---|
306 | echo "$msg"
|
---|
307 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
308 | $cmd_cpr "${cd_dir}/collect/folktale" "${gsdlhome}/collect"
|
---|
309 | fi
|
---|
310 | fi
|
---|
311 |
|
---|
312 | # set permissions
|
---|
313 | msg="
|
---|
314 | Setting permissions ...
|
---|
315 | --> Install.sh: [$cmd_chmod -R u+rw \"$gsdlhome\"]"
|
---|
316 | echo "$msg"
|
---|
317 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
318 | $cmd_chmod -R u+rw "$gsdlhome"
|
---|
319 | # gsdl/etc needs to be globally writable
|
---|
320 | msg="--> Install.sh: [$cmd_chmod -R a+w \"$gsdlhome/etc\"]"
|
---|
321 | echo "$msg"
|
---|
322 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
323 | $cmd_chmod -R a+w "$gsdlhome/etc"
|
---|
324 |
|
---|
325 | # should gsdl/collect and gsdl/tmp be globally writable?
|
---|
326 | msg="
|
---|
327 | In order for end-user collection building to be enabled the
|
---|
328 | Greenstone cgi program must be able to write to the
|
---|
329 | ${gsdlhome}/collect and ${gsdlhome}/tmp directories.
|
---|
330 | On most systems this means they must be globally writable.
|
---|
331 | Make these directories globally writable? [y]"
|
---|
332 | echo "$msg"
|
---|
333 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
334 | printf "%s" "> "
|
---|
335 | read ans
|
---|
336 | echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
337 | if [ "$ans" = "" ] || [ "$ans" = "y" ]; then
|
---|
338 | msg="--> Install.sh: [$cmd_chmod -R a+w \"$gsdlhome/collect\"]"
|
---|
339 | echo "$msg"
|
---|
340 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
341 | $cmd_chmod -R a+w "$gsdlhome/collect"
|
---|
342 | msg="--> Install.sh: [$cmd_chmod -R a+w \"$gsdlhome/tmp\"]"
|
---|
343 | echo "$msg"
|
---|
344 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
345 | $cmd_chmod -R a+w "$gsdlhome/tmp"
|
---|
346 | fi
|
---|
347 |
|
---|
348 | # binaries or source code?
|
---|
349 | compile="yes"
|
---|
350 | if [ "$gsdlos" = "linux" ]; then
|
---|
351 | msg="
|
---|
352 | You may either install pre-compiled, statically linked linux [b]inaries
|
---|
353 | or install and [c]ompile the Greenstone source code"
|
---|
354 | echo "$msg"
|
---|
355 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
356 |
|
---|
357 | found=no
|
---|
358 | while [ "$found" = "no" ]; do
|
---|
359 | msg="Enter \"[b]\" or \"c\""
|
---|
360 | echo "$msg"
|
---|
361 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
362 | printf "%s" "> "
|
---|
363 | read ans
|
---|
364 | echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
365 | if [ "$ans" = "" ] || [ "$ans" = "b" ]; then
|
---|
366 | compile="no"
|
---|
367 | # install binaries
|
---|
368 | msg="
|
---|
369 | Installing linux binaries
|
---|
370 | --> Install.sh: [$cmd_cpr \"${cd_dir}/Unix/bin/linux\" \"${gsdlhome}/bin\" ]"
|
---|
371 | echo "$msg"
|
---|
372 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
373 | $cmd_cpr "${cd_dir}/Unix/bin/linux" "${gsdlhome}/bin"
|
---|
374 | msg="--> Install.sh: [$cmd_chmod a+x \"${gsdlhome}/bin/linux/\"*]"
|
---|
375 | echo "$msg"
|
---|
376 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
377 | $cmd_chmod a+x "${gsdlhome}/bin/linux/"*
|
---|
378 | msg="--> Install.sh: [$cmd_chmod -R u+rw \"${gsdlhome}/bin/linux\"]"
|
---|
379 | echo "$msg"
|
---|
380 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
381 | $cmd_chmod -R u+rw "${gsdlhome}/bin/linux"
|
---|
382 |
|
---|
383 | # move library executable to cgi-bin
|
---|
384 | msg="--> Install.sh: [$cmd_mv \"${gsdlhome}/bin/linux/library\" \"${gsdlhome}/cgi-bin\"]"
|
---|
385 | echo "$msg"
|
---|
386 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
387 | $cmd_mv "${gsdlhome}/bin/linux/library" "${gsdlhome}/cgi-bin"
|
---|
388 |
|
---|
389 | found="yes"
|
---|
390 | elif [ "$ans" = "c" ]; then
|
---|
391 | found="yes"
|
---|
392 | fi
|
---|
393 | done
|
---|
394 | fi
|
---|
395 |
|
---|
396 | if [ "$compile" = "yes" ]; then
|
---|
397 | # install source
|
---|
398 | msg="
|
---|
399 | Installing source code
|
---|
400 | --> Install.sh [$cmd_cpr \"${cd_dir}/src/lib\" \"$gsdlhome\"]"
|
---|
401 | echo "$msg"
|
---|
402 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
403 | $cmd_cpr "${cd_dir}/src/lib" "$gsdlhome"
|
---|
404 | msg="--> Install.sh [$cmd_cpr \"${cd_dir}/src/packages\" \"$gsdlhome\"]"
|
---|
405 | echo "$msg"
|
---|
406 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
407 | $cmd_cpr "${cd_dir}/src/packages" "$gsdlhome"
|
---|
408 | msg="--> Install.sh [$cmd_cpr \"${cd_dir}/src/src\" \"$gsdlhome\"]"
|
---|
409 | echo "$msg"
|
---|
410 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
411 | $cmd_cpr "${cd_dir}/src/src" "$gsdlhome"
|
---|
412 | msg="--> Install.sh [$cmd_cpr \"${cd_dir}/src/Unix/\"* \"$gsdlhome\"]"
|
---|
413 | echo "$msg"
|
---|
414 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
415 | $cmd_cpr "${cd_dir}/src/Unix/"* "$gsdlhome"
|
---|
416 | msg="--> Install.sh [$cmd_cp \"${cd_dir}/src/Install.txt\" \"$gsdlhome\"]"
|
---|
417 | echo "$msg"
|
---|
418 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
419 | $cmd_cp "${cd_dir}/src/Install.txt" "$gsdlhome"
|
---|
420 | msg="--> Install.sh: [$cmd_chmod -R u+rw \"$gsdlhome\"]"
|
---|
421 | echo "$msg"
|
---|
422 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
423 | $cmd_chmod -R u+rw "$gsdlhome"
|
---|
424 | msg="--> Install.sh: [$cmd_chmod a+x \"${gsdlhome}/configure\"]"
|
---|
425 | echo "$msg"
|
---|
426 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
427 | $cmd_chmod a+x "${gsdlhome}/configure"
|
---|
428 | msg="--> Install.sh: [$cmd_chmod a+x \"${gsdlhome}/packages/yaz/configure\"]"
|
---|
429 | echo "$msg"
|
---|
430 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
431 | $cmd_chmod a+x "${gsdlhome}/packages/yaz/configure"
|
---|
432 |
|
---|
433 | # compile it
|
---|
434 | msg="--> Install.sh: [cd $gsdlhome]"
|
---|
435 | echo "$msg"
|
---|
436 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
437 | cd "$gsdlhome"
|
---|
438 | msg="configuring ...
|
---|
439 |
|
---|
440 | --> Install.sh: [./configure]"
|
---|
441 | echo "$msg"
|
---|
442 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
443 | ./configure
|
---|
444 | msg="compiling ...
|
---|
445 |
|
---|
446 | --> Install.sh: [make]"
|
---|
447 | echo "$msg"
|
---|
448 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
449 | make
|
---|
450 | msg="installing ...
|
---|
451 |
|
---|
452 | --> Install.sh: [make install]"
|
---|
453 | echo "$msg"
|
---|
454 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
455 | make install
|
---|
456 | msg="--> Install.sh: [cd $thisdir]"
|
---|
457 | echo "$msg"
|
---|
458 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
459 | cd "$thisdir"
|
---|
460 |
|
---|
461 | # check that things compiled ok
|
---|
462 | if [ ! -f "${gsdlhome}/cgi-bin/library" ]; then
|
---|
463 | msg="
|
---|
464 | ERROR: Compilation failed
|
---|
465 | Greenstone was not installed successfully
|
---|
466 | Run the uninstall script (${gsdlhome}/Uninstall.sh)
|
---|
467 | to clean up the partial installation."
|
---|
468 | echo "$msg"
|
---|
469 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
470 | exit 1
|
---|
471 | fi
|
---|
472 | fi
|
---|
473 |
|
---|
474 |
|
---|
475 | # try to find out hostname
|
---|
476 | if [ "$gsdlos" = "linux" ]; then
|
---|
477 | hostname=`hostname -f`
|
---|
478 | if [ "$hostname" = "" ]; then
|
---|
479 | hostname=`hostname -i`
|
---|
480 | fi
|
---|
481 | fi
|
---|
482 | if [ "$hostname" = "" ]; then
|
---|
483 | hostname=`hostname`
|
---|
484 | fi
|
---|
485 | if [ "$hostname" = "" ]; then
|
---|
486 | hostname="your-computer-name"
|
---|
487 | fi
|
---|
488 |
|
---|
489 |
|
---|
490 | # get cgi-bin directory
|
---|
491 | msg="
|
---|
492 |
|
---|
493 | Greenstone needs a valid cgi executable directory (normally called
|
---|
494 | cgi-bin on unix systems) from which to run.
|
---|
495 | This may be either:
|
---|
496 | 1. The default Greenstone cgi-bin directory (${gsdlhome}/cgi-bin).
|
---|
497 | If you use the Greenstone default you will need to configure
|
---|
498 | your webserver to treat this directory as a cgi executable
|
---|
499 | directory. For the Apache webserver you use the ScriptAlias
|
---|
500 | directive to do this (details of how to configure your webserver
|
---|
501 | will be displayed at the end of this installation procedure)."
|
---|
502 | echo "$msg"
|
---|
503 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
504 | if [ "$logname" != "root" ]; then
|
---|
505 | msg=" Note that you will probably need help from your system
|
---|
506 | administrator to reconfigure your webserver."
|
---|
507 | echo "$msg"
|
---|
508 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
509 | fi
|
---|
510 | msg=" 2. An existing cgi-bin directory. Normally a cgi-bin directory
|
---|
511 | is created when your webserver is installed. Typically, this
|
---|
512 | might be /home/httpd/cgi-bin, or /usr/local/apache/cgi-bin, or
|
---|
513 | /var/lib/apache/cgi-bin."
|
---|
514 | echo "$msg"
|
---|
515 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
516 | if [ "$logname" != "root" ]; then
|
---|
517 | msg=" Many systems also allow individual users to have their own
|
---|
518 | cgi-bin in /home/username/public_html/cgi-bin."
|
---|
519 | echo "$msg"
|
---|
520 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
521 | fi
|
---|
522 | found=no
|
---|
523 | remind_cgi="no"
|
---|
524 | remind_cgi_nomove="no"
|
---|
525 | while [ "$found" = "no" ]; do
|
---|
526 | msg="Enter \"[1]\" or \"2\""
|
---|
527 | echo "$msg"
|
---|
528 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
529 | printf "%s" "> "
|
---|
530 | read ans
|
---|
531 | echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
532 | if [ "$ans" = "" ] || [ "$ans" = "1" ]; then
|
---|
533 | found="option1"
|
---|
534 | cgi_bin="${gsdlhome}/cgi-bin"
|
---|
535 | # default gsdl cgi-bin, do nothing
|
---|
536 | msg="
|
---|
537 | Don't forget to configure your webserver to treat $cgi_bin
|
---|
538 | as a cgi executable directory. Don't worry, you'll be
|
---|
539 | reminded of this again at the end of the installation
|
---|
540 | procedure"
|
---|
541 | echo "$msg"
|
---|
542 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
543 | remind_cgi="yes"
|
---|
544 | elif [ "$ans" = "2" ]; then
|
---|
545 | found="option2"
|
---|
546 | # external cgi-bin
|
---|
547 | msg="
|
---|
548 | Enter existing cgi executable directory [/usr/local/apache/cgi-bin]"
|
---|
549 | echo "$msg"
|
---|
550 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
551 | printf "%s" "> "
|
---|
552 | read ans
|
---|
553 | echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
554 | if [ "$ans" = "" ]; then
|
---|
555 | cgi_bin="/usr/local/apache/cgi-bin"
|
---|
556 | else
|
---|
557 | cgi_bin="$ans"
|
---|
558 | fi
|
---|
559 | if [ ! -d "$cgi_bin" ]; then
|
---|
560 | msg="Warning: The ${cgi_bin} directory does not exist.
|
---|
561 | Create it? [y]"
|
---|
562 | echo "$msg"
|
---|
563 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
564 | printf "%s" "> "
|
---|
565 | read ans
|
---|
566 | echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
567 | if [ "$ans" = "" ] || [ "$ans" = "y" ]; then
|
---|
568 | msg="--> Install.sh: [$cmd_mkdir \"$cgi_bin\"]"
|
---|
569 | echo "$msg"
|
---|
570 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
571 | $cmd_mkdir "$cgi_bin"
|
---|
572 | if [ -d "$cgi_bin" ]; then
|
---|
573 | msg="Don't forget to configure your webserver to treat $cgi_bin
|
---|
574 | as a cgi executable directory. Don't worry, you'll be
|
---|
575 | reminded of this again at the end of the installation
|
---|
576 | procedure"
|
---|
577 | echo "$msg"
|
---|
578 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
579 | remind_cgi="yes"
|
---|
580 | else
|
---|
581 | msg="ERROR: failed to create $cgi_bin directory
|
---|
582 | Greenstone installation failed.
|
---|
583 | Run the uninstall script (${gsdlhome}/Uninstall.sh)
|
---|
584 | to clean up the partial installation."
|
---|
585 | echo "$msg"
|
---|
586 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
587 | exit 1
|
---|
588 | fi
|
---|
589 | fi
|
---|
590 | fi
|
---|
591 |
|
---|
592 | if [ ! -w "$cgi_bin" ]; then
|
---|
593 | msg="
|
---|
594 | Unable to write to $cgi_bin directory. You will need
|
---|
595 | to copy the contents of ${gsdlhome}/cgi-bin
|
---|
596 | to $cgi_bin after this installation is completed.
|
---|
597 | You'll be reminded of this again at the end of the
|
---|
598 | installation procedure."
|
---|
599 | echo "$msg"
|
---|
600 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
601 | remind_cgi_nomove="yes"
|
---|
602 | else
|
---|
603 | # install cgi-bin stuff (update the uninstall script first)
|
---|
604 | cd "$gsdlhome"
|
---|
605 | echo "#!/bin/sh" > Uninstall.sh
|
---|
606 | echo "" >> Uninstall.sh
|
---|
607 | echo "$cmd_rm \"${cgi_bin}/gsdlsite.cfg\"" >> Uninstall.sh
|
---|
608 | echo "$cmd_rm \"${cgi_bin}/library\"" >> Uninstall.sh
|
---|
609 | echo "echo \"remove ${gsdlhome} directory? [y]\"" >> Uninstall.sh
|
---|
610 | echo "read ans" >> Uninstall.sh
|
---|
611 | echo "if [ \"\$ans\" = \"\" ] || [ \"\$ans\" = \"y\" ]; then" >> Uninstall.sh
|
---|
612 | echo " $cmd_rmr \"$gsdlhome\"" >> Uninstall.sh
|
---|
613 | echo "fi" >> Uninstall.sh
|
---|
614 | $cmd_chmod u+x Uninstall.sh
|
---|
615 | cd "$thisdir"
|
---|
616 |
|
---|
617 | msg="
|
---|
618 | Installing Greenstone cgi programs in $cgi_bin
|
---|
619 | --> Install.sh: [$cmd_mv \"${gsdlhome}/cgi-bin/gsdlsite.cfg\" \"$cgi_bin\"]"
|
---|
620 | echo "$msg"
|
---|
621 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
622 | $cmd_mv "${gsdlhome}/cgi-bin/gsdlsite.cfg" "$cgi_bin"
|
---|
623 | msg="--> Install.sh: [$cmd_mv \"${gsdlhome}/cgi-bin/library\" \"$cgi_bin\"]"
|
---|
624 | echo "$msg"
|
---|
625 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
626 | $cmd_mv "${gsdlhome}/cgi-bin/library" "$cgi_bin"
|
---|
627 | fi
|
---|
628 | fi
|
---|
629 | done
|
---|
630 |
|
---|
631 | # web address of cgi-bin
|
---|
632 | web_cgi="http://${hostname}/cgi-bin"
|
---|
633 | if [ "$found" = "option1" ]; then
|
---|
634 | web_cgi="http://${hostname}/gsdl/cgi-bin"
|
---|
635 | fi
|
---|
636 | msg="
|
---|
637 | Please enter the web address of the $cgi_bin
|
---|
638 | directory. Typically this might be http://localhost/cgi-bin,
|
---|
639 | or http://127.0.0.1/cgi-bin, or http://your-computer-name/cgi-bin,
|
---|
640 | or http://nnn.nnn.nnn.nn/cgi-bin. [$web_cgi]"
|
---|
641 | echo "$msg"
|
---|
642 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
643 | printf "%s" "> "
|
---|
644 | read ans
|
---|
645 | echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
646 | if [ "$ans" != "" ]; then
|
---|
647 | web_cgi="$ans"
|
---|
648 | fi
|
---|
649 |
|
---|
650 | # get public_html directory
|
---|
651 | msg="
|
---|
652 |
|
---|
653 | In order for Greenstone to run, the $gsdlhome
|
---|
654 | directory and all it contains must be accessible from the web.
|
---|
655 | To make this happen you may either:
|
---|
656 | 1. Configure your webserver so that $gsdlhome
|
---|
657 | is itself accessible from the web."
|
---|
658 | echo "$msg"
|
---|
659 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
660 | if [ "$logname" != "root" ]; then
|
---|
661 | msg=" Note that you will probably need help from your system
|
---|
662 | administrator to reconfigure your webserver."
|
---|
663 | echo "$msg"
|
---|
664 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
665 | fi
|
---|
666 | msg=" 2. Provide an existing web accessible directory from which
|
---|
667 | a symbolic link (ln -s) will be made to $gsdlhome.
|
---|
668 | When your server was installed a web accessible directory
|
---|
669 | will have been created (the Apache webserver uses the
|
---|
670 | DocumentRoot directive to define this directory). Typically
|
---|
671 | this directory might be /home/httpd/html, or /usr/local/apache/htdocs,
|
---|
672 | or /var/lib/apache/htdocs."
|
---|
673 | echo "$msg"
|
---|
674 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
675 | if [ "$logname" != "root" ]; then
|
---|
676 | msg=" Many systems also allow individual users to have their own
|
---|
677 | web accessible directory in /home/username/public_html."
|
---|
678 | echo "$msg"
|
---|
679 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
680 | fi
|
---|
681 | msg=" Note that your web server will need to be configured to allow
|
---|
682 | symbolic links from within this directory. For the Apache
|
---|
683 | server that means this directory must be configured with
|
---|
684 | the SymLinksIfOwnerMatch or FollowSymLinks option (most Apache
|
---|
685 | installations are configured this way by default)."
|
---|
686 | echo "$msg"
|
---|
687 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
688 | found="no"
|
---|
689 | remind_ph="no"
|
---|
690 | remind_ph_nolink="no"
|
---|
691 | while [ "$found" = "no" ]; do
|
---|
692 | msg="Enter \"[1]\" or \"2\""
|
---|
693 | echo "$msg"
|
---|
694 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
695 | printf "%s" "> "
|
---|
696 | read ans
|
---|
697 | echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
698 | if [ "$ans" = "" ] || [ "$ans" = "1" ]; then
|
---|
699 | found="yes"
|
---|
700 | public_html="$gsdlhome"
|
---|
701 | # no link
|
---|
702 | msg="
|
---|
703 | Don't forget to configure your webserver to make $gsdlhome
|
---|
704 | accessible from the web. You'll be reminded of this again
|
---|
705 | at the end of this installation procedure."
|
---|
706 | echo "$msg"
|
---|
707 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
708 | remind_ph="yes"
|
---|
709 | elif [ "$ans" = "2" ]; then
|
---|
710 | found="yes"
|
---|
711 | # external public_html
|
---|
712 | echo
|
---|
713 | public_html="/home/${logname}/public_html"
|
---|
714 | if [ "$logname" = "root" ]; then
|
---|
715 | public_html="/usr/local/apache/htdocs"
|
---|
716 | fi
|
---|
717 | msg="Enter directory that is also accessible from the web [${public_html}]"
|
---|
718 | echo "$msg"
|
---|
719 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
720 | printf "%s" "> "
|
---|
721 | read ans
|
---|
722 | echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
723 | if [ "$ans" != "" ]; then
|
---|
724 | public_html="$ans"
|
---|
725 | fi
|
---|
726 | # create link to gsdl (and update Uninstall.sh)
|
---|
727 | if [ -w "$public_html" ]; then
|
---|
728 | cd "$gsdlhome"
|
---|
729 | echo "#!/bin/sh" > Uninstall.sh
|
---|
730 | echo "" >> Uninstall.sh
|
---|
731 | echo "$cmd_rm \"$public_html/gsdl\"" >> Uninstall.sh
|
---|
732 | echo "$cmd_rm \"${cgi_bin}/gsdlsite.cfg\"" >> Uninstall.sh
|
---|
733 | echo "$cmd_rm \"${cgi_bin}/library\"" >> Uninstall.sh
|
---|
734 | echo "echo \"remove ${gsdlhome} directory? [y]\"" >> Uninstall.sh
|
---|
735 | echo "read ans" >> Uninstall.sh
|
---|
736 | echo "if [ \"\$ans\" = \"\" ] || [ \"\$ans\" = \"y\" ]; then" >> Uninstall.sh
|
---|
737 | echo " $cmd_rmr \"$gsdlhome\"" >> Uninstall.sh
|
---|
738 | echo "fi" >> Uninstall.sh
|
---|
739 | $cmd_chmod u+x Uninstall.sh
|
---|
740 | cd "$thisdir"
|
---|
741 |
|
---|
742 | msg="--> Install.sh: [cd \"$public_html\"]"
|
---|
743 | echo "$msg"
|
---|
744 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
745 | cd "$public_html"
|
---|
746 | msg="--> Install.sh: [$cmd_ln \"$gsdlhome\" gsdl]"
|
---|
747 | echo "$msg"
|
---|
748 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
749 | $cmd_ln "$gsdlhome" gsdl
|
---|
750 | msg="--> Install.sh: [cd \"$thisdir\"]"
|
---|
751 | echo "$msg"
|
---|
752 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
753 | cd "$thisdir"
|
---|
754 | else
|
---|
755 | msg="
|
---|
756 | Unable to write to $public_html directory. You will need
|
---|
757 | to create a link called gsdl from $public_html to
|
---|
758 | $gsdlhome after this installation is completed. You'll be
|
---|
759 | reminded of this again at the end of the installation
|
---|
760 | procedure."
|
---|
761 | echo "$msg"
|
---|
762 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
763 | old_ph=$public_html
|
---|
764 | remind_ph_nolink="yes"
|
---|
765 | fi
|
---|
766 | public_html="${public_html}/gsdl"
|
---|
767 | fi
|
---|
768 | done
|
---|
769 |
|
---|
770 |
|
---|
771 | # get httpprefix
|
---|
772 | msg="
|
---|
773 | Enter the web address of the $public_html directory.
|
---|
774 | This may be a relative url (e.g. \"/gsdl\") or a
|
---|
775 | complete url (e.g. \"http://${hostname}/gsdl\") [/gsdl]"
|
---|
776 | echo "$msg"
|
---|
777 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
778 | printf "%s" ">"
|
---|
779 | httpprefix="/gsdl"
|
---|
780 | read ans
|
---|
781 | echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
782 | if [ "$ans" != "" ]; then
|
---|
783 | httpprefix="$ans"
|
---|
784 | fi
|
---|
785 |
|
---|
786 | # get initial password
|
---|
787 | msg="
|
---|
788 | In order to use end-user collection building or to access certain
|
---|
789 | parts of the administration pages you must have a password.
|
---|
790 | A user with the username \"admin\" will be created for you with
|
---|
791 | the password you provide (i.e. to enter any pages requiring user
|
---|
792 | authentication enter the \"admin\" username and the password you
|
---|
793 | set here).\n";
|
---|
794 | echo "$msg"
|
---|
795 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
796 | pw=`${gsdlhome}/bin/${gsdlos}/getpw`
|
---|
797 | tmp="[admin]
|
---|
798 | <comment>
|
---|
799 | <enabled>true
|
---|
800 | <groups>administrator,colbuilder
|
---|
801 | <password>${pw}
|
---|
802 | <username>admin
|
---|
803 | ----------------------------------------------------------------------"
|
---|
804 | echo "$tmp" | ${gsdlhome}/bin/${gsdlos}/txt2db "${gsdlhome}/etc/users.db"
|
---|
805 | $cmd_chmod a+rw "${gsdlhome}/etc/users.db"
|
---|
806 |
|
---|
807 | # edit gsdlsite.cfg
|
---|
808 | cd "$cgi_bin"
|
---|
809 | sed "s|\(gsdlhome *\)[^ ]*|\1${gsdlhome}|" gsdlsite.cfg > tmp123.txt && $cmd_mv tmp123.txt gsdlsite.cfg
|
---|
810 | sed "s|#*\(httpprefix *\)[^ ]*|\1${httpprefix}|" gsdlsite.cfg > tmp123.txt && $cmd_mv tmp123.txt gsdlsite.cfg
|
---|
811 | sed "s|\(httpimg *\)[^ ]*|\1${httpprefix}/images|" gsdlsite.cfg > tmp123.txt && $cmd_mv tmp123.txt gsdlsite.cfg
|
---|
812 |
|
---|
813 | msg="
|
---|
814 |
|
---|
815 | Greenstone installation completed successfully."
|
---|
816 | echo "$msg"
|
---|
817 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
818 | if [ "$remind_cgi" = "yes" ]; then
|
---|
819 | msg=" * Don't forget to configure your webserver to treat
|
---|
820 | $cgi_bin as a cgi executable directory."
|
---|
821 | echo "$msg"
|
---|
822 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
823 |
|
---|
824 | apache_web_cgi=`echo "$web_cgi" | sed "s|[^/]*//[^/]*||" | sed "s|/*$|/|"`
|
---|
825 | cgi_bin_slash=`echo "$cgi_bin" | sed "s|/*$|/|"`
|
---|
826 | cgi_bin_noslash=`echo "$cgi_bin" | sed "s|/*$||"`
|
---|
827 |
|
---|
828 | msg=" For the Apache webserver this means adding the following
|
---|
829 | ScriptAlias directive to your httpd.conf configuration file.
|
---|
830 |
|
---|
831 | ScriptAlias ${apache_web_cgi} \"${cgi_bin_slash}\"
|
---|
832 | <Directory \"${cgi_bin_noslash}\">
|
---|
833 | AllowOverride None
|
---|
834 | Options None
|
---|
835 | Order allow,deny
|
---|
836 | Allow from all
|
---|
837 | </Directory>
|
---|
838 | "
|
---|
839 | echo "$msg"
|
---|
840 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
841 | fi
|
---|
842 | if [ "$remind_cgi_nomove" = "yes" ]; then
|
---|
843 | msg=" * Don't forget to move the contents of ${gsdlhome}/cgi-bin
|
---|
844 | to $cgi_bin
|
---|
845 | "
|
---|
846 | echo "$msg"
|
---|
847 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
848 | fi
|
---|
849 | if [ "$remind_ph" = "yes" ]; then
|
---|
850 | msg=" * Don't forget to configure your webserver to treat
|
---|
851 | $gsdlhome as a web accessible directory."
|
---|
852 | echo "$msg"
|
---|
853 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
854 |
|
---|
855 | apache_httpprefix=`echo "$httpprefix" | sed "s|[^/]*//[^/]*||" | sed "s|/*$|/|"`
|
---|
856 | public_html_slash=`echo "$public_html" | sed "s|/*$|/|"`
|
---|
857 | public_html_noslash=`echo "$public_html" | sed "s|/*$||"`
|
---|
858 |
|
---|
859 | msg=" For the Apache webserver this means adding the following
|
---|
860 | Alias directive to your httpd.conf configuration file.
|
---|
861 |
|
---|
862 | Alias ${apache_httpprefix} \"${public_html_slash}\"
|
---|
863 | <Directory \"${public_html_noslash}\">
|
---|
864 | Options Indexes MultiViews FollowSymLinks
|
---|
865 | AllowOverride None
|
---|
866 | Order allow,deny
|
---|
867 | Allow from all
|
---|
868 | </Directory>
|
---|
869 | "
|
---|
870 | echo "$msg"
|
---|
871 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
872 | fi
|
---|
873 | if [ "$remind_ph_nolink" = "yes" ]; then
|
---|
874 | msg=" * Don't forget to create a link called gsdl from $old_ph
|
---|
875 | to ${gsdlhome}.
|
---|
876 | "
|
---|
877 | echo "$msg"
|
---|
878 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
879 | fi
|
---|
880 | msg="The output of this script has been recorded for you at
|
---|
881 | ${gsdlhome}/INSTALL_RECORD.
|
---|
882 | You may remove Greenstone from your system at any time by running
|
---|
883 | the ${gsdlhome}/Uninstall.sh script.
|
---|
884 | Access Greenstone by pointing a web browser at
|
---|
885 | ${web_cgi}/library
|
---|
886 | "
|
---|
887 | echo "$msg"
|
---|
888 | echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
|
---|
889 |
|
---|
890 | exit 0
|
---|