source: trunk/gsdl3/gs3-install.bat@ 8472

Last change on this file since 8472 was 8051, checked in by kjdon, 20 years ago

import.zip now at coll level not in import directory so that the zip file is not left there - affects importing

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 4.7 KB
Line 
1@echo off
2
3if exist gs3-setup.bat goto begin
4 echo You must run this script from within the Greenstone 3 home directory
5 goto exit
6
7:begin
8call gs3-setup.bat
9
10echo %GSDL3HOME%| "%GSDL3HOME%\winutil\sed.exe" 's,\\,\\\\,g' | "%GSDL3HOME%\winutil\setvar.exe" GSDL3HOME_ESCAPED >setgsdl3e.bat
11call setgsdl3e.bat
12del setgsdl3e.bat
13
14:: ---- CHECK NECESSARY BITS ----
15if not "%CVSROOT%" == "" goto start
16 echo You need to set the environment variable CVSROOT before running
17 echo this script. Please use the same path that you used to check out
18 echo the Greenstone repository. If you are not using anonymous cvs, you
19 echo also need to set the variable CVS_RSH to ssh.
20 goto exit
21
22:start
23:: ---- GET INFO FROM USER ----
24:: **** (SKIPPED) ****
25
26:: ---- CHECKOUT ALL THE BITS FROM CVS ----
27cvs update -dRP
28cd %GSDL3HOME%\packages
29cvs checkout -P mgpp
30cd %GSDL3HOME%
31
32:: ---- SETUP TOMCAT ----
33cd %GSDL3HOME%\comms\jakarta
34"%GSDL3HOME%\winutil\7zip.exe" x jakarta-tomcat-4.1.30.zip
35ren jakarta-tomcat-4.1.30 tomcat
36
37:: Edit the Tomcat setclasspath script to add our classpath
38cd %GSDL3HOME%\comms\jakarta\tomcat\bin
39ren setclasspath.bat setclasspath.bat.orig
40"%GSDL3HOME%\winutil\sed.exe" 's,set CLASSPATH=,set CLASSPATH=%%CLASSPATH%%;,' setclasspath.bat.orig > setclasspath.bat
41
42:: Copy the modified server.xml into tomcat
43cd %GSDL3HOME%\comms\jakarta
44copy tomcat\conf\server.xml tomcat\conf\server-withexamples.xml.config
45"%GSDL3HOME%\winutil\sed.exe" 's,@gsdl3home@,%GSDL3HOME_ESCAPED%,' server.xml.in > tomcat\conf\server.xml
46
47:: Edit the server.xml config file to set the port number
48:: **** (SKIPPED) ****
49
50:: ---- SETUP SOAP ----
51cd %GSDL3HOME%\comms\soap
52"%GSDL3HOME%\winutil\7zip.exe" x soap-bin-2.3.1.zip
53ren soap-2_3_1 soap
54copy soap\lib\soap.jar %GSDL3HOME%\lib\java
55copy DeployedServices.ds soap\webapps\soap
56
57:: Disable soap by renaming the web.xml file
58cd soap\webapps\soap\WEB-INF
59ren web.xml web.xml.disabled
60cd %GSDL3HOME%
61
62:: Edit the SOAPServer config file
63cd %GSDL3HOME%\resources\java
64"%GSDL3HOME%\winutil\sed.exe" 's,@gsdl3home@,%GSDL3HOME_ESCAPED%,' SOAPServer.cfg.in > SOAPServer.cfg
65
66:: ---- SETUP MYSQL + SAMPLE DATABASES ----
67:: Set up the SQL DB
68cd %GSDL3HOME%\packages\mysql
69"%GSDL3HOME%\winutil\7zip.exe" x mysql-4.0.20d-windows.zip
70start bin\mysqld
71bin\mysql --user=root --execute="GRANT SELECT,INSERT,DELETE,UPDATE,DROP,CREATE ON *.* TO gsdl3admin@localhost;"
72bin\mysql --user=root --execute="GRANT SELECT ON *.* TO gsdl3reader@localhost;"
73
74:: Set up any sample collections databases
75bin\mysql --user=root --execute="create database localsite_gs3mgdemo;"
76bin\mysql --user=root localsite_gs3mgdemo < %GSDL3HOME%\web\sites\localsite\collect\gs3mgdemo\mysqldatadump.sql
77
78bin\mysqladmin --user=root shutdown
79
80:: ---- WEB.XML FILE ----
81cd %GSDL3HOME%\web\WEB-INF
82"%GSDL3HOME%\winutil\sed.exe" 's,@gsdl3home@,%GSDL3HOME_ESCAPED%,' web.xml.in > web.xml
83
84:: ---- SITE CONFIG FILES ----
85:: **** (SKIPPED) ****
86
87:: ---- GSDL3 SCRIPTS ----
88:: We also edit the GSDL3 launching script and the SOAP deployment script
89copy gs3-launch.bat.in gs3-launch.bat
90copy gs3-soap-deploy-site.bat.in gs3-soap-deploy-site.bat
91:: **** (UNFINISHED) ****
92
93:: ---- UNPACK SAMPLE COLLECTIONS ----
94cd %GSDL3HOME%\web\sites\localsite\collect
95
96:: Project Gutenberg
97cd gberg
98cd index
99"%GSDL3HOME%\winutil\7zip.exe" x index.zip
100cd ..\..
101
102:: GS2 MG demo
103cd gs2mgdemo
104"%GSDL3HOME%\winutil\7zip.exe" x import.zip
105cd index
106"%GSDL3HOME%\winutil\7zip.exe" x index.zip
107cd ..
108cd metadata
109"%GSDL3HOME%\winutil\7zip.exe" x metadata.zip
110cd ..\..
111
112:: GS2 MGPP demo
113cd gs2mgppdemo
114"%GSDL3HOME%\winutil\7zip.exe" x import.zip
115cd index
116"%GSDL3HOME%\winutil\7zip.exe" x index.zip
117cd ..
118cd metadata
119"%GSDL3HOME%\winutil\7zip.exe" x metadata.zip
120cd ..\..
121
122:: GS3 MG demo
123cd gs3mgdemo
124cd archives
125"%GSDL3HOME%\winutil\7zip.exe" x archives.zip
126cd ..
127"%GSDL3HOME%\winutil\7zip.exe" x import.zip
128cd index
129"%GSDL3HOME%\winutil\7zip.exe" x index.zip
130cd ..\..
131
132:: ---- COMPILATION ----
133echo Will now compile the code - this may take a while
134
135:: Make MG and MGPP jar files, and install them
136cd %GSDL3HOME%\packages\mg
137call winMake compile javaonly
138call winMake install javaonly
139
140cd %GSDL3HOME%\packages\mgpp
141call winMake compile javaonly
142call winMake install javaonly
143
144cd %GSDL3HOME%
145call gs3-setup.bat
146call make.bat
147call make.bat install
148
149:: ---- COPY JAR FILES ----
150:: Any jar files used by applets need to go into the web\lib directory
151cd %GSDL3HOME%
152copy lib\java\phind.jar web\lib
153copy lib\java\xml-apis.jar web\lib
154copy lib\java\xercesImpl.jar web\lib
155
156
157:: And provide a nice little postscript
158echo.
159echo ****************************************************************
160echo Greenstone 3 - Installation Complete!
161echo.
162echo Run gs3-launch.bat to start the web server
163echo.
164echo ****************************************************************
165echo.
166
167cd %GSDL3HOME%
168
169:exit
Note: See TracBrowser for help on using the repository browser.