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