source: trunk/gsdl/Install.sh@ 2246

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

Minor bug fixes in the unix install script

  • Property svn:executable set to *
  • Property svn:mime-type set to application/octet-stream
File size: 20.9 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. You may want"
60echo "to skim through the Install.pdf document that resides in the docs"
61echo "directory of this cd-rom before continuing with the installation."
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 printf "%s" "> "
181 read ans
182 if [ "$ans" != "" ] && [ "$ans" != "y" ]; then
183 break
184 fi
185 first="no"
186 fi
187
188 echo
189 echo "Install the $file collection? [y]"
190 printf "%s" "> "
191 read ans
192 if [ "$ans" = "" ] || [ "$ans" = "y" ]; then
193 echo "--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/$file\" \"${gsdlhome}/collect\"]"
194 $cmd_cpr "${cd_dir}/collect/$file" "${gsdlhome}/collect"
195 fi
196 fi
197done
198
199# set permissions
200echo
201echo "Setting permissions ..."
202echo "--> Install.sh: [$cmd_chmod -R u+rw \"$gsdlhome\"]"
203$cmd_chmod -R u+rw "$gsdlhome"
204# gsdl/etc needs to be globally writable
205echo "--> Install.sh: [$cmd_chmod -R a+w \"$gsdlhome/etc\"]"
206$cmd_chmod -R a+w "$gsdlhome/etc"
207
208# should gsdl/collect and gsdl/tmp be globally writable?
209echo
210echo "In order for end-user collection building to be enabled the"
211echo "Greenstone cgi program must be able to write to the"
212echo "${gsdlhome}/collect and ${gsdlhome}/tmp directories."
213echo "On most systems this means they must be globally writable."
214echo "Make these directories globally writable? [y]"
215printf "%s" "> "
216read ans
217if [ "$ans" = "" ] || [ "$ans" = "y" ]; then
218 echo "--> Install.sh: [$cmd_chmod -R a+w \"$gsdlhome/collect\"]"
219 $cmd_chmod -R a+w "$gsdlhome/collect"
220 echo "--> Install.sh: [$cmd_chmod -R a+w \"$gsdlhome/tmp\"]"
221 $cmd_chmod -R a+w "$gsdlhome/tmp"
222fi
223
224# binaries or source code?
225compile="yes"
226if [ "$gsdlos" = "linux" ]; then
227 echo
228 echo "You may either install pre-compiled, statically linked linux [b]inaries"
229 echo "or install and [c]ompile the Greenstone source code"
230
231 found=no
232 while [ "$found" = "no" ]; do
233 echo "Enter \"[b]\" or \"c\""
234 printf "%s" "> "
235 read ans
236 if [ "$ans" = "" ] || [ "$ans" = "b" ]; then
237 compile="no"
238 # install binaries
239 echo
240 echo "Installing linux binaries"
241 echo "--> Install.sh: [$cmd_cpr \"${cd_dir}/Unix/bin/linux\" \"${gsdlhome}/bin\" ]"
242 $cmd_cpr "${cd_dir}/Unix/bin/linux" "${gsdlhome}/bin"
243 echo "--> Install.sh: [$cmd_chmod a+x \"${gsdlhome}/bin/linux/\"*]"
244 $cmd_chmod a+x "${gsdlhome}/bin/linux/"*
245 echo "--> Install.sh: [$cmd_chmod -R u+rw \"${gsdlhome}/bin/linux\"]"
246 $cmd_chmod -R u+rw "${gsdlhome}/bin/linux"
247
248 # move library executable to cgi-bin
249 echo "--> Install.sh: [$cmd_mv \"${gsdlhome}/bin/linux/library\" \"${gsdlhome}/cgi-bin\"]"
250 $cmd_mv "${gsdlhome}/bin/linux/library" "${gsdlhome}/cgi-bin"
251
252 found="yes"
253 elif [ "$ans" = "c" ]; then
254 found="yes"
255 fi
256 done
257fi
258
259if [ "$compile" = "yes" ]; then
260 # install source
261 echo
262 echo "Installing source code"
263 echo "--> Install.sh [$cmd_cpr \"${cd_dir}/src/lib\" \"$gsdlhome\"]"
264 $cmd_cpr "${cd_dir}/src/lib" "$gsdlhome"
265 echo "--> Install.sh [$cmd_cpr \"${cd_dir}/src/packages\" \"$gsdlhome\"]"
266 $cmd_cpr "${cd_dir}/src/packages" "$gsdlhome"
267 echo "--> Install.sh [$cmd_cpr \"${cd_dir}/src/src\" \"$gsdlhome\"]"
268 $cmd_cpr "${cd_dir}/src/src" "$gsdlhome"
269 echo "--> Install.sh [$cmd_cpr \"${cd_dir}/src/Unix/\"* \"$gsdlhome\"]"
270 $cmd_cpr "${cd_dir}/src/Unix/"* "$gsdlhome"
271 echo "--> Install.sh: [$cmd_chmod -R u+rw \"$gsdlhome\"]"
272 $cmd_chmod -R u+rw "$gsdlhome"
273 echo "--> Install.sh: [$cmd_chmod a+x \"${gsdlhome}/configure\"]"
274 $cmd_chmod a+x "${gsdlhome}/configure"
275 echo "--> Install.sh: [$cmd_chmod a+x \"${gsdlhome}/packages/yaz/configure\"]"
276 $cmd_chmod a+x "${gsdlhome}/packages/yaz/configure"
277
278 # compile it
279 echo "--> Install.sh: [cd $gsdlhome]"
280 cd "$gsdlhome"
281 echo "configuring ..."
282 echo
283 echo "--> Install.sh: [./configure]"
284 ./configure
285 echo "compiling ..."
286 echo
287 echo "--> Install.sh: [make]"
288 make
289 echo "installing ..."
290 echo
291 echo "--> Install.sh: [make install]"
292 make install
293 echo "--> Install.sh: [cd $thisdir]"
294 cd "$thisdir"
295
296 # check that things compiled ok
297 if [ ! -f "${gsdlhome}/cgi-bin/library" ]; then
298 echo
299 echo "ERROR: Compilation failed"
300 echo "Greenstone was not installed successfully"
301 echo "Run the uninstall script (${gsdlhome}/uninstall.sh)"
302 echo "to clean up the partial installation."
303 exit 1
304 fi
305fi
306
307
308# try to find out hostname
309if [ "$gsdlos" = "linux" ]; then
310 hostname=`hostname -f`
311 if [ "$hostname" = "" ]; then
312 hostname=`hostname -i`
313 fi
314fi
315if [ "$hostname" = "" ]; then
316 hostname=`hostname`
317fi
318if [ "$hostname" = "" ]; then
319 hostname="your-computer-name"
320fi
321
322
323# get cgi-bin directory
324echo
325echo
326echo "Greenstone needs a valid cgi executable directory (normally called"
327echo "cgi-bin on unix systems) from which to run."
328echo "This may be either:"
329echo " 1. The default Greenstone cgi-bin directory (${gsdlhome}/cgi-bin)."
330echo " If you use the Greenstone default you will need to configure"
331echo " your webserver to treat this directory as a cgi executable"
332echo " directory. For the Apache webserver you use the ScriptAlias"
333echo " directive to do this (details of how to configure your webserver"
334echo " will be displayed at the end of this installation procedure)."
335if [ "$logname" != "root" ]; then
336echo " Note that you will probably need help from your system"
337echo " administrator to reconfigure your webserver."
338fi
339echo " 2. An existing cgi-bin directory. Normally a cgi-bin directory"
340echo " is created when your webserver is installed. Typically, this"
341echo " might be /home/httpd/cgi-bin, or /usr/local/apache/cgi-bin, or"
342echo " /var/lib/apache/cgi-bin."
343if [ "$logname" != "root" ]; then
344 echo " Many systems also allow individual users to have their own"
345 echo " cgi-bin in /home/username/public_html/cgi-bin."
346fi
347found=no
348remind_cgi="no"
349remind_cgi_nomove="no"
350while [ "$found" = "no" ]; do
351 echo "Enter \"[1]\" or \"2\""
352 printf "%s" "> "
353 read ans
354 if [ "$ans" = "" ] || [ "$ans" = "1" ]; then
355 found="option1"
356 cgi_bin="${gsdlhome}/cgi-bin"
357 # default gsdl cgi-bin, do nothing
358 echo
359 echo "Don't forget to configure your webserver to treat $cgi_bin"
360 echo "as a cgi executable directory. Don't worry, you'll be"
361 echo "reminded of this again at the end of the installation"
362 echo "procedure"
363 remind_cgi="yes"
364 elif [ "$ans" = "2" ]; then
365 found="option2"
366 # external cgi-bin
367 echo
368 echo "Enter existing cgi executable directory [/usr/local/apache/cgi-bin]"
369 printf "%s" "> "
370 read ans
371 if [ "$ans" = "" ]; then
372 cgi_bin="/usr/local/apache/cgi-bin"
373 else
374 cgi_bin="$ans"
375 fi
376 if [ ! -d "$cgi_bin" ]; then
377 echo "Warning: The ${cgi_bin} directory does not exist."
378 echo "Create it? [y]"
379 printf "%s" "> "
380 read ans
381 if [ "$ans" = "" ] || [ "$ans" = "y" ]; then
382 echo "--> Install.sh: [$cmd_mkdir \"$cgi_bin\"]"
383 $cmd_mkdir "$cgi_bin"
384 if [ -d "$cgi_bin" ]; then
385 echo "Don't forget to configure your webserver to treat $cgi_bin"
386 echo "as a cgi executable directory. Don't worry, you'll be"
387 echo "reminded of this again at the end of the installation"
388 echo "procedure"
389 remind_cgi="yes"
390 else
391 echo "ERROR: failed to create $cgi_bin directory"
392 echo "Greenstone installation failed."
393 echo "Run the uninstall script (${gsdlhome}/uninstall.sh)"
394 echo "to clean up the partial installation."
395 exit 1
396 fi
397 fi
398 fi
399
400 if [ ! -w "$cgi_bin" ]; then
401 echo
402 echo "Unable to write to $cgi_bin directory. You will need"
403 echo "to copy the contents of ${gsdlhome}/cgi-bin"
404 echo "to $cgi_bin after this installation is completed."
405 echo "You'll be reminded of this again at the end of the"
406 echo "installation procedure."
407 remind_cgi_nomove="yes"
408 else
409 # install cgi-bin stuff (update the uninstall script first)
410 cd "$gsdlhome"
411 echo "#!/bin/sh" > uninstall.sh
412 echo "" >> uninstall.sh
413 echo "$cmd_rm \"${cgi_bin}/gsdlsite.cfg\"" >> uninstall.sh
414 echo "$cmd_rm \"${cgi_bin}/library\"" >> uninstall.sh
415 echo "echo \"remove ${gsdlhome} directory? [y]\"" >> uninstall.sh
416 echo "read ans" >> uninstall.sh
417 echo "if [ \"\$ans\" = \"\" ] || [ \"\$ans\" = \"y\" ]; then" >> uninstall.sh
418 echo " $cmd_rmr \"$gsdlhome\"" >> uninstall.sh
419 echo "fi" >> uninstall.sh
420 $cmd_chmod u+x uninstall.sh
421 cd "$thisdir"
422
423 echo
424 echo "Installing Greenstone cgi programs in $cgi_bin"
425 echo "--> Install.sh: [$cmd_mv \"${gsdlhome}/cgi-bin/gsdlsite.cfg\" \"$cgi_bin\"]"
426 $cmd_mv "${gsdlhome}/cgi-bin/gsdlsite.cfg" "$cgi_bin"
427 echo "--> Install.sh: [$cmd_mv \"${gsdlhome}/cgi-bin/library\" \"$cgi_bin\"]"
428 $cmd_mv "${gsdlhome}/cgi-bin/library" "$cgi_bin"
429 fi
430 fi
431done
432
433# web address of cgi-bin
434web_cgi="http://${hostname}/cgi-bin"
435if [ "$found" = "option1" ]; then
436 web_cgi="http://${hostname}/gsdl/cgi-bin"
437fi
438echo
439echo "Please enter the web address of the $cgi_bin"
440echo "directory. Typically this might be http://localhost/cgi-bin,"
441echo "or http://127.0.0.1/cgi-bin, or http://your-computer-name/cgi-bin,"
442echo "or http://nnn.nnn.nnn.nn/cgi-bin. [$web_cgi]"
443printf "%s" "> "
444read ans
445if [ "$ans" != "" ]; then
446 web_cgi="$ans"
447fi
448
449# get public_html directory
450echo
451echo
452echo "In order for Greenstone to run, the $gsdlhome"
453echo "directory and all it contains must be accessible from the web."
454echo "To make this happen you may either:"
455echo " 1. Configure your webserver so that $gsdlhome"
456echo " is itself accessible from the web."
457if [ "$logname" != "root" ]; then
458echo " Note that you will probably need help from your system"
459echo " administrator to reconfigure your webserver."
460fi
461echo " 2. Provide an existing web accessible directory from which"
462echo " a symbolic link will be made to $gsdlhome."
463echo " When your server was installed a web accessible directory"
464echo " will have been created (the Apache webserver uses the"
465echo " DocumentRoot directive to define this directory). Typically"
466echo " this directory might be /home/httpd/html, or /usr/local/apache/htdocs,"
467echo " or /var/lib/apache/htdocs."
468if [ "$logname" != "root" ]; then
469 echo " Many systems also allow individual users to have their own"
470 echo " web accessible directory in /home/username/public_html."
471fi
472echo " Note that your web server will need to be configured to allow"
473echo " symbolic links from within this directory. For the Apache"
474echo " server that means this directory must be configured with"
475echo " the SymLinksIfOwnerMatch or FollowSymLinks option (most Apache"
476echo " installations are configured this way by default)."
477found="no"
478remind_ph="no"
479remind_ph_nolink="no"
480while [ "$found" = "no" ]; do
481 echo "Enter \"[1]\" or \"2\""
482 printf "%s" "> "
483 read ans
484 if [ "$ans" = "" ] || [ "$ans" = "1" ]; then
485 found="yes"
486 public_html="$gsdlhome"
487 # no link
488 echo
489 echo "Don't forget to configure your webserver to make $gsdlhome"
490 echo "accessible from the web. You'll be reminded of this again"
491 echo "at the end of this installation procedure."
492 remind_ph="yes"
493 elif [ "$ans" = "2" ]; then
494 found="yes"
495 # external public_html
496 echo
497 public_html="/home/${logname}/public_html"
498 if [ "$logname" = "root" ]; then
499 public_html="/usr/local/apache/htdocs"
500 fi
501 echo "Enter directory that is also accessible from the web [${public_html}]"
502 printf "%s" "> "
503 read ans
504 if [ "$ans" != "" ]; then
505 public_html="$ans"
506 fi
507 # create link to gsdl (and update uninstall.sh)
508 if [ -w "$public_html" ]; then
509 cd "$gsdlhome"
510 echo "#!/bin/sh" > uninstall.sh
511 echo "" >> uninstall.sh
512 echo "$cmd_rm \"$public_html/gsdl\"" >> uninstall.sh
513 echo "$cmd_rm \"${cgi_bin}/gsdlsite.cfg\"" >> uninstall.sh
514 echo "$cmd_rm \"${cgi_bin}/library\"" >> uninstall.sh
515 echo "echo \"remove ${gsdlhome} directory? [y]\"" >> uninstall.sh
516 echo "read ans" >> uninstall.sh
517 echo "if [ \"\$ans\" = \"\" ] || [ \"\$ans\" = \"y\" ]; then" >> uninstall.sh
518 echo " $cmd_rmr \"$gsdlhome\"" >> uninstall.sh
519 echo "fi" >> uninstall.sh
520 $cmd_chmod u+x uninstall.sh
521 cd "$thisdir"
522
523 echo "--> Install.sh: [cd \"$public_html\"]"
524 cd "$public_html"
525 echo "--> Install.sh: [$cmd_ln \"$gsdlhome\" gsdl]"
526 $cmd_ln "$gsdlhome" gsdl
527 echo "--> Install.sh: [cd \"$thisdir\"]"
528 cd "$thisdir"
529 else
530 echo
531 echo "Unable to write to $public_html directory. You will need"
532 echo "to create a link called gsdl from $public_html to"
533 echo "$gsdlhome after this installation is completed. You'll be"
534 echo "reminded of this again at the end of the installation"
535 echo "procedure."
536 old_ph=$public_html
537 remind_ph_nolink="yes"
538 fi
539 public_html="${public_html}/gsdl"
540 fi
541done
542
543
544# get httpprefix
545echo
546echo "Enter the web address of the $public_html directory."
547echo "This may be a relative url (e.g. \"/gsdl\") or a"
548echo "complete url (e.g. \"http://${hostname}/gsdl\") [/gsdl]"
549printf "%s" ">"
550httpprefix="/gsdl"
551read ans
552if [ "$ans" != "" ]; then
553 httpprefix="$ans"
554fi
555
556# get initial password
557echo
558echo "In order to use end-user collection building or to access certain"
559echo "parts of the administration pages you must have a password."
560echo "A user with the username \"admin\" will be created for you with"
561echo "the password you provide (i.e. to enter any pages requiring user"
562echo "authentication enter the \"admin\" username and the password you"
563echo "set here).\n";
564pw=`${gsdlhome}/bin/${gsdlos}/getpw`
565tmp="[admin]
566<comment>
567<enabled>true
568<groups>administrator,colbuilder
569<password>${pw}
570<username>admin
571----------------------------------------------------------------------"
572echo "Creating user database"
573echo "--> Install.sh: [${gsdlhome}/bin/${gsdlos}/txt2db \"${gsdlhome}/etc/users.db\"]"
574echo "$tmp" | ${gsdlhome}/bin/${gsdlos}/txt2db "${gsdlhome}/etc/users.db"
575echo "--> Install.sh: [$cmd_chmod a+rw \"${gsdlhome}/etc/users.db\"]"
576$cmd_chmod a+rw "${gsdlhome}/etc/users.db"
577
578# edit gsdlsite.cfg
579cd "$cgi_bin"
580$cmd_chmod a+rw gsdlsite.cfg
581sed "s|\(gsdlhome *\)[^ ]*|\1${gsdlhome}|" gsdlsite.cfg > tmp123.txt && $cmd_mv tmp123.txt gsdlsite.cfg
582$cmd_chmod a+rw gsdlsite.cfg
583sed "s|#*\(httpprefix *\)[^ ]*|\1${httpprefix}|" gsdlsite.cfg > tmp123.txt && $cmd_mv tmp123.txt gsdlsite.cfg
584$cmd_chmod a+rw gsdlsite.cfg
585sed "s|\(httpimg *\)[^ ]*|\1${httpprefix}/images|" gsdlsite.cfg > tmp123.txt && $cmd_mv tmp123.txt gsdlsite.cfg
586
587echo
588echo
589echo "Greenstone installation completed successfully."
590if [ "$remind_cgi" = "yes" ]; then
591 echo " * Don't forget to configure your webserver to treat"
592 echo " $cgi_bin as a cgi executable directory."
593
594 apache_web_cgi=`echo "$web_cgi" | sed "s|[^/]*//[^/]*||" | sed "s|/*$|/|"`
595 cgi_bin_slash=`echo "$cgi_bin" | sed "s|/*$|/|"`
596 cgi_bin_noslash=`echo "$cgi_bin" | sed "s|/*$||"`
597
598 echo " For the Apache webserver this means adding the following"
599 echo " ScriptAlias directive to your httpd.conf configuration file."
600 echo
601 echo " ScriptAlias ${apache_web_cgi} \"${cgi_bin_slash}\""
602 echo " <Directory \"${cgi_bin_noslash}\">"
603 echo " AllowOverride None"
604 echo " Options None"
605 echo " Order allow,deny"
606 echo " Allow from all"
607 echo " </Directory>"
608 echo
609fi
610if [ "$remind_cgi_nomove" = "yes" ]; then
611 echo " * Don't forget to move the contents of ${gsdlhome}/cgi-bin"
612 echo " to $cgi_bin"
613 echo
614fi
615if [ "$remind_ph" = "yes" ]; then
616 echo " * Don't forget to configure your webserver to treat"
617 echo " $gsdlhome as a web accessible directory."
618
619 apache_httpprefix=`echo "$httpprefix" | sed "s|[^/]*//[^/]*||" | sed "s|/*$|/|"`
620 public_html_slash=`echo "$public_html" | sed "s|/*$|/|"`
621 public_html_noslash=`echo "$public_html" | sed "s|/*$||"`
622
623 echo " For the Apache webserver this means adding the following"
624 echo " Alias directive to your httpd.conf configuration file."
625 echo
626 echo " Alias ${apache_httpprefix} \"${public_html_slash}\""
627 echo " <Directory \"${public_html_noslash}\">"
628 echo " Options Indexes MultiViews FollowSymLinks"
629 echo " AllowOverride None"
630 echo " Order allow,deny"
631 echo " Allow from all"
632 echo " </Directory>"
633 echo
634fi
635if [ "$remind_ph_nolink" = "yes" ]; then
636 echo " * Don't forget to create a link called gsdl from $old_ph"
637 echo " to ${gsdlhome}."
638 echo
639fi
640echo "You may remove Greenstone from your system at any time by running"
641echo "the ${gsdlhome}/uninstall.sh script."
642echo "Access Greenstone by pointing a web browser at"
643echo " ${web_cgi}/library"
644echo
645
646exit 0
Note: See TracBrowser for help on using the repository browser.