[3547] | 1 | #!/bin/bash -v
|
---|
[3552] | 2 |
|
---|
[3634] | 3 | #check that GSDL3HOME is set
|
---|
| 4 | if test -z "$GSDL3HOME" ; then
|
---|
| 5 | echo "You need to 'source setup.bash' before running the install script"
|
---|
| 6 | exit;
|
---|
| 7 | fi
|
---|
| 8 |
|
---|
[3544] | 9 | export CVS_RSH=ssh
|
---|
| 10 |
|
---|
[3560] | 11 | #if you dont have a greenstone_cvs account you can change to use anonymous
|
---|
| 12 | # access. remember, password for anonymous access is 'anonymous'
|
---|
[4111] | 13 | export CVSROOT=:ext:@cvs.scms.waikato.ac.nz:/usr/local/global-cvs/gsdl-src
|
---|
[3560] | 14 | #export CVSROOT=:pserver:[email protected]:2402/usr/local/global-cvs/gsdl-src
|
---|
[3552] | 15 |
|
---|
[3640] | 16 | #make sure we have the current GSDL3 - this also prunes empty directories
|
---|
[3552] | 17 | cvs update -dRP
|
---|
[3544] | 18 |
|
---|
[3640] | 19 | # get mgpp
|
---|
[3544] | 20 | cd packages
|
---|
[3552] | 21 | # check out mgpp
|
---|
[3544] | 22 | cvs co mgpp
|
---|
[4111] | 23 | #configure it and mg
|
---|
| 24 | cd mgpp
|
---|
| 25 | ./configure --prefix $GSDL3HOME
|
---|
| 26 | cd ../mg
|
---|
| 27 | ./configure --prefix $GSDL3HOME
|
---|
[3544] | 28 | cd $GSDL3HOME
|
---|
| 29 |
|
---|
[4111] | 30 |
|
---|
[3552] | 31 | # unpack tomcat and create symbolic link
|
---|
[4848] | 32 | cd comms/jakarta/
|
---|
[5068] | 33 | tar xzf tomcat-4.1.24.tar.gz
|
---|
| 34 | ln -s jakarta-tomcat-4.1.24 tomcat
|
---|
[3544] | 35 | cd $GSDL3HOME
|
---|
| 36 |
|
---|
| 37 |
|
---|
| 38 | #setup sample collection
|
---|
[4051] | 39 | cd web/sites/localsite/collect/mgppdemo/index/
|
---|
[3547] | 40 | tar xzf mgpp-indexfiles.tar.gz
|
---|
[3761] | 41 | cd ../../demo/index
|
---|
| 42 | tar xzf mg-indexfiles.tar.gz
|
---|
[3552] | 43 | cd ../../chinesedemo/index
|
---|
| 44 | tar xzf chinese-index-files.tar.gz
|
---|
[3544] | 45 | cd $GSDL3HOME
|
---|
| 46 |
|
---|
[3547] | 47 |
|
---|
[3552] | 48 | #set up tomcat
|
---|
[3544] | 49 | #create symbolic links
|
---|
[4055] | 50 | cd web
|
---|
| 51 | ln -s -v ../lib
|
---|
| 52 | cd $GSDL3HOME
|
---|
[3544] | 53 |
|
---|
| 54 | #set up the servlet information for tomcat
|
---|
[3552] | 55 | cat web/WEB-INF/web.xml | sed "s&@gsdl3home@&$GSDL3HOME&" > web.xml.tmp
|
---|
[3544] | 56 | mv web/WEB-INF/web.xml web/WEB-INF/web.bak.xml
|
---|
| 57 | mv web.xml.tmp web/WEB-INF/web.xml
|
---|
| 58 |
|
---|
[5068] | 59 | #edit the setclasspath script to add our classpath
|
---|
| 60 | cat comms/jakarta/tomcat/bin/setclasspath.sh | sed 's,CLASSPATH=,CLASSPATH=\"$CLASSPATH\":,' > setclasspath.sh
|
---|
| 61 | mv comms/jakarta/tomcat/bin/setclasspath.sh comms/jakarta/tomcat/bin/setclasspath.bak.sh
|
---|
| 62 | mv setclasspath.sh comms/jakarta/tomcat/bin/setclasspath.sh
|
---|
[3544] | 63 |
|
---|
[3552] | 64 | #edit the server config file
|
---|
[4848] | 65 | cat comms/jakarta/tomcat/conf/server.xml | sed "s,<\!-- Tomcat Root Context -->,<\!-- GSDL3 Service --><Context path=\"/gsdl3\" docBase=\"$GSDL3HOME/web\" debug=\"1\" reloadable=\"true\"/><\!-- Tomcat Root Context -->," > server.xml
|
---|
| 66 | mv comms/jakarta/tomcat/conf/server.xml comms/jakarta/tomcat/conf/server.bak.xml
|
---|
| 67 | mv server.xml comms/jakarta/tomcat/conf/server.xml
|
---|
[3544] | 68 |
|
---|
| 69 |
|
---|
| 70 | #make everyone happy by giving the right permissions to the shell scripts
|
---|
[4848] | 71 | chmod a+x comms/jakarta/tomcat/bin/*.sh
|
---|
[3544] | 72 |
|
---|
[3640] | 73 | #now do the compiling etc by calling update.bash
|
---|
| 74 | update.bash
|
---|
[3547] | 75 |
|
---|