source: trunk/gsdl/Install.sh@ 2879

Last change on this file since 2879 was 2879, checked in by sjboddie, 22 years ago

* empty log message *

  • Property svn:executable set to *
  • Property svn:mime-type set to application/octet-stream
File size: 35.4 KB
Line 
1#!/bin/sh
2
3## Install.sh -- Install Greenstone
4
5
6# set iscdrom variable to "yes" for a cdrom installation
7iscdrom="no"
8
9
10cmd_cp="cp"
11cmd_cpr="cp -r"
12cmd_chmod="chmod"
13cmd_mkdir="mkdir -p"
14cmd_ln="ln -s"
15cmd_mv="mv"
16cmd_rm="rm -i"
17cmd_rmr="rm -r"
18
19thisdir=`pwd`
20cd ..
21cd_dir=`pwd`
22cd "$thisdir"
23
24# script must be run from within cdrom/unix directory
25if [ ! -f "${thisdir}/Install.sh" ]; then
26 echo "$itext1"
27 echo "$itext0"
28 exit 1
29fi
30
31# check that various important directories are on the cd
32if [ ! -d "${cd_dir}/gsdl" ]; then
33 echo
34 echo "${itext2}${cd_dir}/gsdl"
35 echo "$itext0"
36 exit 1
37fi
38if [ ! -d "${cd_dir}/Unix/bin/linux" ]; then
39 echo
40 echo "${itext2}${cd_dir}/Unix/bin/linux"
41 echo "$itext0"
42 exit 1
43fi
44
45# install to /usr/local by default if user is "root", otherwise
46# default to users home directory
47gsdlos=`uname | tr A-Z a-z`
48if [ "$gsdlos" = "linux" ]; then
49 logname=`whoami`
50else
51 logname=""
52fi
53if [ "$logname" = "" ]; then
54 logname=`logname`
55fi
56gsdlhome="/home/${logname}"
57if [ "$logname" = "root" ]; then
58 gsdlhome="/usr/local"
59fi
60
61
62itext0="Greenstone was not installed"
63
64itext1="Install.sh must be run from the directory in which it resides"
65
66itext2="ERROR: Could not locate "
67
68itext3="This script will install Greenstone on your system. You may want
69to skim through the Install.pdf document that resides in the docs
70directory on this cd-rom before continuing with the installation.
71
72Note that when prompted for input, hitting \"enter\" will select
73the default (given in square brackets [] at the end of each question).
74If you're unsure which option to select, use the default.
75
76Note also that Install.sh prints out information on any commands
77it runs on your system in the form \"--> Install.sh: [command]\".
78
79It is assumed throughout this installation procedure that you
80have a webserver installed on your system.
81
82For later reference the output of this install script will be
83recorded in a file called INSTALL_RECORD in the directory into
84which you choose to install Greenstone.
85
86Continue? [y]"
87
88itext4="
89Which directory should Greenstone be installed to?
90Make sure that this directory is on a partition with sufficient
91free disk space for the installation options you intend selecting."
92
93itext5="
94 * A linux binary installation requires approximately
95 40Mb."
96
97itext6="
98 * Compiling Greenstone from source code requires
99 approximately 155Mb.
100 * Optional Greenstone demonstration collections may use up
101 to a further 200Mb (you'll be told the size of each individual
102 collection before you install it).
103 * Online documentation requires a further 4Mb.
104 * Enabling Greenstone's \"CD exporting\" function requires a
105 further 24Mb.
106Enter directory to install Greenstone into. A gsdl directory
107will be created in this directory. [${gsdlhome}]"
108
109itext34="
110Enter existing cgi executable directory [/usr/local/apache/cgi-bin]"
111
112
113# get gsdlhome
114echo "$itext3"
115printf "%s" "> "
116read ans
117log="${log}${itext3}
118> $ans
119"
120if [ "$ans" != "" ] && [ "$ans" != "y" ]; then
121 echo "$itext0"
122 exit 0
123fi
124
125msg="$itext4"
126if [ "$gsdlos" = "linux" ]; then
127msg="${msg}$itext5"
128fi
129msg="${msg}$itext6"
130echo "$msg"
131printf "%s" "> "
132read ans
133log="${log}${msg}
134> $ans
135"
136if [ "$ans" != "" ]; then
137 gsdlhome="$ans"
138fi
139
140itext7="
141Warning: The ${gsdlhome} directory does not exist.
142Create it? [y]"
143
144itext8="ERROR: failed to create $gsdlhome directory"
145
146if [ ! -d "$gsdlhome" ]; then
147 echo "$itext7"
148 printf "%s" "> "
149 read ans
150 log="${log}${itext7}
151> $ans
152"
153 if [ "$ans" = "" ]; then
154 ans="y"
155 fi
156 if [ "$ans" = "y" ]; then
157 msg="--> Install.sh: [$cmd_mkdir \"$gsdlhome\"]"
158 echo "$msg"
159 log="${log}${msg}
160"
161 $cmd_mkdir "$gsdlhome"
162 if [ ! -d "$gsdlhome" ]; then
163 echo "$itext8"
164 echo "$itext0"
165 exit 1
166 fi
167 else
168 echo "$itext0"
169 exit 0
170 fi
171fi
172
173# from now on $gsdlhome includes the "/gsdl"
174gsdlhome="${gsdlhome}/gsdl"
175
176itext9="
177If this installation fails or is cancelled, run the uninstall
178script (${gsdlhome}/Uninstall.sh) to clean up the partial
179installation.
180Continue? [y]"
181
182itext10="
183Installing Greenstone directory structure to ${gsdlhome}"
184
185itext11="
186Would you like to install the Greenstone documentation to your
187hard drive? The docs will use about 4Mb of space. If you choose
188not to install them you can still access them from within the
189docs directory of the cd-rom) [y]"
190
191itext12="
192Would you like to install support for Greenstone's \"CD exporting\"
193function? This function allows you to export a Greenstone collection
194in a form suitable for writing to a self-installing Windows cd-rom.
195This package will use approximately 23Mb of disk space [n]"
196
197itext13="
198The Greenstone demonstration collection has been installed. Would you
199like to install any other collections from the installation cd-rom? [y]
200(note that only the built indexes will be installed for these
201collections - if you require the original source documents you may
202manually copy them from the \"collect\" directory of the cd-rom)"
203
204itext14="
205Install the Greenstone mailing list archive (gsarch) - 3Mb? [y]"
206
207itext15="
208Install the MSWord/PDF/RTF/Postscript demonstration collection (wordpdf) - 4Mb? [y]"
209
210itext16="
211Install the Chinese demonstration collection (chinese) - 6Mb? [y]"
212
213itext17="
214Install the Humanity Development Library subset (hdlsub) - 130 Mb? [y]"
215
216itext18="Setting permissions ..."
217
218itext19="
219In order for end-user collection building to be enabled the
220Greenstone cgi program must be able to write to the
221${gsdlhome}/collect and ${gsdlhome}/tmp directories.
222On most systems this means they must be globally writable.
223Make these directories globally writable? [y]"
224
225itext20="
226You may either install pre-compiled, statically linked linux [b]inaries
227(i386 only) or install and [c]ompile the Greenstone source code"
228
229itext21="Enter \"[b]\" or \"c\""
230
231itext22="Installing linux binaries"
232
233itext23="Installing source code"
234
235itext24="configuring ..."
236
237itext25="compiling ..."
238
239itext26="installing ..."
240
241itext27="ERROR: Compilation failed"
242
243itext28="
244
245Greenstone needs a valid cgi executable directory (normally called
246cgi-bin on unix systems) from which to run.
247This may be either:
248 1. The default Greenstone cgi-bin directory (${gsdlhome}/cgi-bin).
249 If you use the Greenstone default you will need to configure
250 your webserver to treat this directory as a cgi executable
251 directory. For the Apache webserver you use the ScriptAlias
252 directive to do this (details of how to configure your webserver
253 will be displayed at the end of this installation procedure)."
254
255itext29=" Note that you will probably need help from your system
256 administrator to reconfigure your webserver."
257
258itext30=" 2. An existing cgi-bin directory. Normally a cgi-bin directory
259 is created when your webserver is installed. Typically, this
260 might be /home/httpd/cgi-bin, or /usr/local/apache/cgi-bin, or
261 /var/lib/apache/cgi-bin."
262
263itext31=" Many systems also allow individual users to have their own
264 cgi-bin in /home/username/public_html/cgi-bin."
265
266itext32="Enter \"[1]\" or \"2\""
267
268itext33="
269Don't forget to configure your webserver to treat ${gsdlhome}/cgi-bin
270as a cgi executable directory. Don't worry, you'll be
271reminded of this again at the end of the installation
272procedure"
273
274itext37="Run the uninstall script (${gsdlhome}/Uninstall.sh)
275to clean up the partial installation."
276
277itext42="
278
279In order for Greenstone to run, the $gsdlhome
280directory and all it contains must be accessible from the web.
281To make this happen you may either:
282 1. Configure your webserver so that $gsdlhome
283 is itself accessible from the web."
284
285itext43=" 2. Provide an existing web accessible directory from which
286 a symbolic link (ln -s) will be made to $gsdlhome.
287 When your server was installed a web accessible directory
288 will have been created (the Apache webserver uses the
289 DocumentRoot directive to define this directory). Typically
290 this directory might be /home/httpd/html, or /usr/local/apache/htdocs,
291 or /var/lib/apache/htdocs."
292
293itext44=" Many systems also allow individual users to have their own
294 web accessible directory in /home/username/public_html."
295
296itext45=" Note that your web server will need to be configured to allow
297 symbolic links from within this directory. For the Apache
298 server that means this directory must be configured with
299 the SymLinksIfOwnerMatch or FollowSymLinks option (most Apache
300 installations are configured this way by default)."
301
302itext46="
303Don't forget to configure your webserver to make $gsdlhome
304accessible from the web. You'll be reminded of this again
305at the end of this installation procedure."
306
307
308msg="--> Install.sh: [$cmd_mkdir \"${gsdlhome}\"]"
309echo "$msg"
310log="${log}${msg}
311"
312$cmd_mkdir "$gsdlhome"
313if [ ! -d "$gsdlhome" ]; then
314 echo "$itext8"
315 echo "$itext0"
316 exit 1
317fi
318# set permissions on gsdlhome directory
319msg="--> Install.sh: [$cmd_chmod u+rwx \"${gsdlhome}\"]"
320echo "$msg"
321log="${log}${msg}
322"
323$cmd_chmod u+rwx "$gsdlhome"
324
325# create initial Uninstall.sh
326cd "$gsdlhome"
327echo "#!/bin/sh" > Uninstall.sh
328echo "" >> Uninstall.sh
329echo "echo \"remove ${gsdlhome} directory? [y]\"" >> Uninstall.sh
330echo "read ans" >> Uninstall.sh
331echo "if [ \"\$ans\" = \"\" ] || [ \"\$ans\" = \"y\" ]; then" >> Uninstall.sh
332echo " $cmd_chmod -R u+rwx \"$gsdlhome\"" >> Uninstall.sh
333echo " $cmd_rmr \"$gsdlhome\"" >> Uninstall.sh
334echo "fi" >> Uninstall.sh
335$cmd_chmod u+x Uninstall.sh
336cd "$thisdir"
337
338# create initial INSTALL_RECORD
339echo "$log" >> "${gsdlhome}/INSTALL_RECORD"
340
341echo "$itext9"
342echo "$itext9" >> "${gsdlhome}/INSTALL_RECORD"
343printf "%s" "> "
344read ans
345echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
346if [ "$ans" != "" ] && [ "$ans" != "y" ]; then
347 msg="$itext0"
348 echo "$msg"
349 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
350 exit 0
351fi
352
353echo "$itext10"
354echo "$itext10" >> "${gsdlhome}/INSTALL_RECORD"
355
356# copy gsdl directory across
357msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/gsdl/\"* \"$gsdlhome\"]"
358echo "$msg"
359echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
360$cmd_cpr "${cd_dir}/gsdl/"* "$gsdlhome"
361
362# copy setup shell scripts across too
363msg="--> Install.sh: [$cmd_cp \"${cd_dir}/src/Unix/setup.\"* \"$gsdlhome\"]"
364echo "$msg"
365echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
366$cmd_cp "${cd_dir}/src/Unix/setup."* "$gsdlhome"
367
368# make sure we have a tmp directory
369if [ ! -d "$gsdlhome/tmp" ]; then
370 msg="--> Install.sh: [$cmd_mkdir \"$gsdlhome/tmp\"]"
371 echo "$msg"
372 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
373 $cmd_mkdir "${gsdlhome}/tmp"
374fi
375
376# make collect directory writable so we can install collections
377msg="--> Install.sh: [$cmd_chmod u+rwx \"$gsdlhome/collect\"]"
378echo "$msg"
379echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
380$cmd_chmod u+rwx "$gsdlhome/collect"
381
382if [ $iscdrom = "yes" ]; then
383 # do we want docs directory?
384 echo "$itext11"
385 echo "$itext11" >> "${gsdlhome}/INSTALL_RECORD"
386 printf "%s" "> "
387 read ans
388 echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
389 if [ "$ans" = "" ] || [ "$ans" = "y" ]; then
390 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/docs\" \"$gsdlhome\"]"
391 echo "$msg"
392 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
393 $cmd_cpr "${cd_dir}/docs" "$gsdlhome"
394 fi
395
396 # do we want the "CD exporting" stuff?
397 echo "$itext12"
398 echo "$itext12" >> "${gsdlhome}/INSTALL_RECORD"
399 printf "%s" "> "
400 read ans
401 echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
402 if [ "$ans" = "Y" ] || [ "$ans" = "y" ]; then
403 msg="--> Install.sh: [$cmd_chmod u+rw \"${gsdlhome}/bin\"]"
404 echo "$msg"
405 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
406 $cmd_chmod u+rw "${gsdlhome}/bin"
407
408 msg="--> Install.sh: [$cmd_mkdir \"${gsdlhome}/bin/windows\"]"
409 echo "$msg"
410 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
411 $cmd_mkdir "${gsdlhome}/bin/windows"
412
413 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/Windows/bin/windows/netscape\" \"${gsdlhome}/bin/windows\"]"
414 echo "$msg"
415 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
416 $cmd_cpr "${cd_dir}/Windows/bin/windows/netscape" "${gsdlhome}/bin/windows"
417
418 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/Windows/bin/windows/Win32s\" \"${gsdlhome}/bin/windows\"]"
419 echo "$msg"
420 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
421 $cmd_cpr "${cd_dir}/Windows/bin/windows/Win32s" "${gsdlhome}/bin/windows"
422
423 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/Windows/bin/windows/net16\" \"${gsdlhome}/bin/windows\"]"
424 echo "$msg"
425 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
426 $cmd_cpr "${cd_dir}/Windows/bin/windows/net16" "${gsdlhome}/bin/windows"
427
428 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/Windows/bin/windows/net32\" \"${gsdlhome}/bin/windows\"]"
429 echo "$msg"
430 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
431 $cmd_cpr "${cd_dir}/Windows/bin/windows/net32" "${gsdlhome}/bin/windows"
432
433 msg="--> Install.sh: [$cmd_cp \"${cd_dir}/Windows/bin/windows/server.exe\" \"${gsdlhome}/bin/windows\"]"
434 echo "$msg"
435 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
436 $cmd_cp "${cd_dir}/Windows/bin/windows/server.exe" "${gsdlhome}/bin/windows"
437
438 msg="--> Install.sh: [$cmd_cp \"${cd_dir}/Windows/bin/windows/gssetup.exe\" \"${gsdlhome}/bin/windows\"]"
439 echo "$msg"
440 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
441 $cmd_cp "${cd_dir}/Windows/bin/windows/gssetup.exe" "${gsdlhome}/bin/windows"
442
443 msg="--> Install.sh: [$cmd_cp \"${cd_dir}/Windows/bin/windows/setpw.exe\" \"${gsdlhome}/bin/windows\"]"
444 echo "$msg"
445 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
446 $cmd_cp "${cd_dir}/Windows/bin/windows/setpw.exe" "${gsdlhome}/bin/windows"
447
448 msg="--> Install.sh: [$cmd_cp \"${cd_dir}/Windows/bin/windows/Setup.exe\" \"${gsdlhome}/bin/windows\"]"
449 echo "$msg"
450 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
451 $cmd_cp "${cd_dir}/Windows/bin/windows/Setup.exe" "${gsdlhome}/bin/windows"
452 fi
453
454
455 # which collections do we want
456 cd "${cd_dir}/collect"
457 echo "$itext13"
458 echo "$itext13" >> "${gsdlhome}/INSTALL_RECORD"
459 printf "%s" "> "
460 read ans
461 echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
462 if [ "$ans" = "" ] || [ "$ans" = "y" ]; then
463
464 # gsarch
465 echo "$itext14"
466 echo "$itext14" >> "${gsdlhome}/INSTALL_RECORD"
467 printf "%s" "> "
468 read ans
469 echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
470 if [ "$ans" = "" ] || [ "$ans" = "y" ]; then
471
472 msg="--> Install.sh: [$cmd_mkdir \"${gsdlhome}/collect/gsarch\"]"
473 echo "$msg"
474 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
475 $cmd_mkdir "${gsdlhome}/collect/gsarch"
476
477 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/gsarch/etc\" \"${gsdlhome}/collect/gsarch\"]"
478 echo "$msg"
479 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
480 $cmd_cpr "${cd_dir}/collect/gsarch/etc" "${gsdlhome}/collect/gsarch"
481
482 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/gsarch/images\" \"${gsdlhome}/collect/gsarch\"]"
483 echo "$msg"
484 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
485 $cmd_cpr "${cd_dir}/collect/gsarch/images" "${gsdlhome}/collect/gsarch"
486
487 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/gsarch/index\" \"${gsdlhome}/collect/gsarch\"]"
488 echo "$msg"
489 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
490 $cmd_cpr "${cd_dir}/collect/gsarch/index" "${gsdlhome}/collect/gsarch"
491 fi
492
493 # wordpdf
494 echo "$itext15"
495 echo "$itext15" >> "${gsdlhome}/INSTALL_RECORD"
496 printf "%s" "> "
497 read ans
498 echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
499 if [ "$ans" = "" ] || [ "$ans" = "y" ]; then
500
501 msg="--> Install.sh: [$cmd_mkdir \"${gsdlhome}/collect/wordpdf\"]"
502 echo "$msg"
503 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
504 $cmd_mkdir "${gsdlhome}/collect/wordpdf"
505
506 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/wordpdf/etc\" \"${gsdlhome}/collect/wordpdf\"]"
507 echo "$msg"
508 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
509 $cmd_cpr "${cd_dir}/collect/wordpdf/etc" "${gsdlhome}/collect/wordpdf"
510
511 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/wordpdf/images\" \"${gsdlhome}/collect/wordpdf\"]"
512 echo "$msg"
513 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
514 $cmd_cpr "${cd_dir}/collect/wordpdf/images" "${gsdlhome}/collect/wordpdf"
515
516 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/wordpdf/index\" \"${gsdlhome}/collect/wordpdf\"]"
517 echo "$msg"
518 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
519 $cmd_cpr "${cd_dir}/collect/wordpdf/index" "${gsdlhome}/collect/wordpdf"
520 fi
521
522 # chinese
523 echo "$itext16"
524 echo "$itext16" >> "${gsdlhome}/INSTALL_RECORD"
525 printf "%s" "> "
526 read ans
527 echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
528 if [ "$ans" = "" ] || [ "$ans" = "y" ]; then
529
530 msg="--> Install.sh: [$cmd_mkdir \"${gsdlhome}/collect/chinese\"]"
531 echo "$msg"
532 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
533 $cmd_mkdir "${gsdlhome}/collect/chinese"
534
535 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/chinese/etc\" \"${gsdlhome}/collect/chinese\"]"
536 echo "$msg"
537 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
538 $cmd_cpr "${cd_dir}/collect/chinese/etc" "${gsdlhome}/collect/chinese"
539
540 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/chinese/images\" \"${gsdlhome}/collect/chinese\"]"
541 echo "$msg"
542 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
543 $cmd_cpr "${cd_dir}/collect/chinese/images" "${gsdlhome}/collect/chinese"
544
545 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/chinese/index\" \"${gsdlhome}/collect/chinese\"]"
546 echo "$msg"
547 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
548 $cmd_cpr "${cd_dir}/collect/chinese/index" "${gsdlhome}/collect/chinese"
549 fi
550
551 # hdlsub
552 echo "$itext17"
553 echo "$itext17" >> "${gsdlhome}/INSTALL_RECORD"
554 printf "%s" "> "
555 read ans
556 echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
557 if [ "$ans" = "" ] || [ "$ans" = "y" ]; then
558
559 msg="--> Install.sh: [$cmd_mkdir \"${gsdlhome}/collect/hdlsub\"]"
560 echo "$msg"
561 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
562 $cmd_mkdir "${gsdlhome}/collect/hdlsub"
563
564 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/hdlsub/etc\" \"${gsdlhome}/collect/hdlsub\"]"
565 echo "$msg"
566 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
567 $cmd_cpr "${cd_dir}/collect/hdlsub/etc" "${gsdlhome}/collect/hdlsub"
568
569 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/hdlsub/images\" \"${gsdlhome}/collect/hdlsub\"]"
570 echo "$msg"
571 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
572 $cmd_cpr "${cd_dir}/collect/hdlsub/images" "${gsdlhome}/collect/hdlsub"
573
574 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/collect/hdlsub/index\" \"${gsdlhome}/collect/hdlsub\"]"
575 echo "$msg"
576 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
577 $cmd_cpr "${cd_dir}/collect/hdlsub/index" "${gsdlhome}/collect/hdlsub"
578 fi
579 fi
580fi
581
582# set permissions
583msg="
584$itext18
585--> Install.sh: [$cmd_chmod -R u+rw \"$gsdlhome\"]
586--> Install.sh: [$cmd_chmod a+x \"${gsdlhome}/bin/script/\"*]"
587echo "$msg"
588echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
589$cmd_chmod -R u+rw "$gsdlhome"
590$cmd_chmod a+x "${gsdlhome}/bin/script/"*
591
592# certain files in gsdl/etc need to be globally writable
593msg="--> Install.sh: [$cmd_chmod a+w \"$gsdlhome/etc/errout.txt\"]"
594echo "$msg"
595echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
596$cmd_chmod a+w "$gsdlhome/etc/errout.txt"
597msg="--> Install.sh: [$cmd_chmod a+w \"$gsdlhome/etc/initout.txt\"]"
598echo "$msg"
599echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
600$cmd_chmod a+w "$gsdlhome/etc/initout.txt"
601msg="--> Install.sh: [$cmd_chmod a+w \"$gsdlhome/etc/key.db\"]"
602echo "$msg"
603echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
604$cmd_chmod a+w "$gsdlhome/etc/key.db"
605msg="--> Install.sh: [$cmd_chmod a+w \"$gsdlhome/etc/users.db\"]"
606echo "$msg"
607echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
608$cmd_chmod a+w "$gsdlhome/etc/users.db"
609msg="--> Install.sh: [$cmd_chmod a+w \"$gsdlhome/etc/main.cfg\"]"
610echo "$msg"
611echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
612$cmd_chmod a+w "$gsdlhome/etc/main.cfg"
613msg="--> Install.sh: [$cmd_chmod a+w \"$gsdlhome/etc/history.db\"]"
614echo "$msg"
615echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
616$cmd_chmod a+w "$gsdlhome/etc/history.db"
617msg="--> Install.sh: [$cmd_chmod a+w \"$gsdlhome/etc/usage.txt\"]"
618echo "$msg"
619echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
620$cmd_chmod a+w "$gsdlhome/etc/usage.txt"
621
622
623# should gsdl/collect and gsdl/tmp be globally writable?
624echo "$itext19"
625echo "$itext19" >> "${gsdlhome}/INSTALL_RECORD"
626printf "%s" "> "
627read ans
628echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
629if [ "$ans" = "" ] || [ "$ans" = "y" ]; then
630 msg="--> Install.sh: [$cmd_chmod -R a+w \"$gsdlhome/collect\"]"
631 echo "$msg"
632 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
633 $cmd_chmod -R a+w "$gsdlhome/collect"
634 msg="--> Install.sh: [$cmd_chmod -R a+w \"$gsdlhome/tmp\"]"
635 echo "$msg"
636 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
637 $cmd_chmod -R a+w "$gsdlhome/tmp"
638fi
639
640# binaries or source code?
641compile="yes"
642if [ "$gsdlos" = "linux" ]; then
643 echo "$itext20"
644 echo "$itext20" >> "${gsdlhome}/INSTALL_RECORD"
645
646 found=no
647 while [ "$found" = "no" ]; do
648 echo "$itext21"
649 echo "$itext21" >> "${gsdlhome}/INSTALL_RECORD"
650 printf "%s" "> "
651 read ans
652 echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
653 if [ "$ans" = "" ] || [ "$ans" = "b" ]; then
654 compile="no"
655 # install binaries
656 msg="
657$itext22
658--> Install.sh: [$cmd_cpr \"${cd_dir}/Unix/bin/linux\" \"${gsdlhome}/bin\"]"
659 echo "$msg"
660 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
661 $cmd_cpr "${cd_dir}/Unix/bin/linux" "${gsdlhome}/bin"
662 msg="--> Install.sh: [$cmd_chmod a+x \"${gsdlhome}/bin/linux/\"*]"
663 echo "$msg"
664 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
665 $cmd_chmod a+x "${gsdlhome}/bin/linux/"*
666 msg="--> Install.sh: [$cmd_chmod -R u+rw \"${gsdlhome}/bin/linux\"]"
667 echo "$msg"
668 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
669 $cmd_chmod -R u+rw "${gsdlhome}/bin/linux"
670
671 # move library executable to cgi-bin
672 msg="--> Install.sh: [$cmd_mv \"${gsdlhome}/bin/linux/library\" \"${gsdlhome}/cgi-bin\"]"
673 echo "$msg"
674 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
675 $cmd_mv "${gsdlhome}/bin/linux/library" "${gsdlhome}/cgi-bin"
676
677 # move XML.tgz to perllib/cpan and untar it
678 msg="--> Install.sh: [$cmd_mv \"${gsdlhome}/bin/linux/XML.tgz\" \"${gsdlhome}/perllib/cpan\"]"
679 echo "$msg"
680 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
681 $cmd_mv "${gsdlhome}/bin/linux/XML.tgz" "${gsdlhome}/perllib/cpan"
682 cd "${gsdlhome}/perllib/cpan"
683 msg="--> Install.sh: [gzip -dc XML.tgz | tar -xf -]"
684 echo "$msg"
685 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
686 gzip -dc XML.tgz | tar -xf -
687
688 found="yes"
689 elif [ "$ans" = "c" ]; then
690 found="yes"
691 fi
692 done
693fi
694
695if [ "$compile" = "yes" ]; then
696 # install source
697 msg="
698$itext23
699--> Install.sh: [$cmd_cpr \"${cd_dir}/src/lib\" \"$gsdlhome\"]"
700 echo "$msg"
701 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
702 $cmd_cpr "${cd_dir}/src/lib" "$gsdlhome"
703 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/src/packages\" \"$gsdlhome\"]"
704 echo "$msg"
705 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
706 $cmd_cpr "${cd_dir}/src/packages" "$gsdlhome"
707 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/src/src\" \"$gsdlhome\"]"
708 echo "$msg"
709 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
710 $cmd_cpr "${cd_dir}/src/src" "$gsdlhome"
711 msg="--> Install.sh: [$cmd_cpr \"${cd_dir}/src/Unix/\"* \"$gsdlhome\"]"
712 echo "$msg"
713 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
714 $cmd_cpr "${cd_dir}/src/Unix/"* "$gsdlhome"
715 msg="--> Install.sh: [$cmd_cp \"${cd_dir}/src/Install.txt\" \"$gsdlhome\"]"
716 echo "$msg"
717 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
718 $cmd_cp "${cd_dir}/src/Install.txt" "$gsdlhome"
719 msg="--> Install.sh: [$cmd_chmod -R u+rw \"$gsdlhome\"]"
720 echo "$msg"
721 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
722 $cmd_chmod -R u+rw "$gsdlhome"
723 msg="--> Install.sh: [$cmd_chmod a+x \"${gsdlhome}/configure\"]"
724 echo "$msg"
725 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
726 $cmd_chmod a+x "${gsdlhome}/configure"
727 msg="--> Install.sh: [$cmd_chmod a+x \"${gsdlhome}/packages/yaz/configure\"]"
728 echo "$msg"
729 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
730 $cmd_chmod a+x "${gsdlhome}/packages/yaz/configure"
731
732 # compile it
733 msg="--> Install.sh: [cd $gsdlhome]"
734 echo "$msg"
735 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
736 cd "$gsdlhome"
737 msg="$itext24
738
739--> Install.sh: [./configure]"
740 echo "$msg"
741 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
742 ./configure
743 msg="$itext25
744
745--> Install.sh: [make]"
746 echo "$msg"
747 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
748 make
749 msg="$itext26
750
751--> Install.sh: [make install]"
752 echo "$msg"
753 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
754 make install
755 msg="--> Install.sh: [cd $thisdir]"
756 echo "$msg"
757 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
758 cd "$thisdir"
759
760 # check that things compiled ok
761 if [ ! -f "${gsdlhome}/cgi-bin/library" ]; then
762 msg="$itext27
763$itext0
764$itext37"
765 echo "$msg"
766 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
767 exit 1
768 fi
769fi
770
771
772# try to find out hostname
773if [ "$gsdlos" = "linux" ]; then
774 hostname=`hostname -f`
775 if [ "$hostname" = "" ]; then
776 hostname=`hostname -i`
777 fi
778fi
779if [ "$hostname" = "" ]; then
780 hostname=`hostname`
781fi
782if [ "$hostname" = "" ]; then
783 hostname="your-computer-name"
784fi
785
786
787# get cgi-bin directory
788echo "$itext28"
789echo "$itext28" >> "${gsdlhome}/INSTALL_RECORD"
790if [ "$logname" != "root" ]; then
791 echo "$itext29"
792 echo "$itext29" >> "${gsdlhome}/INSTALL_RECORD"
793fi
794echo "$itext30"
795echo "$itext30" >> "${gsdlhome}/INSTALL_RECORD"
796if [ "$logname" != "root" ]; then
797 echo "$itext31"
798 echo "$itext31" >> "${gsdlhome}/INSTALL_RECORD"
799fi
800found=no
801remind_cgi="no"
802remind_cgi_nomove="no"
803while [ "$found" = "no" ]; do
804 echo "$itext32"
805 echo "$itext32" >> "${gsdlhome}/INSTALL_RECORD"
806 printf "%s" "> "
807 read ans
808 echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
809 if [ "$ans" = "" ] || [ "$ans" = "1" ]; then
810 found="option1"
811 cgi_bin="${gsdlhome}/cgi-bin"
812 # default gsdl cgi-bin, do nothing
813
814 echo "$itext33"
815 echo "$itext33" >> "${gsdlhome}/INSTALL_RECORD"
816 remind_cgi="yes"
817 elif [ "$ans" = "2" ]; then
818 found="option2"
819 # external cgi-bin
820
821 echo "$itext34"
822 echo "$itext34" >> "${gsdlhome}/INSTALL_RECORD"
823 printf "%s" "> "
824 read ans
825 echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
826 if [ "$ans" = "" ]; then
827 cgi_bin="/usr/local/apache/cgi-bin"
828 else
829 cgi_bin="$ans"
830 fi
831
832itext35="Warning: The ${cgi_bin} directory does not exist.
833Create it? [y]"
834
835itext36="Don't forget to configure your webserver to treat $cgi_bin
836as a cgi executable directory. Don't worry, you'll be
837reminded of this again at the end of the installation
838procedure"
839
840itext38="ERROR: failed to create $cgi_bin directory"
841
842itext39="
843Unable to write to $cgi_bin directory. You will need
844to copy the contents of ${gsdlhome}/cgi-bin
845to $cgi_bin after this installation is completed.
846You'll be reminded of this again at the end of the
847installation procedure."
848
849itext40="
850Installing Greenstone cgi programs in $cgi_bin"
851
852 if [ ! -d "$cgi_bin" ]; then
853
854 echo "$itext35"
855 echo "$itext35" >> "${gsdlhome}/INSTALL_RECORD"
856 printf "%s" "> "
857 read ans
858 echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
859 if [ "$ans" = "" ] || [ "$ans" = "y" ]; then
860 msg="--> Install.sh: [$cmd_mkdir \"$cgi_bin\"]"
861 echo "$msg"
862 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
863 $cmd_mkdir "$cgi_bin"
864 if [ -d "$cgi_bin" ]; then
865 echo "$itext36"
866 echo "$itext36" >> "${gsdlhome}/INSTALL_RECORD"
867 remind_cgi="yes"
868 else
869 msg="$itext38
870$itext0
871$itext37"
872 echo "$msg"
873 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
874 exit 1
875 fi
876 fi
877 fi
878
879 if [ ! -w "$cgi_bin" ]; then
880 echo "$itext39"
881 echo "$itext39" >> "${gsdlhome}/INSTALL_RECORD"
882 remind_cgi_nomove="yes"
883 else
884 # install cgi-bin stuff (update the uninstall script first)
885 cd "$gsdlhome"
886 echo "#!/bin/sh" > Uninstall.sh
887 echo "" >> Uninstall.sh
888 echo "$cmd_rm \"${cgi_bin}/gsdlsite.cfg\"" >> Uninstall.sh
889 echo "$cmd_rm \"${cgi_bin}/library\"" >> Uninstall.sh
890 echo "echo \"remove ${gsdlhome} directory? [y]\"" >> Uninstall.sh
891 echo "read ans" >> Uninstall.sh
892 echo "if [ \"\$ans\" = \"\" ] || [ \"\$ans\" = \"y\" ]; then" >> Uninstall.sh
893 echo " $cmd_rmr \"$gsdlhome\"" >> Uninstall.sh
894 echo "fi" >> Uninstall.sh
895 $cmd_chmod u+x Uninstall.sh
896 cd "$thisdir"
897
898 msg="$itext40
899--> Install.sh: [$cmd_mv \"${gsdlhome}/cgi-bin/gsdlsite.cfg\" \"$cgi_bin\"]"
900 echo "$msg"
901 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
902 $cmd_mv "${gsdlhome}/cgi-bin/gsdlsite.cfg" "$cgi_bin"
903 msg="--> Install.sh: [$cmd_mv \"${gsdlhome}/cgi-bin/library\" \"$cgi_bin\"]"
904 echo "$msg"
905 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
906 $cmd_mv "${gsdlhome}/cgi-bin/library" "$cgi_bin"
907 fi
908 fi
909done
910
911# web address of cgi-bin
912web_cgi="http://${hostname}/cgi-bin"
913if [ "$found" = "option1" ]; then
914 web_cgi="http://${hostname}/gsdl/cgi-bin"
915fi
916
917itext41="
918Please enter the web address of the $cgi_bin
919directory. Typically this might be http://localhost/cgi-bin,
920or http://127.0.0.1/cgi-bin, or http://your-computer-name/cgi-bin,
921or http://nnn.nnn.nnn.nn/cgi-bin. [$web_cgi]"
922
923echo "$itext41"
924echo "$itext41" >> "${gsdlhome}/INSTALL_RECORD"
925printf "%s" "> "
926read ans
927echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
928if [ "$ans" != "" ]; then
929 web_cgi="$ans"
930fi
931
932# get public_html directory
933echo "$itext42"
934echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
935if [ "$logname" != "root" ]; then
936 echo "$itext29"
937 echo "$itext29" >> "${gsdlhome}/INSTALL_RECORD"
938fi
939echo "$itext43"
940echo "$itext43" >> "${gsdlhome}/INSTALL_RECORD"
941if [ "$logname" != "root" ]; then
942 echo "$itext44"
943 echo "$itext44" >> "${gsdlhome}/INSTALL_RECORD"
944fi
945echo "$itext45"
946echo "$itext45" >> "${gsdlhome}/INSTALL_RECORD"
947found="no"
948remind_ph="no"
949remind_ph_nolink="no"
950while [ "$found" = "no" ]; do
951 echo "$itext32"
952 echo "$itext32" >> "${gsdlhome}/INSTALL_RECORD"
953 printf "%s" "> "
954 read ans
955 echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
956 if [ "$ans" = "" ] || [ "$ans" = "1" ]; then
957 found="yes"
958 public_html="$gsdlhome"
959 # no link
960 echo "$itext46"
961 echo "$itext46" >> "${gsdlhome}/INSTALL_RECORD"
962 remind_ph="yes"
963 elif [ "$ans" = "2" ]; then
964 found="yes"
965 # external public_html
966 echo
967 public_html="/home/${logname}/public_html"
968 if [ "$logname" = "root" ]; then
969 public_html="/usr/local/apache/htdocs"
970 fi
971
972itext47="Enter directory that is also accessible from the web [${public_html}]"
973
974 echo "$itext47"
975 echo "$itext47" >> "${gsdlhome}/INSTALL_RECORD"
976 printf "%s" "> "
977 read ans
978 echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
979 if [ "$ans" != "" ]; then
980 public_html="$ans"
981 fi
982
983itext48="
984Unable to write to $public_html directory. You will need
985to create a link called gsdl from $public_html to
986$gsdlhome after this installation is completed. You'll be
987reminded of this again at the end of the installation
988procedure."
989
990 # create link to gsdl (and update Uninstall.sh)
991 if [ -w "$public_html" ]; then
992 cd "$gsdlhome"
993 echo "#!/bin/sh" > Uninstall.sh
994 echo "" >> Uninstall.sh
995 echo "$cmd_rm \"$public_html/gsdl\"" >> Uninstall.sh
996 echo "$cmd_rm \"${cgi_bin}/gsdlsite.cfg\"" >> Uninstall.sh
997 echo "$cmd_rm \"${cgi_bin}/library\"" >> Uninstall.sh
998 echo "echo \"remove ${gsdlhome} directory? [y]\"" >> Uninstall.sh
999 echo "read ans" >> Uninstall.sh
1000 echo "if [ \"\$ans\" = \"\" ] || [ \"\$ans\" = \"y\" ]; then" >> Uninstall.sh
1001 echo " $cmd_rmr \"$gsdlhome\"" >> Uninstall.sh
1002 echo "fi" >> Uninstall.sh
1003 $cmd_chmod u+x Uninstall.sh
1004 cd "$thisdir"
1005
1006 msg="--> Install.sh: [cd \"$public_html\"]"
1007 echo "$msg"
1008 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
1009 cd "$public_html"
1010 msg="--> Install.sh: [$cmd_ln \"$gsdlhome\" gsdl]"
1011 echo "$msg"
1012 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
1013 $cmd_ln "$gsdlhome" gsdl
1014 msg="--> Install.sh: [cd \"$thisdir\"]"
1015 echo "$msg"
1016 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
1017 cd "$thisdir"
1018 else
1019 echo "$itext48"
1020 echo "$itext48" >> "${gsdlhome}/INSTALL_RECORD"
1021 old_ph=$public_html
1022 remind_ph_nolink="yes"
1023 fi
1024 public_html="${public_html}/gsdl"
1025 fi
1026done
1027
1028itext49="
1029Enter the web address of the $public_html directory.
1030This may be a relative url (e.g. \"/gsdl\") or a
1031complete url (e.g. \"http://${hostname}/gsdl\") [/gsdl]"
1032
1033itext50="
1034In order to use end-user collection building or to access certain
1035parts of the administration pages you must have a password.
1036A user with the username \"admin\" will be created for you with
1037the password you provide (i.e. to enter any pages requiring user
1038authentication enter the \"admin\" username and the password you
1039set here).
1040"
1041
1042itext51="
1043
1044Greenstone installation completed successfully."
1045
1046itext52=" * Don't forget to configure your webserver to treat
1047 $cgi_bin as a cgi executable directory."
1048
1049itext53=" For the Apache webserver this means adding the following
1050 ScriptAlias directive to your httpd.conf configuration file."
1051
1052itext54=" * Don't forget to move the contents of ${gsdlhome}/cgi-bin
1053 to $cgi_bin
1054"
1055
1056itext55=" * Don't forget to configure your webserver to treat
1057 $gsdlhome as a web accessible directory."
1058
1059itext56=" For the Apache webserver this means adding the following
1060 Alias directive to your httpd.conf configuration file."
1061
1062itext57=" * Don't forget to create a link called gsdl from $old_ph
1063 to ${gsdlhome}.
1064"
1065
1066itext58="The output of this script has been recorded for you at
1067${gsdlhome}/INSTALL_RECORD.
1068You may remove Greenstone from your system at any time by running
1069the ${gsdlhome}/Uninstall.sh script.
1070Access Greenstone by pointing a web browser at
1071${web_cgi}/library
1072"
1073
1074# get httpprefix
1075echo "$itext49"
1076echo "$itext49" >> "${gsdlhome}/INSTALL_RECORD"
1077printf "%s" ">"
1078httpprefix="/gsdl"
1079read ans
1080echo "> $ans" >> "${gsdlhome}/INSTALL_RECORD"
1081if [ "$ans" != "" ]; then
1082 httpprefix="$ans"
1083fi
1084
1085# get initial password
1086echo "$itext50"
1087echo "$itext50" >> "${gsdlhome}/INSTALL_RECORD"
1088pw=`"${gsdlhome}/bin/${gsdlos}/getpw"`
1089tmp="[admin]
1090<comment>
1091<enabled>true
1092<groups>administrator,colbuilder
1093<password>${pw}
1094<username>admin
1095----------------------------------------------------------------------"
1096echo "$tmp" | ${gsdlhome}/bin/${gsdlos}/txt2db "${gsdlhome}/etc/users.db"
1097$cmd_chmod a+rw "${gsdlhome}/etc/users.db"
1098
1099# edit gsdlsite.cfg
1100cd "$cgi_bin"
1101sed "s|\(gsdlhome *\)[^ ]*|\1\"${gsdlhome}\"|" gsdlsite.cfg > tmp123.txt && $cmd_mv tmp123.txt gsdlsite.cfg
1102sed "s|#*\(httpprefix *\)[^ ]*|\1${httpprefix}|" gsdlsite.cfg > tmp123.txt && $cmd_mv tmp123.txt gsdlsite.cfg
1103sed "s|\(httpimg *\)[^ ]*|\1${httpprefix}/images|" gsdlsite.cfg > tmp123.txt && $cmd_mv tmp123.txt gsdlsite.cfg
1104
1105# success
1106echo "$itext51"
1107echo "$itext51" >> "${gsdlhome}/INSTALL_RECORD"
1108if [ "$remind_cgi" = "yes" ]; then
1109 echo "$itext52"
1110 echo "$itext52" >> "${gsdlhome}/INSTALL_RECORD"
1111
1112 apache_web_cgi=`echo "$web_cgi" | sed "s|[^/]*//[^/]*||" | sed "s|/*$|/|"`
1113 cgi_bin_slash=`echo "$cgi_bin" | sed "s|/*$|/|"`
1114 cgi_bin_noslash=`echo "$cgi_bin" | sed "s|/*$||"`
1115
1116 msg="$itext53
1117
1118 ScriptAlias ${apache_web_cgi} \"${cgi_bin_slash}\"
1119 <Directory \"${cgi_bin_noslash}\">
1120 AllowOverride None
1121 Options None
1122 Order allow,deny
1123 Allow from all
1124 </Directory>
1125"
1126 echo "$msg"
1127 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
1128fi
1129if [ "$remind_cgi_nomove" = "yes" ]; then
1130 echo "$itext54"
1131 echo "$itext54" >> "${gsdlhome}/INSTALL_RECORD"
1132fi
1133if [ "$remind_ph" = "yes" ]; then
1134 echo "$itext55"
1135 echo "$itext55" >> "${gsdlhome}/INSTALL_RECORD"
1136
1137 apache_httpprefix=`echo "$httpprefix" | sed "s|[^/]*//[^/]*||" | sed "s|/*$|/|"`
1138 public_html_slash=`echo "$public_html" | sed "s|/*$|/|"`
1139 public_html_noslash=`echo "$public_html" | sed "s|/*$||"`
1140
1141 msg="$itext56
1142
1143 Alias ${apache_httpprefix} \"${public_html_slash}\"
1144 <Directory \"${public_html_noslash}\">
1145 Options Indexes MultiViews FollowSymLinks
1146 AllowOverride None
1147 Order allow,deny
1148 Allow from all
1149 </Directory>
1150"
1151 echo "$msg"
1152 echo "$msg" >> "${gsdlhome}/INSTALL_RECORD"
1153fi
1154if [ "$remind_ph_nolink" = "yes" ]; then
1155 echo "$itext57"
1156 echo "$itext57" >> "${gsdlhome}/INSTALL_RECORD"
1157fi
1158echo "$itext58"
1159echo "$itext58" >> "${gsdlhome}/INSTALL_RECORD"
1160
1161exit 0
Note: See TracBrowser for help on using the repository browser.