User Tools

Site Tools


en:user_advanced:remote_greenstone

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
en:user_advanced:remote_greenstone [2014/04/13 23:52] – external edit 127.0.0.1en:user_advanced:remote_greenstone [2023/03/13 01:46] (current) – external edit 127.0.0.1
Line 1: Line 1:
-<!-- mv:2 --> 
-====== Remote Greenstone 2 ====== 
-This document is also available [[es:remote_greenstone|in Spanish]]. 
  
-=====Building Greenstone collections remotely===== 
-Until now, using the GLI has required either a complete Greenstone installation, or the GLI applet to be installed on a server machine. In both cases, collaboration on collections is not possible. 
  
-This new functionality keeps the collections on a remote Greenstone server, thus allowing users to collaborate on collections (at different times), and without a local Greenstone installation. 
  
-=====Installation=====+====== Remote Greenstone ======
  
-This section describes how to install the remote building functionality on server and client.+Remote Greenstone involves using a version of GLI locally to edit collections on a remote Greenstone server, thus allowing users to collaborate on collections (at different times), and without a local Greenstone installation.
  
-====Server====+Client GLI vs applet - now deprecated. 
  
-The server can be a Linux, Mac OS X or Windows machine. It must have the [[http://www.java.com/en/download/index.jsp|Java run-time]] installed (version 1.5 or newer). Note that a binary install of Greenstone includes Java.+=====Setting up Remote Greenstone Functionality=====
  
-To install the server-side functionality: +For installation instructionsplease see [[en:user_advanced:remote_greenstone3|Setting up Remote Greenstone for Greenstone 3]] or [[en:user_advanced:remote_greenstone2|Setting up Remote Greenstone for Greenstone 2]]
-  * [[http://www.greenstone.org/download|Download the latest version of Greenstone]] and install it. In Greenstone versions 2.81 and before, choose the "Web Library" installation option. +
-  * On Windowsedit your PATH environment variable to include imagemagick and ghostscript: Add the ...\bin\windows\imagemagick and ...\bin\windows\ghostscript folders to the PATH, making sure they are in the front, ahead of the windows system folder (eg C:\WinNT\System32) otherwise there will be problems finding the imagemagck convert.exe program. +
-<!-- <i>**Important patches: **Download an updated version of the Greenstone "<a href="http://www.cs.waikato.ac.nz/~mdewsnip/greenstone/temp-2.71/gliserver.pl">cgi-bin/gliserver.pl</a>" and "<a href="http://www.cs.waikato.ac.nz/~mdewsnip/greenstone/temp-2.71/ISISPlug.pm">perllib/plugins/ISISPlug.pm</a>" files before continuing.</i> --> +
-  * Configure your webserver for use with Greenstone: +
-    * **Apache v2.0** +
-      * Later Greenstone releases come with Apache. Or you can ([[http://httpd.apache.org/download.cgi|download it]]) +
-      * If installing Apache manually, configure Apache by editing the conf\httpd.conf file as described in the Greenstone Installer's Guide. +
-      * Start Apache. +
-    * **Apache v1.3** +
-      * Apache v1.3 is not suitable for this application; use Apache v2.0 instead. +
-    * **IIS** (Not recommended) +
-      * See the Greenstone2 tab of [[en:user_advanced:serverthis page]]. Then right-click on the "cgi-bin" folder, choose Properties, and click Configuration. Add an extension for ".pl", specifying the Greenstone "bin/windows/perl/bin/perl" binary as the executable, with arguments "%s" %s. +
-    * **IIS 6**: Edit the Greenstone "cgi-bin/gliserver.pl" file and set the "iis6_mode" option to "1"+
-On Windows: before running the apache web server, rename the Greenstone local library server file server.exe (located in your toplevel Greenstone directory) to something else.  +
- +
-Check that your webserver and Greenstone are working correctly by visiting  +
-<code>http://<your-machine-name>:<port>/greenstone/cgi-bin/library.cgi</code> +
- +
-(For Greenstone 2.81 and older: +
-  * use http:<nowiki>//</nowiki><your-machine-name>:<port>/**gsdl**/cgi-bin/library.cgi +
-  * and if on Linux, try just "library" instead of "library.cgi" at the end. If you're on Windows, try "library.exe" instead at the end). +
- +
-The port will be the number you configured your Apache web server to listen on. This tends to be 8080 or 80, unless these are already in use. +
- +
-  * Make sure you have edited the gsdlsite.cfg file to contain the appropriate values, such as for GSDLHOME. See [[en:developer:linux_source_install |this page]]. +
- +
-**Note:** In Greenstone 2.83 and onwards, you should be able to skip this step if you are using a release of Greenstone from an installer, as the installer automatically does the replacement. +
- +
-Edit the first line of the Greenstone "cgi-bin/gliserver.pl" file and specify the full path of the perl binary. +
- +
-On Unix it is likely to be: +
-<code>    #!/usr/bin/perl -w</code> +
-On Windows this would be something like (if installed in the default location): +
-<code>    #!C:\Program Files\Greenstone\bin\windows\perl\bin\perl -w</code> +
-Note that when using Greenstone 2.82 on Windows, it has the path to perl slightly wrong, so do correct it: ...\bin\windows\perl\**bin\**perl +
- +
-  * Visit http:<nowiki>//</nowiki><your-machine-name>:<port>/greenstone/cgi-bin/gliserver.pl?cmd=check-installation +
- in a web browser. (In Greenstone 2.81 and earlier, visit http:<nowiki>//</nowiki><your-machine-name>:<port>/**gsdl**/cgi-bin/gliserver.pl?cmd=check-installation.) You should get a message saying "Java found" and "Installation OK!"+
-  * If you get a message saying "Java failed", check that the Java run-time environment is installed and on the webserver's path.  +
-  * If you get "500 Internal Server Error", check that Perl is being located correctly by the GLI server program. Open a command window, go to your cgi-bin directory (perhaps Program Files\Greenstone\cgi-bin), and type "gliserver.pl". A message like "perl: bad interpreter: No such file or directory" indicates that the GLI server is not finding the Perl interpreter. Go to step above and investigate. +
- +
-Otherwise, if you're on Linux, it may have to do with not having executable permissions on gliserver.pl. Open an x-term and cd into your greenstone installation folder's cgi-bin folder. There, type: +
-<code>./gliserver.pl</code> +
-If it returns a message like "bash: ./gliserver.pl: Permission denied", then type the following to make it executable: +
-<code>chmod a+rx gliserver.pl</code> +
-Now see if it works. +
-  * Otherwise, check the error log of your webserver for the cause (look for a file called "apache\logs\error_log" and check the last few lines). +
- +
-**Important: Do not continue with these instructions until this is successful, because otherwise nothing will work!** +
-  * If your web server is running as a different user, make sure the collect directory has the right permissions. In such a case, make the Greenstone "collect" directory writeable by the webserver user. +
- +
-On Unix, use chmod. +
- +
-On Windows, if using the included Apache web server, it will run under your User Account and the following tends not to be necessary. Otherwise, you would run the following in a DOS prompt: +
-<code>    cacls "C:\Program Files\Greenstone\collect" /P Everyone:F</code> +
-If you're working in a language other than English (say German or French), the word "Everyone" in the command above could well be in the language your machine is set to. For instance "Tout le monde" in French (use quotes since it is more than one word).  +
-  * In Greenstone versions earlier than 2.82, you will need to edit the Greenstone "etc/main.cfg" file by changing **status** for the Administration page to **enabled**: +
-<code># Set status to "enabled" if you want the Maintenance and +
-# Administration facility to be available. +
-status  enabled +
-</code> +
-This will make the "Administration Page" button appear on the Greenstone home page. +
- +
-  * Add some user accounts by visiting the Greenstone home page and clicking the "Administration Page" button, then "add a new user". See the Authentication section below for more information. +
-  * Check that your Greenstone server side installation contains the GLIServer.jar file in your greenstone installation folder's bin/java. If this jar file is not present in that folder, then **copy** your greenstone folder's gli/GLIServer.jar over into that bin/java/. If the gli folder doesn't contain it either, then open a Linux X-term, go into the gli folder and run  +
-<code>./makejar.sh</code> +
-On Windows, you'd type the following in the DOS prompt: +
-<code>makejar.bat</code> +
-This will create the GLIServer.jar file in the gli folder which you can manually copy into the bin/java folder. +
- +
-If your end users will use the stand-alone GLI client, this is all that is required on the server, and you can skip the next section. +
- +
-===GLI Applet Additional Steps=== +
- +
-If your end users will be using the GLI applet, you also need to do the following four steps. These require the Java SDK -- if you don't already have this you can download it from [[http://java.sun.com/j2se/1.4.2/download.html|here]]; make sure that the Java SDK's bin directory is included in the PATH environment variable, which may not have been done automatically upon installation. +
- +
-  * In the Greenstone "gli" directory, run +
-<code>    keytool -genkey -alias privateKey -keystore appletstore -storepass greenstone</code> +
-  Enter the appropriate details for your organization. When it asks to enter the key password for <privateKey>, choose your own password or hit Enter to use "greenstone"+
-  * Run +
-<code>    jarsigner -keystore appletstore -signedjar SignedGatherer.jar GLI.jar privateKey</code> +
-  When it prompts, enter the password you used above. +
-  * Move the created SignedGatherer.jar file into the Greenstone "bin/java" directory. +
-  * Edit the Greenstone "etc/main.cfg" file and set the "gliapplet" field to "enabled"+
- +
- +
-====Client==== +
- +
-The clients can be Linux, Mac OS X or Windows machines.  +
- +
-**To use the stand-alone GLI client:** +
-  * [[http://www.greenstone.org/download#gli-latest|Download the latest version of the GLI client]] (5MB) and unzip it. +
-  * Run "client-gli.bat" (Windows) or "client-gli.sh" (Linux/Mac OS X).  +
-  The first time you run the GLI client on a machine it will ask for the Greenstone library and gliserver URLs. The first will be <code>http://<your-machine-name>:<port>/gsdl/cgi-bin/library.cgi</code> Alternatively, if you are using an older version of Greenstone (2.81 and earlier), this URL will end on "library.exe" if the server is Windows and "library" on Linux. The gliserver URL it requires will be <code>http://<your-machine-name>:<port>/gsdl/cgi-bin/gliserver.pl</code> +
- +
-**To use the GLI applet:** +
-  * Follow the steps at the end of [[#Server]] first. +
-  * Visit your Greenstone library homepage and click the "The Librarian Interface" button there. The GLI applet will begin loading, and after a short wait a "Launch Greenstone Librarian Interface" button will become available. Click this to start using the GLI applet. +
- +
-You can now use the GLI to edit collections on the server or create new collections. The first time a collection is opened on a particular machine the GLI will read the plugin and classifier information from the server (this may take a minute or two).+
  
 =====Notes===== =====Notes=====
Line 126: Line 20:
 ====Authentication==== ====Authentication====
  
-The existing Greenstone user account system is used for authentication. User information is stored in the etc/users.db file, and the Administration pages (linked from your Greenstone library homepage) are used for adding, editing and removing users.+The existing Greenstone user account system is used for authentication and the Administration pages (linked from your Greenstone library homepage) are used for adding, editing and removing users.
  
-Groups are used to control the actions that users are allowed to perform on collections. **The group settings have changed for Greenstone v2.71, and you will need to edit your existing users if you are upgrading.** The possible group settings are: +Groups are used to control the actions that users are allowed to perform on collections.  
-  * **all-collections-editor**: Users in this group can create new collections and edit all collections. (Equivalent to the "remote-superuser" group of Greenstone v2.70w and earlier).+The possible group settings are: 
 +  * **all-collections-editor**: Users in this group can create new collections and edit all collections. 
   * **personal-collections-editor**: Users in this group can create and edit "personal" collections. Personal collections have the user's username at the start of the internal collection name, and are created when the "this is a personal collection" option is ticked in the GLI "New Collection" dialog.   * **personal-collections-editor**: Users in this group can create and edit "personal" collections. Personal collections have the user's username at the start of the internal collection name, and are created when the "this is a personal collection" option is ticked in the GLI "New Collection" dialog.
-  * **<collection-name>-collection-editor**: Users in this group can create and edit the "<collection-name>" collection. (Equivalent to the "<collection-name>-maintainer" group of Greenstone v2.70w and earlier).+  * **<collection-name>-collection-editor**: Users in this group can create and edit the "<collection-name>" collection. 
  
 For example, a user who needs to create and edit their own collections, and collaborate with others on a shared "papers" collection, should be in the "personal-collections-editor", and "papers-collection-editor" groups. For example, a user who needs to create and edit their own collections, and collaborate with others on a shared "papers" collection, should be in the "personal-collections-editor", and "papers-collection-editor" groups.
 +
 ====Collection locking==== ====Collection locking====
  
 Each collection may only be open by one person at a time, to prevent synchronization problems. When a request is sent to the server to perform an action on a collection, the server will check for a gli.lck file in the collection directory. This file contains the username of the person who has the collection locked. When the collection is closed, this lock file is deleted. Each collection may only be open by one person at a time, to prevent synchronization problems. When a request is sent to the server to perform an action on a collection, the server will check for a gli.lck file in the collection directory. This file contains the username of the person who has the collection locked. When the collection is closed, this lock file is deleted.
- 
- 
  
  
Line 146: Line 40:
 ====E-mail notifications==== ====E-mail notifications====
  
-The server can be configured to e-mail the system administrator whenever a collection finishes building. To enable this, edit the Greenstone "cgi-bin/gliserver.plfile and set "$mail_enabled" to "1", and "$mail_to_address", "$mail_from_address", and "$mail_smtp_server" appropriately.+The server can be configured to e-mail the system administrator whenever a collection finishes building. To enable this, edit the gliserver.pl file (in cgi-bin for Greenstone2; in web/WEB-INF/cgi for Greenstone 3) and set "$mail_enabled" to "1", and "$mail_to_address", "$mail_from_address", and "$mail_smtp_server" appropriately.
  
 ====Missing functionality==== ====Missing functionality====
Line 153: Line 47:
  
  
-  * The Download pane +  * The Download pane. If you are using Client GLI within a local Greenstone to talk to a remote server, then the Download pane will be available (and downloading will happen locally). Standalone GLI will not have downloading available. 
-  * The File &amp;rarr; Write CD/DVD Image... menu item +  * The File -> Write CD/DVD Image... menu item 
-  * The File &amp;rarr; Export... menu item +  * The File -> Export... menu item
-  * The Rename option when right-clicking on a file or folder in the collection tree <i>(will be available in Greenstone 2.73)</i>+
   * The Replace option when right-clicking on a file or folder in the collection tree   * The Replace option when right-clicking on a file or folder in the collection tree
- 
- 
- 
- 
  
 This functionality may be added in the future. This functionality may be added in the future.
  
 +===== Debugging gliserver.pl =====
  
 +The commands that gliserver.pl takes are:
 +^Command^Other Arguments^Only GSx?^Output^
 +|cmd=check-installation| | |blah... Installation OK!|
 +|cmd=greenstone-server-version| | | Greenstone server version is: 3 |
 +|cmd=get-library-url-suffix| | |Greenstone library URL suffix is: /greenstone3|
 +|cmd=get-default-servlet-path | |3 |/library|
 +|cmd=get-site-names | |3 |gateway-----localsite-----|
 +|cmd=user-validation|un=username&pw=password| 3| administrator,all-collections-editor: the list of groups associated with that user. OR "Authentication failed: error message"
  
-=====Troubleshooting===== +gliserver.pl can be found in web/WEB-INF/cgi on the serverSet $debugging_enabled to 1 to prevent it from deleting uploaded zip files on the server (so you can investigate them).
- +
-If you are experiencing problems or error messages when using the client/server version of the GLI, please follow these steps: +
- +
- +
-  * Make sure you are using the latest version of Greenstone and have downloaded any patches on this page. +
-  * Record any popup GLI error messages, and the last action you performed. +
-  * Check for Java exceptions. If you're using the client version of the GLI, these will appear in the black GLI window (Windows) or in the terminal where you ran the GLI (Unix). If you're using the applet version of the GLI, these will appear in the Java Console (available from one of your browser menus -- for Firefox you may have to download [[https://addons.mozilla.org/firefox/141/|this extension]]). +
-  * Check for errors at the bottom of the log files of your webserver. If you're using Apache (recommended), look in the "error_log" file in the Apache "logs" directory. +
-  * If you are having problems with the applet version, please check if you have the same problems with the client version. +
- +
- +
-If you think you have found a bug, or still can't get this functionality working, send a message to the Greenstone Users mailing list. Please include the following information: +
- +
- +
-  * The operating system of the server machine +
-  * The version of Greenstone installed on the server machine +
-  * The version of Java installed on the server machine +
-  * The operating system of the client machine +
-  * Whether you are using the client or applet version of the GLI +
-  * The actions you performed leading up to where the error or problem occurs +
-  * The complete text of any popup GLI error messages, exceptions or errors in the webserver log file +
- +
- +
-====Miscellaneous problems==== +
- +
- +
-  * Errors such as "An error has occurred on the remote Greenstone server while performing this operation: Collection archives zip file /home/Greenstone/collect/admin-test1-archives-1358677588928.zip could not be created." may be due to the tmp directory not being writable. Make sure the folder Greenstone/tmp is world writable. +
-  * "Premature EOF" errors when building collections are caused by the webserver timing out when no output is generated by the build scripts for some time. The solution is to increase the webserver's timeout setting. For Apache this means increasing the "Timeout" value in the conf/httpd.conf file (don't forget to restart Apache). +
-  * "Stack Overflow Errors" Building large collections might result in a stack overflow error. Try increasing the stack size for GLI: For linux/Mac, in gli.sh, look for lines starting with  +
- **"$javapath" -Xmx128M -classpath classes/:GLI.jar** +
-Add **-Xss16M** after the -Xmx128M, which increases the stack size from 2 to 16M. +
-On Windows, in gli.bat, look for the lines starting +
- **"%JAVA_EXECUTABLE%" -Xmx128M -cp classes/;GLI.jar** +
-and do the same thing. +
- +
- +
-=====Future Work===== +
-  * When trying to load the dictionary (in Dictionary.java: ResourceBundle.getBundle(...)), the applet looks in the wrong place initially, causing errors in the Apache error_log. Finding some way of telling Java to look in the JAR file immediately would be nice. +
-  * Pressing the "Cancel Build" button during the importing or building process doesn't have an immediate effect. The GLI code needs to be changed so GShell (and at a further level, RemoteGreenstoneServer) is a listener on the Cancel button. This will mean the cancel event can be processed much quicker. +
-  * When the GLI is quit with jobs still on the remote Greenstone server queue, it will wait until these are finished before exiting. A dialog telling the user what is happening would be nice. This should probably have a "force quit" button, even if this is not recommended. +
-  * Loading the options for DBPlug.pm causes an exception when using a Windows server. If you need to use DBPlug then you must install the DBI and DBD modules that it requires. +
- +
-<!-- /mv:2 --> +
- +
-<!-- mv:3 --> +
-======Building Greenstone collections remotely on Greenstone3====== +
- +
-=====Preliminary notes for those using the Greenstone 3.03 binary release===== +
- +
-  * Make back-up copies of your gsdlCGI4gs3.pm and gliserver4gs3.pl +
-  * Download the slightly modified versions of the two server-side files from SVN: +
-  * [[http://trac.greenstone.org/browser/greenstone3/trunk/web/WEB-INF/cgi/gsdlCGI4gs3.pm?rev=16505|gsdlCGI4gs3.pm]] +
-  * [[http://trac.greenstone.org/browser/greenstone3/trunk/web/WEB-INF/cgi/gliserver4gs3.pl?rev=16512|gliserver4gs3.pl]] +
-  * In order to later launch the client-GLI application successfully, you may need to edit the client-gli4gs3 script. +
-  * If you're on Linux, open greenstone3/gli/client-gli4gs3.sh and go to the line that states: +
-<code>if [ ! -f "${thisdir}/client-gli.sh" ]; then</code> +
-change this to: +
-<code>if [ ! -f "${thisdir}/client-gli4gs3.sh" ]; then</code> +
-  * If you're on Windows, open up greenstone3/gli/client-gli4gs3.bat and go to the line that states: +
-<code>if exist client-gli.bat goto start</code> +
-Make sure it says:  +
-<code>if exist client-gli4gs3.bat goto start</code> +
-  * Follow the steps in the Installation section of this wiki page. +
- +
-=====Installation===== +
- +
-This section describes how to install the remote building functionality on server and client. +
- +
-====Server==== +
- +
-The server can be a Linux, Mac OS X or Windows machine. It must have the [[http://java.sun.com/j2se/1.4.2/download.html|Java run-time]] installed (version 1.4 or newer). +
- +
-To install the server-side functionality: +
-  * Download Greenstone v3 and install it.  +
-  * Enable the tomcat CGI +
-  * a. If you're working with Java 1.4, Greenstone 3 would have set you up with Tomcat 5. In that case, you will need to rename the CGI jars supplied with (but disabled) in Tomcat +
- <code>cd greenstone3/packages/tomcat/server/lib +
- mv servlets-ssi.renametojar servlets-ssi.jar +
- mv servlets-cgi.renametojar servlets-cgi.jar</code> +
-b. On Windows Vista, Tomcat 6 and hence Java 1.5 are required to get the Remote Greenstone server to work. If you're working with Java 5 (1.5) or higher, Greenstone 3 would have set you up with Tomcat 6. In such a case, you will need to adjust the file packages\tomcat\conf\Catalina\localhost\greenstone3.xml to include the line privileged="true" as follows. +
-<code><Context path="/greenstone3"  +
-  docBase="...GS304/web"  +
-  debug="1" reloadable="true"  +
-  allowLinking="false" +
-  privileged="true"> +
-</Context></code> +
-  *  Alter Tomcat's conf/web.xml file. (Found in greenstone3/packages/tomcat/conf folder.) +
- +
-There's a CGIServlet element that's commented out; edit the commented out servlet element (or replace it with the servlet element below) so that the live file contains the following. +
- +
-Code: +
-<code><servlet> +
-        <servlet-name>cgi</servlet-name> +
-      <servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class> +
-        <init-param> +
-          <param-name>debug</param-name> +
-          <param-value>6</param-value> +
-        </init-param> +
-        <init-param> +
-          <param-name>cgiPathPrefix</param-name> +
-          <param-value>WEB-INF/cgi</param-value> +
-        </init-param> +
-        <init-param> +
-           <param-name>passShellEnvironment</param-name> +
-           <param-value>true</param-value> +
-         </init-param> +
-        <init-param> +
-            <param-name>executable</param-name> +
-           <param-value>/usr/bin/perl</param-value> +
-        </init-param> +
-         <load-on-startup>5</load-on-startup> +
-    </servlet></code> +
- +
-Please note the uppercase letter 'E' in passShell**E**nvironment above. It was previously entered as lowercase on this page. If at that time you had copied and pasted the text above, it may have caused your remote Greenstone 3 to not work properly. You may then also want to look for any occurrence of "param-alue" in your web.xml file and correct it to "param-**v**alue"+
- +
-NOTE: Specify the full path of the Perl library for the parameter "executable" of CGIServlet. On Linux, it may look like: +
- <code><init-param> +
-  <param-name>executable</param-name> +
-        <param-value>/usr/bin/perl</param-value> +
-  </init-param></code> +
-for Windows, it may look like: +
-<code><init-param> +
- <param-name>executable</param-name> +
-        <param-value>C:\Program Files\greenstone3\gs2build\bin\windows\perl\bin\perl.exe</param-value> +
-</init-param></code> +
- +
-Uncomment the mapping for the CGI servlet **(to uncomment a commented section of XML, remove the**  +
-<nowiki><!-- and --></nowiki>**that surround the section)**:  +
- +
-Code: +
- +
-<code><servlet-mapping> +
-        <servlet-name>cgi</servlet-name> +
-        <url-pattern>/cgi-bin/*</url-pattern> +
-    </servlet-mapping></code> +
-Don't forget to type the 'bin' part in the cgi-**bin** value for the url-pattern. +
-  * If your Greenstone 3 server is not running yet, start it up: +
-<code>ant start</code> +
-Check that Tomcat and Greenstone3 are working correctly by visiting <code>http://<your-machine-name>:<port>/greenstone3/library</code> The port will be "8080" by default, unless you chose another or if this is already in use. If nothing shows up on the page, then try step 1b above. +
-  * Edit the "greenstone3/web/WEB-INF/cgi/gsdl3site.cfg" file and set full paths of the two greenstone home directories. +
-On Linux, it may look like: +
-<code>gsdl3srchome    /full/path/to/your/greenstone3 +
-gsdlhome    /full/path/to/your/greenstone3/gs2build</code> +
-On Windows, it may look like: +
-<code>gsdl3srchome    "c:\Program Files\greenstone3" +
-gsdlhome    "c:\Program Files\greenstone3\gs2build"</code> +
-  * Edit the first line of the greenstone3/web/WEB-INF/cgi/gliserver.pl file (or gliserver4gs3.pl if you're using the binary Greenstone 3.03 release) and specify the full path of the perl binary. +
- +
-On Unix it is likely to be: +
-<code>    #!/usr/bin/perl -w</code> +
-On Windows this will be (if installed in the default location): +
-<code>    #!C:\Program Files\greenstone3\gs2build\bin\windows\perl\bin\perl -w</code> +
- +
-  * Restart Greenstone's tomcat server from greenstone 3's installation folder to take the changes into account: +
-<code>ant restart</code> +
-If you're on Linux and working with a binary release, make sure that the webserver user has executable permissions on gliserver.pl: +
-<code>cd greenstone3/web/WEB-INF/cgi +
-chmod a+rx gliserver.pl +
-("chmod a+rx gliserver4gs3.pl" for those using the Greenstone 3.03 binary release) +
-</code> +
-Visit  +
-<code>http://<your-machine-name>:<port>/greenstone3/cgi-bin/gliserver.pl?cmd=check-installation</code> +
-in a web browser. (If you're using the Greenstone 3.03 binary release, then replace gliserver.pl in the URL string above with gliserver4gs3.pl.) You should get a message saying "Java found" and "Installation OK!". If you get a message saying "Java failed", check that the Java run-time is installed and on the webserver's path (see also the //javahome// property in step 4 above). If you get a "500 Internal Server Error", check the error log of your webserver for the cause (greenstone3/web/logs/greenstone.log). +
- +
-If the web page that loads is empty, then try step 1b above. +
- +
-**Important: You cannot continue with these instructions until this is successful, as nothing will work without it!** +
- +
-  * Make the Greenstone "collect" directory, located in web/sites/localsite, writeable by the webserver user. +
- +
-On Unix, use chmod. +
- +
-On Windows, run in a DOS prompt: +
-<code> +
-cacls "C:\Program Files\Greenstone3\web\sites\localsite\collect" /P Everyone:+
-</code> +
-  * Display an authentication link on the home page as follows. In the file greenstone3/web/sites/<sitename>/siteConfig.xml (e.g. greenstone3/web/sites/localsite/siteConfig.xml), uncomment the line  +
-<code> +
-<serviceRack name="Authentication"/> +
-</code> +
-  * Add some user accounts by visiting the Greenstone default library page (http://YOURHOST:YOURPORT/greenstone3/library) and clicking the "Administration Page" link near the bottom of it, then "add a new user". See the Authentication section below for more information. +
-  * Open up the file global.properties in your greenstone's web/WEB-INF/classes folder. Edit the tomcat.server property's value to refer to the name of your server machine instead of leaving it at the default value of "localhost": +
-<code> +
-# tomcat info +
-tomcat.server=your-server-computer-name +
-</code> +
-Now images viewed from a browser on the client side will refer to the correct location on the remote machine. +
- +
-If your end users will use the stand-alone GLI client, this is all that is required on the server, and you can skip the next section. +
- +
-If your end users will be using the **GLI applet**, you also need to do the following four steps. These require the Java SDK -- if you don't already have this you can download it from [[http://java.sun.com/j2se/1.4.2/download.html|here]]. +
-  * In the Greenstone "gli" directory, run +
-<code> +
-keytool -genkey -alias privateKey -keystore appletstore -storepass greenstone +
-</code> +
-Enter the appropriate details for your organization. When it asks to enter the key password for <privateKey>, choose your own password or hit Enter to use "greenstone"+
-  * Run +
-<code> +
-jarsigner -keystore appletstore -signedjar SignedGatherer.jar GLI.jar privateKey +
-</code> +
-  When it prompts, enter the password you used above. +
-  * Move the created **SignedGatherer.jar** file into the Greenstone **"greenstone3/web/applet"** directory. +
-  * Edit the Greenstone3 "greenstone3/web/interfaces/default/transform/home.xsl" file and uncomment the line below to display an applet gli link on the home page: +
-<code> +
-<a href="{$library_name}?a=p&amp;amp;sa=gli4gs3"> +
-<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.librarian_interface')"/></a> +
-</code> +
- +
-====Client==== +
- +
-The clients can be Linux, Mac OS X or Windows machines. To use the stand-alone GLI client: +
-  * Download gli-client-3.zip and unzip it. +
-  * If you're on Windows run client-gli.bat and if you're on Linux/Mac OS X, run client-gli.sh. +
-(If you're using the Greenstone 3.03 binary release, run "client-gli4gs3.bat" when on Windows or "client-gli4gs3.sh" when on Linux/Mac OS X).  +
-  * The following depends on the version of Greenstone 3 you are running: +
-  * Each time you run the GLI client on a machine it will ask for the Greenstone3 gliserver URL. This will be +
-<code>http://<your-machine-name>:<port>/greenstone3/cgi-bin/gliserver.pl</code> +
-On subsequent times, you can use the drop down box to choose a gliserver URL entered earlier. +
-  * However, if you're using the Greenstone 3.03 binary release things are a little different: +
- +
- +
-The first time you run the GLI client on a machine it will ask for the Greenstone3 library. It will be <code> +
-http://<your-machine-name>:<port>/greenstone3 +
-</code> +
-If the URL of the Greenstone3 library is not given, it will ask for the Greenstone3 gliserver URL. The Greenstone3 gliserver URL will be +
-<code> +
-http://<your-machine-name>:<port>/greenstone3/cgi-bin/gliserver4gs3.pl +
-</code> +
- +
-To use the GLI applet: +
-  * Visit your Greenstone3 library homepage and click "The Librarian Interface", half-way down the page. The GLI applet will begin loading, and after a short wait a "Launch Greenstone Librarian Interface" button will become available. Click this to start using the GLI applet. +
- +
-You can now use the GLI to edit collections on the server or create new collections. The first time a collection is opened on a particular machine the GLI will read the plugin and classifier information from the server (this may take a minute or two). +
- +
- +
-=====Notes===== +
- +
-====General==== +
- +
-There can be a lot of data transferred between the client and the server. This can make using the client impractical if you don't have a high speed connection between it and the server. +
- +
-====Authentication==== +
-The existing Greenstone3 user account system is used for authentication. User information is stored in /etc/usersDB of each site, for example, the "web/sites/localsite/etc/usersDb" directory stores users' infomation at site "localsite" , and the Administration pages (linked from your Greenstone library homepage) are used for adding, editing and removing users. +
- +
-Groups are used to control the actions that users are allowed to perform on collections. The possible group settings are: +
-  * **all-collections-editor**: Users in this group can create new collections and edit all collections.  +
-  * **personal-collections-editor**: Users in this group can create and edit "personal" collections. Personal collections have the user's username at the start of the internal collection name, and are created when the "this is a personal collection" option is ticked in the GLI "New Collection" dialog. +
-  * **<collection-name>-collection-editor**: Users is this group can create and edit the "<collection-name>" collection.  +
- +
-For example, users who need to create and edit their own collections, and to collaborate with others on a shared "papers" collection, should be in the "personal-collections-editor", and "papers-collection-editor" groups. +
- +
-Note: After the greenstone3 environment has been set, use commands below to export the users table to text or import user records from a txt file. +
-  * Export a users table +
-<code>java org.greenstone.gsdl3.util.usersDB2txt full_path_of_usersDB</code> +
-  * Import user records from a text file to a users table +
-<code>java org.greenstone.gsdl3.txt2usersDB full_path_of_the_text_file full_path_of_the_usersDB</code> +
-  * config3Remote.xml stores configuration of the gli. On linux, it is located at: +
-<code>~/.gli</code> +
-On Windows, it is located at: +
-<code> +
-c:\Documents and Settings\username\Application Data\Greenstone\GLI +
-</code> +
-Check two arguments ("general.gliserver_url", "general.library_url"of the file if the remote gli couldn't connect to the serverThey are like to be: +
-<code> +
-<Argument name="general.gliserver_url">http://localhost:8080/greenstone3/cgi-bin/gliserver.pl</Argument> +
- <Argument name="general.library_url">http://localhost:8080/greenstone3</Argument> +
-</code> +
-If you're using the Greenstone 3 binary release, look for gliserver4gs3.pl instead of gliserver.pl at the end of the first Argument above. +
- +
- +
-====Collection locking==== +
- +
-Each collection may only be open by one person at a time, to prevent synchronization problems. When a request is sent to the server to perform an action on a collection, the server will check for a gli.lck file in the collection directory. This file contains the username of the person who has the collection locked. When the collection is closed, this lock file is deleted. +
- +
-If the collection is locked by someone other than the person making the request, the action fails. This is reported to the user on the client side, and this user is given the option of "stealing" the lock. Generally this is not recommended, since work may be lost if multiple users are editing a collection at one time. Stealing the lock should only be done in the case where the GLI has exited abnormally and the lock file was not deleted, and only after consulting with the user who has the collection locked. +
- +
-====E-mail notifications==== +
-The server can be configured to e-mail the system administrator whenever a collection finishes building. To enable this, edit the Greenstone "cgi-bin/gliserver.pl" file and set "$mail_enabled" to "1", and "$mail_to_address", "$mail_from_address", and "$mail_smtp_server" appropriately. +
- +
-====Things have to be done if GLI needs to be re-compiled==== +
-If some changes have been made on the source files of GLI, run makegli.sh and makejar.sh(Linux) (makegli.bat and makejar.bat for Windows) to recompile the GLI. And then, do remember to copy the GLIServer.jar file to Greenstone3/gs2build/bin/java on the Greenstone3 server. +
- +
-<!--====Missing functionality==== +
-There are a few items of functionality that are available in the standalone GLI but not in the client/applet version. These are: +
-  * The Download pane +
-  * The File &amp;rarr; Write CD/DVD Image... menu item +
-  * The File &amp;rarr; Export... menu item +
-  * The Rename option when right-clicking on a file or folder in the collection tree <i>(will be available in Greenstone 2.73)</i> +
-  * The Replace option when right-clicking on a file or folder in the collection tree +
-This functionality may be added in the future. +
---> +
  
-=====Troubleshooting===== 
  
-If you are experiencing problems or error messages when using the client/server version of the GLI, please follow these steps: +===== Debugging client-gli ===== 
-  * Make sure you are using the latest version of Greenstone and have downloaded any patches on this page. +Client-gli downloads collection skeletons from the remote server and these are stored in  
-  * Record any popup GLI error messages, and the last action you performed. +<code>C:\Users\<Your-Windows-Username>\AppData\Roaming\Greenstone\GLI</code> 
-  * Check for Java exceptions. If you're using the client version of the GLI, these will appear in the black GLI window (Windows) or in the terminal where you ran the GLI (Unix). If you're using the applet version of the GLI, these will appear in the Java Console (available from one of your browser menus -- for Firefox you may have to download [[https://addons.mozilla.org/firefox/141/|this extension]]). +on WindowsAnd on unix systems at
-  * Check for errors at the bottom of the log files of your webserverIf you're using Apache (recommended), look in the "error_log" file in the Apache "logs" directory. +<code><user-home-directory>/.gli</code> 
-  * If you are having problems with the applet version, please check if you have the same problems with the client version. +GLI configuration is stored in ''config.xml'' and client-gli configuration is stored in ''configRemote.xml'' 
-  * If your Perl installation is not found or there is trouble finding JAVA_HOME, you can specify these in the file greenstone3/web/WEB-INF/cgi/gsdl3site.cfg. The Perl installation might for instance not be found if your greenstone3 was obtained from SVN (as opposed to being a binary release) **and** if you do not have perl on your PATH. In such a case, open up the file greenstone3/web/WEB-INF/cgi/gsdl3site.cfg. Then **remove the starting # symbol to uncomment** the **perlpath** line and then edit this **perlpath** property+
-<code>perlpath /full/path/to/perl/bin/folder</code> +
-Similarly, if your JAVA_HOME is not set, you can set the JAVA_HOME property in the same manner.+
  
-If you think you have found a bug, or still can't get this functionality working, send a message to the Greenstone Users mailing list. Please include the following information: +If you have used client-gli to talk to more than one server and some settings are going wrong, between connections, then shut down client-glidelete configRemote.xml and restart client-gli.
-  * The operating system of the server machine +
-  * The version of Greenstone installed on the server machine +
-  * The version of Java installed on the server machine +
-  * The operating system of the client machine +
-  * Whether you are using the client or applet version of the GLI +
-  * The actions you performed leading up to where the error or problem occurs +
-  * The complete text of any popup GLI error messagesexceptions or errors in the webserver log file+
  
-<!--====Miscellaneous problems==== 
-  * "Premature EOF" errors when building collections are caused by the webserver timing out when no output is generated by the build scripts for some time. The solution is to increase the webserver's timeout setting. For Apache this means increasing the "Timeout" value in the conf/httpd.conf file (don't forget to restart Apache). 
---> 
-<!-- /mv:3 --> 
en/user_advanced/remote_greenstone.1397433132.txt.gz · Last modified: 2016/11/16 20:37 (external edit)