source: main/tags/2.30b/gsdl/Install.sh@ 32727

Last change on this file since 32727 was 1824, checked in by sjboddie, 23 years ago

* empty log message *

  • Property svn:executable set to *
  • Property svn:mime-type set to application/octet-stream
File size: 20.5 KB
Line 
1#!/bin/sh
2
3## Install.sh -- Install Greenstone
4
5cmd_cp="cp"
6cmd_cpr="cp -r"
7cmd_chmod="chmod"
8cmd_mkdir="mkdir -p"
9cmd_ln="ln -s"
10cmd_mv="mv"
11cmd_rm="rm -i"
12cmd_rmr="rm -r"
13
14thisdir=`pwd`
15cd ..
16cd_dir=`pwd`
17cd "$thisdir"
18
19# script must be run from within cdrom/unix directory
20if [ ! -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
24fi
25
26# check that various important directories are on the cd
27if [ ! -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
32fi
33if [ ! -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
38fi
39
40
41# install to /usr/local by default if user is "root", otherwise
42# default to users home directory
43gsdlos=`uname | tr A-Z a-z`
44if [ "$gsdlos" = "linux" ]; then
45 logname=`whoami`
46else
47 logname=""
48fi
49if [ "$logname" = "" ]; then
50 logname=`logname`
51fi
52gsdlhome="/home/${logname}"
53if [ "$logname" = "root" ]; then
54 gsdlhome="/usr/local"
55fi
56
57# get gsdlhome
58echo
59echo "This script will install Greenstone on your system. Please read"
60echo "the Install.htm file that resides in the docs directory of this"
61echo "cd-rom before installing."
62echo
63echo "Note that when prompted for input, hitting \"enter\" will select"
64echo "the default (given in square brackets [] at the end of each question)."
65echo
66echo "Note also that Install.sh prints out information on any commands"
67echo "it runs on your system in the form \"--> Install.sh: [command]\"."
68echo
69echo "It is assumed throughout this installation procedure that you"
70echo "have a webserver installed on your system."
71echo
72echo "Continue? [y]"
73printf "%s" "> "
74read ans
75if [ "$ans" != "" ] && [ "$ans" != "y" ]; then
76 echo "Greenstone was not installed"
77 exit 0
78fi
79
80echo
81echo "Enter directory to install Greenstone into. A gsdl directory"
82echo "will be created in this directory. [${gsdlhome}]"
83printf "%s" "> "
84read ans
85if [ "$ans" != "" ]; then
86 gsdlhome="$ans"
87fi
88
89if [ ! -d "$gsdlhome" ]; then
90 echo "Warning: The ${gsdlhome} directory does not exist."
91 echo "Create it? [y]"
92 printf "%s" "> "
93 read ans
94 if [ "$ans" = "" ]; then
95 ans="y"
96 fi
97 if [ "$ans" = "y" ]; then
98 echo "--> Install.sh: [$cmd_mkdir \"$gsdlhome\"]"
99 $cmd_mkdir "$gsdlhome"
100 if [ ! -d "$gsdlhome" ]; then
101 echo "ERROR: failed to create $gsdlhome directory"
102 echo "Greenstone was not installed"
103 exit 1
104 fi
105 else
106 echo "Greenstone was not installed"
107 exit 0
108 fi
109fi;
110
111
112# from now on $gsdlhome includes the "/gsdl"
113gsdlhome="${gsdlhome}/gsdl"
114
115echo "--> Install.sh: [$cmd_mkdir \"${gsdlhome}\"]"
116$cmd_mkdir "$gsdlhome"
117if [ ! -d "$gsdlhome" ]; then
118 echo "ERROR: failed to create $gsdlhome directory"
119 echo "Greenstone was not installed"
120 exit 1
121fi
122# set permissions on gsdlhome directory (not that we should need to)
123echo "--> Install.sh: [$cmd_chmod u+rwx \"${gsdlhome}\"]"
124$cmd_chmod u+rwx "$gsdlhome"
125
126
127# create initial uninstall.sh
128cd "$gsdlhome"
129echo "#!/bin/sh" > uninstall.sh
130echo "" >> uninstall.sh
131echo "echo \"remove ${gsdlhome} directory? [y]\"" >> uninstall.sh
132echo "read ans" >> uninstall.sh
133echo "if [ \"\$ans\" = \"\" ] || [ \"\$ans\" = \"y\" ]; then" >> uninstall.sh
134echo " $cmd_rmr \"$gsdlhome\"" >> uninstall.sh
135echo "fi" >> uninstall.sh
136$cmd_chmod u+x uninstall.sh
137cd "$thisdir"
138
139echo
140echo "If this installation fails or is cancelled, run the uninstall"
141echo "script (${gsdlhome}/uninstall.sh) to clean up the partial"
142echo "installation."
143echo "Continue? [y]"
144printf "%s" "> "
145read ans
146if [ "$ans" != "" ] && [ "$ans" != "y" ]; then
147 echo "Greenstone was not installed"
148 exit 0
149fi
150
151echo
152echo "Installing Greenstone directory structure to ${gsdlhome}"
153# copy gsdl directory across
154echo "--> Install.sh: [$cmd_cpr \"${cd_dir}/gsdl/\"* \"$gsdlhome\"]"
155$cmd_cpr "${cd_dir}/gsdl/"* "$gsdlhome"
156
157# copy setup shell scripts across too
158echo "--> Install.sh: [$cmd_cp \"${cd_dir}/src/Unix/setup.\"* \"$gsdlhome\"]"
159$cmd_cp "${cd_dir}/src/Unix/setup."* "$gsdlhome"
160
161# create the tmp directory
162echo "--> Install.sh: [$cmd_mkdir \"$gsdlhome/tmp\"]"
163$cmd_mkdir "$gsdlhome/tmp"
164
165# make collect directory writable so we can install collections
166echo "--> Install.sh: [$cmd_chmod u+rwx \"$gsdlhome/collect\"]"
167$cmd_chmod u+rwx "$gsdlhome/collect"
168
169# which collections do we want
170cd "${cd_dir}/collect"
171files=*
172first="yes"
173for file in $files
174do
175 if [ "$file" != "*" ] && [ "$file" != "dlpeople" ]; then
176 if [ "$first" = "yes" ]; then
177 echo
178 echo "The Greenstone demonstration collection has been installed. Would you"
179 echo "like to install any other collections from the installation cd-rom? [y]"
180 read ans
181 if [ "$ans" != "" ] && [ "$ans" != "y" ]; then
182 break
183 fi
184 first="no"
185 fi
186
187 echo
188 echo "Install the $file collection? [y]"
189 printf "%s" "> "
190 read ans
191 if [ "$ans" = "" ] || [ "$ans" = "y" ]; then
192 echo "--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/$file\" \"${gsdlhome}/collect\"]"
193 $cmd_cpr "${cd_dir}/collect/$file" "${gsdlhome}/collect"
194 fi
195 fi
196done
197
198# set permissions
199echo
200echo "Setting permissions ..."
201echo "--> Install.sh: [$cmd_chmod -R u+rw \"$gsdlhome\"]"
202$cmd_chmod -R u+rw "$gsdlhome"
203# gsdl/etc needs to be globally writable
204echo "--> Install.sh: [$cmd_chmod -R a+w \"$gsdlhome/etc\"]"
205$cmd_chmod -R a+w "$gsdlhome/etc"
206
207# should gsdl/collect and gsdl/tmp be globally writable?
208echo
209echo "In order for end-user collection building to be enabled the"
210echo "Greenstone cgi program must be able to write to the"
211echo "${gsdlhome}/collect and ${gsdlhome}/tmp directories."
212echo "On most systems this means they must be globally writable."
213echo "Make these directories globally writable? [y]"
214printf "%s" "> "
215read ans
216if [ "$ans" = "" ] || [ "$ans" = "y" ]; then
217 echo "--> Install.sh: [$cmd_chmod -R a+w \"$gsdlhome/collect\"]"
218 $cmd_chmod -R a+w "$gsdlhome/collect"
219 echo "--> Install.sh: [$cmd_chmod -R a+w \"$gsdlhome/tmp\"]"
220 $cmd_chmod -R a+w "$gsdlhome/tmp"
221fi
222
223# binaries or source code?
224compile="yes"
225if [ "$gsdlos" = "linux" ]; then
226 echo
227 echo "You may either install pre-compiled, statically linked linux [b]inaries"
228 echo "or install and [c]ompile the Greenstone source code"
229
230 found=no
231 while [ "$found" = "no" ]; do
232 echo "Enter \"[b]\" or \"c\""
233 printf "%s" "> "
234 read ans
235 if [ "$ans" = "" ] || [ "$ans" = "b" ]; then
236 compile="no"
237 # install binaries
238 echo
239 echo "Installing linux binaries"
240 echo "--> Install.sh: [$cmd_cpr \"${cd_dir}/Unix/bin/linux\" \"${gsdlhome}/bin\" ]"
241 $cmd_cpr "${cd_dir}/Unix/bin/linux" "${gsdlhome}/bin"
242 echo "--> Install.sh: [$cmd_chmod a+x \"${gsdlhome}/bin/linux/\"*]"
243 $cmd_chmod a+x "${gsdlhome}/bin/linux/"*
244 echo "--> Install.sh: [$cmd_chmod -R u+rw \"${gsdlhome}/bin/linux\"]"
245 $cmd_chmod -R u+rw "${gsdlhome}/bin/linux"
246
247 # move library executable to cgi-bin
248 echo "--> Install.sh: [$cmd_mv \"${gsdlhome}/bin/linux/library\" \"${gsdlhome}/cgi-bin\"]"
249 $cmd_mv "${gsdlhome}/bin/linux/library" "${gsdlhome}/cgi-bin"
250
251 found="yes"
252 elif [ "$ans" = "c" ]; then
253 found="yes"
254 fi
255 done
256fi
257
258if [ "$compile" = "yes" ]; then
259 # install source
260 echo
261 echo "Installing source code"
262 echo "--> Install.sh [$cmd_cpr \"${cd_dir}/src/lib\" \"$gsdlhome\"]"
263 $cmd_cpr "${cd_dir}/src/lib" "$gsdlhome"
264 echo "--> Install.sh [$cmd_cpr \"${cd_dir}/src/packages\" \"$gsdlhome\"]"
265 $cmd_cpr "${cd_dir}/src/packages" "$gsdlhome"
266 echo "--> Install.sh [$cmd_cpr \"${cd_dir}/src/src\" \"$gsdlhome\"]"
267 $cmd_cpr "${cd_dir}/src/src" "$gsdlhome"
268 echo "--> Install.sh [$cmd_cpr \"${cd_dir}/src/Unix/\"* \"$gsdlhome\"]"
269 $cmd_cpr "${cd_dir}/src/Unix/"* "$gsdlhome"
270 echo "--> Install.sh: [$cmd_chmod -R u+rw \"$gsdlhome\"]"
271 $cmd_chmod -R u+rw "$gsdlhome"
272 echo "--> Install.sh: [$cmd_chmod a+x \"${gsdlhome}/configure\"]"
273 $cmd_chmod a+x "${gsdlhome}/configure"
274 echo "--> Install.sh: [$cmd_chmod a+x \"${gsdlhome}/packages/yaz/configure\"]"
275 $cmd_chmod a+x "${gsdlhome}/packages/yaz/configure"
276
277 # compile it
278 echo "--> Install.sh: [cd $gsdlhome]"
279 cd "$gsdlhome"
280 echo "configuring ..."
281 echo
282 echo "--> Install.sh: [./configure]"
283 ./configure
284 echo "compiling ..."
285 echo
286 echo "--> Install.sh: [make]"
287 make
288 echo "installing ..."
289 echo
290 echo "--> Install.sh: [make install]"
291 make install
292 echo "--> Install.sh: [cd $thisdir]"
293 cd "$thisdir"
294
295 # check that things compiled ok
296 if [ ! -f "${gsdlhome}/cgi-bin/library" ]; then
297 echo
298 echo "ERROR: Compilation failed"
299 echo "Greenstone was not installed successfully"
300 echo "Run the uninstall script (${gsdlhome}/uninstall.sh)"
301 echo "to clean up the partial installation."
302 exit 1
303 fi
304fi
305
306
307# try to find out hostname
308if [ "$gsdlos" = "linux" ]; then
309 hostname=`hostname -f`
310 if [ "$hostname" = "" ]; then
311 hostname=`hostname -i`
312 fi
313fi
314if [ "$hostname" = "" ]; then
315 hostname=`hostname`
316fi
317if [ "$hostname" = "" ]; then
318 hostname="your-computer-name"
319fi
320
321
322# get cgi-bin directory
323echo
324echo
325echo "Greenstone needs a valid cgi executable directory (normally called"
326echo "cgi-bin on unix systems) from which to run."
327echo "This may be either:"
328echo " 1. The default Greenstone cgi-bin directory (${gsdlhome}/cgi-bin)."
329echo " If you use the Greenstone default you will need to configure"
330echo " your webserver to treat this directory as a cgi executable"
331echo " directory. For the Apache webserver you use the ScriptAlias"
332echo " directive to do this (details of how to configure your webserver"
333echo " will be displayed at the end of this installation procedure)."
334if [ "$logname" != "root" ]; then
335echo " Note that you will probably need help from your system"
336echo " administrator to reconfigure your webserver."
337fi
338echo " 2. An existing cgi-bin directory. Normally a cgi-bin directory"
339echo " is created when your webserver is installed. Typically, this"
340echo " might be /home/httpd/cgi-bin, or /usr/local/apache/cgi-bin, or"
341echo " /var/lib/apache/cgi-bin."
342if [ "$logname" != "root" ]; then
343 echo " Many systems also allow individual users to have their own"
344 echo " cgi-bin in /home/username/public_html/cgi-bin."
345fi
346found=no
347remind_cgi="no"
348remind_cgi_nomove="no"
349while [ "$found" = "no" ]; do
350 echo "Enter \"[1]\" or \"2\""
351 printf "%s" "> "
352 read ans
353 if [ "$ans" = "" ] || [ "$ans" = "1" ]; then
354 found="option1"
355 cgi_bin="${gsdlhome}/cgi-bin"
356 # default gsdl cgi-bin, do nothing
357 echo
358 echo "Don't forget to configure your webserver to treat $cgi_bin"
359 echo "as a cgi executable directory. Don't worry, you'll be"
360 echo "reminded of this again at the end of the installation"
361 echo "procedure"
362 remind_cgi="yes"
363 elif [ "$ans" = "2" ]; then
364 found="option2"
365 # external cgi-bin
366 echo
367 echo "Enter existing cgi executable directory [/usr/local/apache/cgi-bin]"
368 printf "%s" "> "
369 read ans
370 if [ "$ans" = "" ]; then
371 cgi_bin="/usr/local/apache/cgi-bin"
372 else
373 cgi_bin="$ans"
374 fi
375 if [ ! -d "$cgi_bin" ]; then
376 echo "Warning: The ${cgi_bin} directory does not exist."
377 echo "Create it? [y]"
378 printf "%s" "> "
379 read ans
380 if [ "$ans" = "" ] || [ "$ans" = "y" ]; then
381 echo "--> Install.sh: [$cmd_mkdir \"$cgi_bin\"]"
382 $cmd_mkdir "$cgi_bin"
383 if [ -d "$cgi_bin" ]; then
384 echo "Don't forget to configure your webserver to treat $cgi_bin"
385 echo "as a cgi executable directory. Don't worry, you'll be"
386 echo "reminded of this again at the end of the installation"
387 echo "procedure"
388 remind_cgi="yes"
389 else
390 echo "ERROR: failed to create $cgi_bin directory"
391 echo "Greenstone installation failed."
392 echo "Run the uninstall script (${gsdlhome}/uninstall.sh)"
393 echo "to clean up the partial installation."
394 exit 1
395 fi
396 fi
397 fi
398
399 if [ ! -w "$cgi_bin" ]; then
400 echo
401 echo "Unable to write to $cgi_bin directory. You will need"
402 echo "to copy the contents of ${gsdlhome}/cgi-bin"
403 echo "to $cgi_bin after this installation is completed."
404 echo "You'll be reminded of this again at the end of the"
405 echo "installation procedure."
406 remind_cgi_nomove="yes"
407 else
408 # install cgi-bin stuff (update the uninstall script first)
409 cd "$gsdlhome"
410 echo "#!/bin/sh" > uninstall.sh
411 echo "" >> uninstall.sh
412 echo "$cmd_rm \"${cgi_bin}/gsdlsite.cfg\"" >> uninstall.sh
413 echo "$cmd_rm \"${cgi_bin}/library\"" >> uninstall.sh
414 echo "echo \"remove ${gsdlhome} directory? [y]\"" >> uninstall.sh
415 echo "read ans" >> uninstall.sh
416 echo "if [ \"\$ans\" = \"\" ] || [ \"\$ans\" = \"y\" ]; then" >> uninstall.sh
417 echo " $cmd_rmr \"$gsdlhome\"" >> uninstall.sh
418 echo "fi" >> uninstall.sh
419 $cmd_chmod u+x uninstall.sh
420 cd "$thisdir"
421
422 echo
423 echo "Installing Greenstone cgi programs in $cgi_bin"
424 echo "--> Install.sh: [$cmd_mv \"${gsdlhome}/cgi-bin/gsdlsite.cfg\" \"$cgi_bin\"]"
425 $cmd_mv "${gsdlhome}/cgi-bin/gsdlsite.cfg" "$cgi_bin"
426 echo "--> Install.sh: [$cmd_mv \"${gsdlhome}/cgi-bin/library\" \"$cgi_bin\"]"
427 $cmd_mv "${gsdlhome}/cgi-bin/library" "$cgi_bin"
428 fi
429 fi
430done
431
432# web address of cgi-bin
433web_cgi="http://${hostname}/cgi-bin"
434if [ "$found" = "option1" ]; then
435 web_cgi="http://${hostname}/gsdl/cgi-bin"
436fi
437echo
438echo "Please enter the web address of the $cgi_bin"
439echo "directory. Typically this might be http://localhost/cgi-bin,"
440echo "or http://127.0.0.1/cgi-bin, or http://your-computer-name/cgi-bin,"
441echo "or http://nnn.nnn.nnn.nn/cgi-bin. [$web_cgi]"
442printf "%s" "> "
443read ans
444if [ "$ans" != "" ]; then
445 web_cgi="$ans"
446fi
447
448# get public_html directory
449echo
450echo
451echo "In order for Greenstone to run, the $gsdlhome"
452echo "directory and all it contains must be accessible from the web."
453echo "To make this happen you may either:"
454echo " 1. Configure your webserver so that $gsdlhome"
455echo " is itself accessible from the web."
456if [ "$logname" != "root" ]; then
457echo " Note that you will probably need help from your system"
458echo " administrator to reconfigure your webserver."
459fi
460echo " 2. Provide an existing web accessible directory from which"
461echo " a symbolic link will be made to $gsdlhome."
462echo " When your server was installed a web accessible directory"
463echo " will have been created (the Apache webserver uses the"
464echo " DocumentRoot directive to define this directory). Typically"
465echo " this directory might be /home/httpd/html, or /usr/local/apache/htdocs,"
466echo " or /var/lib/apache/htdocs."
467if [ "$logname" != "root" ]; then
468 echo " Many systems also allow individual users to have their own"
469 echo " web accessible directory in /home/username/public_html."
470fi
471echo " Note that your web server will need to be configured to allow"
472echo " symbolic links from within this directory. For the Apache"
473echo " server that means this directory must be configured with"
474echo " the SymLinksIfOwnerMatch or FollowSymLinks option (most Apache"
475echo " installations are configured this way by default)."
476found="no"
477remind_ph="no"
478remind_ph_nolink="no"
479while [ "$found" = "no" ]; do
480 echo "Enter \"[1]\" or \"2\""
481 printf "%s" "> "
482 read ans
483 if [ "$ans" = "" ] || [ "$ans" = "1" ]; then
484 found="yes"
485 public_html="$gsdlhome"
486 # no link
487 echo
488 echo "Don't forget to configure your webserver to make $gsdlhome"
489 echo "accessible from the web. You'll be reminded of this again"
490 echo "at the end of this installation procedure."
491 remind_ph="yes"
492 elif [ "$ans" = "2" ]; then
493 found="yes"
494 # external public_html
495 echo
496 public_html="/home/${logname}/public_html"
497 if [ "$logname" = "root" ]; then
498 public_html="/usr/local/apache/htdocs"
499 fi
500 echo "Enter directory that is also accessible from the web [${public_html}]"
501 printf "%s" "> "
502 read ans
503 if [ "$ans" != "" ]; then
504 public_html="$ans"
505 fi
506 # create link to gsdl (and update uninstall.sh)
507 if [ -w "$public_html" ]; then
508 cd "$gsdlhome"
509 echo "#!/bin/sh" > uninstall.sh
510 echo "" >> uninstall.sh
511 echo "$cmd_rm \"$public_html/gsdl\"" >> uninstall.sh
512 echo "$cmd_rm \"${cgi_bin}/gsdlsite.cfg\"" >> uninstall.sh
513 echo "$cmd_rm \"${cgi_bin}/library\"" >> uninstall.sh
514 echo "echo \"remove ${gsdlhome} directory? [y]\"" >> uninstall.sh
515 echo "read ans" >> uninstall.sh
516 echo "if [ \"\$ans\" = \"\" ] || [ \"\$ans\" = \"y\" ]; then" >> uninstall.sh
517 echo " $cmd_rmr \"$gsdlhome\"" >> uninstall.sh
518 echo "fi" >> uninstall.sh
519 $cmd_chmod u+x uninstall.sh
520 cd "$thisdir"
521
522 echo "--> Install.sh: [cd \"$public_html\"]"
523 cd "$public_html"
524 echo "--> Install.sh: [$cmd_ln \"$gsdlhome\" gsdl]"
525 $cmd_ln "$gsdlhome" gsdl
526 echo "--> Install.sh: [cd \"$thisdir\"]"
527 cd "$thisdir"
528 else
529 echo
530 echo "Unable to write to $public_html directory. You will need"
531 echo "to create a link called gsdl from $public_html to"
532 echo "$gsdlhome after this installation is completed. You'll be"
533 echo "reminded of this again at the end of the installation"
534 echo "procedure."
535 old_ph=$public_html
536 remind_ph_nolink="yes"
537 fi
538 public_html="${public_html}/gsdl"
539 fi
540done
541
542
543# get httpprefix
544echo
545echo "Enter the web address of the $public_html directory."
546echo "This may be a relative url (e.g. \"/gsdl\") or a"
547echo "complete url (e.g. \"http://${hostname}/gsdl\") [/gsdl]"
548printf "%s" ">"
549httpprefix="/gsdl"
550read ans
551if [ "$ans" != "" ]; then
552 httpprefix="$ans"
553fi
554
555# get initial password
556echo
557echo "In order to use end-user collection building or to access certain"
558echo "parts of the administration pages you must have a password."
559echo "A user with the username \"admin\" will be created for you with"
560echo "the password you provide (i.e. to enter any pages requiring user"
561echo "authentication enter the \"admin\" username and the password you"
562echo "set here).\n";
563pw=`${gsdlhome}/bin/${gsdlos}/getpw`
564tmp="[admin]
565<comment>
566<enabled>true
567<groups>administrator,colbuilder
568<password>${pw}
569<username>admin
570----------------------------------------------------------------------"
571echo "$tmp" | ${gsdlhome}/bin/${gsdlos}/txt2db "${gsdlhome}/etc/users.db"
572
573# edit gsdlsite.cfg
574cd "$cgi_bin"
575sed "s|\(gsdlhome *\)[^ ]*|\1${gsdlhome}|" gsdlsite.cfg > tmp123.txt && $cmd_mv tmp123.txt gsdlsite.cfg
576sed "s|#*\(httpprefix *\)[^ ]*|\1${httpprefix}|" gsdlsite.cfg > tmp123.txt && $cmd_mv tmp123.txt gsdlsite.cfg
577sed "s|\(httpimg *\)[^ ]*|\1${httpprefix}/images|" gsdlsite.cfg > tmp123.txt && $cmd_mv tmp123.txt gsdlsite.cfg
578
579echo
580echo
581echo "Greenstone installation completed successfully."
582if [ "$remind_cgi" = "yes" ]; then
583 echo " * Don't forget to configure your webserver to treat"
584 echo " $cgi_bin as a cgi executable directory."
585
586 apache_web_cgi=`echo "$web_cgi" | sed "s|[^/]*//[^/]*||" | sed "s|/*$|/|"`
587 cgi_bin_slash=`echo "$cgi_bin" | sed "s|/*$|/|"`
588 cgi_bin_noslash=`echo "$cgi_bin" | sed "s|/*$||"`
589
590 echo " For the Apache webserver this means adding the following"
591 echo " ScriptAlias directive to your httpd.conf configuration file."
592 echo
593 echo " ScriptAlias ${apache_web_cgi} \"${cgi_bin_slash}\""
594 echo " <Directory \"${cgi_bin_noslash}\">"
595 echo " AllowOverride None"
596 echo " Options None"
597 echo " Order allow,deny"
598 echo " Allow from all"
599 echo " </Directory>"
600 echo
601fi
602if [ "$remind_cgi_nomove" = "yes" ]; then
603 echo " * Don't forget to move the contents of ${gsdlhome}/cgi-bin"
604 echo " to $cgi_bin"
605 echo
606fi
607if [ "$remind_ph" = "yes" ]; then
608 echo " * Don't forget to configure your webserver to treat"
609 echo " $gsdlhome as a web accessible directory."
610
611 apache_httpprefix=`echo "$httpprefix" | sed "s|[^/]*//[^/]*||" | sed "s|/*$|/|"`
612 public_html_slash=`echo "$public_html" | sed "s|/*$|/|"`
613 public_html_noslash=`echo "$public_html" | sed "s|/*$||"`
614
615 echo " For the Apache webserver this means adding the following"
616 echo " Alias directive to your httpd.conf configuration file."
617 echo
618 echo " Alias ${apache_httpprefix} \"${public_html_slash}\""
619 echo " <Directory \"${public_html_noslash}\">"
620 echo " Options Indexes MultiViews FollowSymLinks"
621 echo " AllowOverride None"
622 echo " Order allow,deny"
623 echo " Allow from all"
624 echo " </Directory>"
625 echo
626fi
627if [ "$remind_ph_nolink" = "yes" ]; then
628 echo " * Don't forget to create a link called gsdl from $old_ph"
629 echo " to ${gsdlhome}."
630 echo
631fi
632echo "You may remove Greenstone from your system at any time by running"
633echo "the ${gsdlhome}/uninstall.sh script."
634echo "Access Greenstone by pointing a web browser at"
635echo " ${web_cgi}/library"
636echo
637
638exit 0
Note: See TracBrowser for help on using the repository browser.