Server-side Installation of Evergreen SoftwareThis section describes installation of the Evergreen server-side software and its associated components. Installation, configuration, testing and verification of the software is straightforward if you follow some simple directions.OverviewInstalling, configuring and testing the Evergreen server-side software is straightforward with the current stable software release. See the section "Installation of Server-Side Software" for instructions tailored to installing on some particular distributions of the Linux operating system. Earlier software distributions are described in the section "Installing Previous Versions of Evergreen".The current version of the Evergreen server-side software runs as a native application on any of several well-known Linux distributions (e.g., Ubuntu and Debian). It does not currently run as a native application on the Windows operating system (e.g., WindowsXP, WindowsXP Professional, Windows7), but the software can still be installed and run on Windows via a so-called virtualized Unix-guest Operating System (using, for example, VirtualBox, or VMware, or VirtualPC to emulate a Linux environment). It can also be installed to run on other Linux systems via virtualized environments (using, for example, VirtualBox or VMware). More information on virtualized environments can be found in the section "Installing Evergreen in Virtualized Unix Environments".Installation of some sub-components of the Evergreen server-side software is mentioned only in abbreviated form in this section. More detailed information is available in the accompanying sections:
"Installing PostgreSQL",
"Apache" and
"memcached Servers".
Finally, installation of the Evergreen Staff Client software is reviewed in the section "Installing the Evergreen Staff Client". Evergreen Software DependenciesThe Evergreen server-side software has dependencies on particular versions of certain major software sub-components. Successful installation of Evergreen software requires that software versions agree with those listed here:
VERIFY THE DEPENDENCIES IN THIS TABLE Current Stable Software ReleaseThe current stable release of Evergreen is version 1.6.0.7. Instructions for installing, configuring and testing that version on the Ubuntu or Debian Linux systems are found in the section "Installing Evergreen on Ubuntu or Debian" .
This release of Evergreen software is dependent on the Open Service Request Framework (OpenSRF). The current stable release of OpenSRF is version 1.2.2. Instructions for installing, configuring and testing that version are found in the section "Installing OpenSRF On Ubuntu or Debian" .Previous Software ReleasesEarlier releases of Evergreen are also available. Instructions for installing, configuring and testing earlier versions are found in the section "Installing Previous Versions of Evergreen" .The next most recent previous release of Evergreen is version 1.4.0.6. Instructions for installing, configuring and testing that version are found in the section "Installing Evergreen 1.4.0.6 on Ubuntu or Debian" .The accompanying previous release of OpenSRF is version 1.0.x. Instructions for installing, configuring and testing that version are found in the section "Installing OpenSRF 1.0.x" .System Hardware RequirementsThis section describes various requirements of the hardware and software environment that must be fulfilled to support a successful Evergreen installation. The system requirements for running Evergreen really depend on what you want to do with it. For just evaluating the software, or for a very small library (for example, 1 circulation station, a few thousand items, and infrequent online catalog use), any modern desktop or laptop made within the last few years capable of running Linux, FreeBSD, etc. should suffice. We recommend at least 512mb of RAM. ADD FURTHER CONTENT ON HARDWARE AND SOFTWARE REQUIREMENTS System ArchitecturesThis sections describes examples of some working Evergreen system architectures, including both server-side software and Staff Client software.A bare-minimum system requires only a single Evergreen Server and a single Evergreen Staff Client, both residing on a single server machine. In fact, that is a reasonable architecture for simple experiments or as a proof of concept in a conference-room pilot. But typical real-world systems will probably consist of at least one or two Evergreen Servers plus multiple Staff Clients.Another simple system may require only that you install one or more instances of the Staff Client software. For instance, if your consortium already provides the Evergreen server software or if you are using the hosted version provided by Equinox, you do not need to install the Evergreen server-side software at all; you need only the Staff Client.PINESIn order to provide load balancing and high-availability at the OPAC and Staff Client level, PINES has implemented a Linux Virtual Server environment with five independent mini-clusters. This allows live updates of the entire system with no perceived downtime or interruption in service. ADD FURTHER INFORMATION ON PINES Sitka ADD FURTHER INFORMATION ON SITKA Other Working Systems ADD FURTHER INFORMATION ON OTHER WORKING SYSTEMS Installation of Server-Side SoftwareThis section describes the installation of the major components of Evergreen server-side software.As far as possible, you should perform the following steps in the exact order given since the success of many steps relies on the successful completion of earlier steps. You should make backup copies of files and environments when you are instructed to do so. In the event of installation problems those copies can allow you to back out of a step gracefully and resume the installation from a known state. See the section on "Backing Up" for further information.Of course, after you successfully complete and test the entire Evergreen installation you should take a final snapshot backup of your system(s). This can be the first in the series of regularly scheduled system backups that you should probably also begin.Installing OpenSRF On Ubuntu or DebianThis section describes the installation of the latest version of the Open Service Request Framework (OpenSRF), a major component of the Evergreen server-side software, on Ubuntu or Debian systems. Evergreen software is integrated with and depends on the OpenSRF software system.Follow the steps outlined here and run the specified tests to ensure that OpenSRF is properly installed and configured. Do not continue with any further Evergreen installation steps until you have verified that OpenSRF has been successfully installed.The following steps have been tested on the x86 (32-bit) and x86-64 (64-bit) platforms. OpenSRF 1.2.0 has been tested on Debian Etch (4.0), Debian Lenny, Ubuntu Hardy Heron (8.04), and Ubuntu Intrepid Ibex (8.10).In the following instructions, you are asked to perform certain steps as either the root user, the opensrf user, or the postgres user.Debian -- To become the root user, issue the command "su -" and enter the password of the root user.Ubuntu -- To become the root user, issue the command "sudo su -" and enter the password of your current user.To switch from the root user to a different user, issue the command "su - USERNAME". For example, to switch from the root user to the opensrf user, issue the command "su - opensrf". Once you have become a non-root user, to become the root user again, simply issue the command "exit".Add the OpenSRF UserAs the root user, add the opensrf user to the system. The default shell for the new user is automatically set to /bin/bash to inherit a reasonable environment:Download and Unpack Latest OpenSRF VersionAs the opensrf user, download and extract the latest version of OpenSRF. The latest version can be found here: The new directory /home/opensrf/OpenSRF-1.2.2 will be created.Install Prerequisites to Build OpenSRFIn this section you will install and configure a set of prerequisites that will be used to build OpenSRF. In a following step you will actually build the software using the make utility.As the root user, enter the commands show below to build the prerequisites from the software distribution that you just downloaded and unpacked. Remember to replace [distribution] in the example with the keyword corresponding to the actual Linux distribution listed in the "Keywords" figure below.
ADD INFO FOR OTHER LINUX DISTRIBUTIONS This will install a number of packages on the system that are required by OpenSRF, including some Perl modules from CPAN. You can say "no" to the initial CPAN configuration prompt to allow it to automatically configure itself to download and install Perl modules from CPAN. The CPAN installer will ask you a number of times whether it should install prerequisite modules - say "yes".Configure OpenSRFAs the opensrf user, return to the OpenSRF build directory and use the utility "configure" to prepare for the next step of compiling and linking the software. You can include the --enable-python and --enable-java configuration options if you wish to include support for Python and Java, respectively:Compile, Link and Install OpenSRFAs the root user, return to the OpenSRF build directory and use the make command to compile, link and install OpenSRF:Update the System Dynamic Library PathAs the root user, you must update the system dynamic library path to make your system recognize the newly installed libraries. Do this by creating a new file named /etc/ld.so.conf.d/osrf.conf containing a new library path, then run the command ldconfig to automatically read the file and modify the system dynamic library path:Define Public and Private OpenSRF DomainsDefine your public and private OpenSRF domains. For security purposes, OpenSRF uses Jabber domains to separate services into public and private realms. Throughout these instructions, we will use the example domains public.localhost for the public domain and private.localhost for the private domain. On a single-server system, the easiest way to define public and private domains is to define separate hostnames by adding entries to the file /etc/hosts.As the root user, edit the file /etc/hosts and add the following entries for our example domains:Change File OwnershipsAs the root user, change the ownership of files installed in the directory /openils to the user "opensrf":Stop the "ejabberd" ServiceAs the root user, stop the "ejabberd" service:If "ejabberd" reports that it is already stopped, it may have run into a problem starting back at the installation stage. One possible fix is to kill any remaining beam and epmd processes, then edit the ejabberd configuration file to hardcode a domain:Edit the "ejabberd" configurationAs the root user, edit the file /etc/ejabberd/ejabberd.cfg and make the following changes:Change {hosts, ["localhost"]}. to {hosts, ["localhost", "private.localhost", "public.localhost"]}.Change {max_user_sessions, 10}. to {max_user_sessions, 10000}. If you see something like this instead: {access, max_user_sessions, [{10, all}]}., then change it to {access, max_user_sessions, [{10000, all}]}.Change all three occurrences of max_stanza_size to 2000000.Change both occurrences of maxrate to 500000. Comment out the line {mod_offline, []} by placing two % comment signs in front.Restart the "ejabberd" serviceAs the root user, restart the ejabberd service to test the configuration changes and to register your users:Register "router" and "ejabberd" usersOn each domain, you need two "ejabberd" users to manage the OpenSRF communications:a "router" user, to whom all requests to connect to an OpenSRF service will be routed; this "ejabberd" user must be named "router"an "opensrf" user, which clients use to connect to OpenSRF services; this user can be named anything you like, but we will use "opensrf" in our examplesAs the root user, use the utility "ejabberdctl" to register your ejabber users router and opensrf for the OpenSRF router service on each domain. The users should have different passwords on each domain. These users will correspond to those configured in the file /openils/conf/opensrf_core.xml:Create configuration filesAs the opensrf user, use the example templates to create the configuration files /openils/conf/opensrf_core.xml and /openils/conf/opensrf.xml:Edit opensrf_core.xmlEdit the file /openils/conf/opensrf_core.xml to change the "ejabberd" usernames and passwords as follows.The following example uses common XPath syntax on the left-hand side to indicate the aproximage position needing changes within the XML file.You also need to specify the domains from which OpenSRF will accept and to which OpenSRF will make connections. If you are installing OpenSRF on a single server and using the "private.localhost" / "public.localhost" domains, these will already be set to the correct values. Otherwise, search and replace to match your values.Modify the file "opensrf.xml"Modify the file /openils/conf/opensrf.xml.As the opensrf user, edit the file to set the location of the persistent database in the <dbfile> element near the end of the file:Create Configuration Files for Users Needing srfshIn this section you will set up a special configuration file for each user who will need to run the srfsh (surf shell) utility.The software installation will automatically create srfsh. This is a command line diagnostic tool for testing and interacting with the OpenSRF network software. It will be used in a future step to complete and test the Evergreen installation. See the section "Testing the Installation" for further information.As the root user, copy the short sample configuration file /openils/conf/srfsh.xml.example to the file .srfsh.xml (note the leading dot!) in the home directory of each user who will use srfsh. Finally, edit each file .srfsh.xml and make the following changes. When you finish, remember to change the owner of the file to match the owner of the home directory.Modify domain to be the router hostname (following our domain examples, private.localhost will give srfsh access to all OpenSRF services, while public.localhost will only allow access to those OpenSRF services that are publicly exposed).Modify username and password to match the opensrf Jabber user for the chosen domainModify logfile to be the full path for a log file to which the user has write accessModify loglevel as needed for testingModify Environmental Variable PATH for "opensrf" UserAs the opensrf user, modify the environmental variable PATH by adding a new file path to the opensrf user's shell configuration file .bashrc:Starting OpenSRFAs the root user, start the "ejabberd" and "memcached" services:Finally, as the opensrf user, start OpenSRF:You can also start Evergreen without the -l flag, but osrf_ctl.sh must know the fully qualified domain name for the system on which it will execute. That hostname may have been specified in the configuration file opensrf.xml, which you configured in a previous step.Testing connections to OpenSRFOnce you have installed and started OpenSRF, as the root user, test your connection to OpenSRF using the utility srfsh and trying to call the add method on the OpenSRF "math" service: VERIFY THIS TEST For other srfsh commands, type 'help' in at the prompt.Stopping OpenSRFAs the opensrf user, stop OpenSRF:Installing Evergreen V1.6.0.7 On Ubuntu or DebianThis section outlines the installation process for the latest stable version of Evergreen (1.6.0.7).In this section you will download, unpack, install, configure and test the Evergreen system, including the Evergreen server and the PostgreSQL database system. You will make several configuration changes and adjustments to the software, including updates to configure the system for your own locale, and some updates needed to work around a few known issues.The following steps have been tested on the x86 (32-bit) and x86-64 (64-bit) architectures. There may be differences between the Desktop and Server editions of Ubuntu. These instructions assume the Server edition.In the following instructions, you are asked to perform certain steps as either the root user, the opensrf user, or the postgres user.Debian -- To become the root user, issue the command "su -" and enter the password of the root user.Ubuntu -- To become the root user, issue the command "sudo su -" and enter the password of your current user.To switch from the root user to a different user, issue the command "su - USERNAME". For example, to switch from the root user to the opensrf user, issue the command "su - opensrf". Once you have become a non-root user, to become the root user again, simply issue the command "exit".Installing OpenSRFEvergreen software is integrated with and depends on the Open Service Request Framework (OpenSRF) software system. For further information on installing, configuring and testing OpenSRF, see the section "Installing OpenSRF".Follow the steps outlined in that section and run the specified tests to ensure that OpenSRF is properly installed and configured. Do not continue with any further Evergreen installation steps until you have verified that OpenSRF has been successfully installed.Download and Unpack Latest Evergreen VersionAs the opensrf user, download and extract the latest version of Evergreen. The latest version can be found here: The new directory /home/opensrf/Evergreen-ILS-1.6.0.1 will be created.Install Prerequisites to Build EvergreenIn this section you will install and configure a set of prerequisites that will be used to build Evergreen. In a following step you will actually build the software using the make utility.As the root user, enter the commands show below to build the prerequisites from the software distribution that you just downloaded and unpacked. Remember to replace [distribution] in the example with the keyword corresponding to the actual Linux distribution listed in the "Keywords" figure below.
Keywords Targets for "make"KeywordDescriptiondebian-lennyfor Debian Lenny (5.0), the most recent versiondebian-etchfor Debian Etch (4.0)ubuntu-karmicfor Ubuntu Lucid (10.04) [same as for Karmic]ubuntu-karmicfor Ubuntu Karmic (9.10)ubuntu-intrepidfor Ubuntu Intrepid (8.10)ubuntu-hardyfor Ubuntu Hardy (8.04)ubuntu-gutsyfor Ubuntu Gutsy (7.10)gentoogeneric for Gentoo versionscentosgeneric for Centos versions
ADD INFO FOR OTHER LINUX DISTRIBUTIONS (OPTIONAL) Install the PostgreSQL ServerSince the PostgreSQL server is usually a standalone server in multi-server production systems, the prerequisite installer Makefile in the previous step does not automatically install PostgreSQL. If your PostgreSQL server is on a different system, just skip this step.For further information on installing PostgreSQL, see the section "Installing PostgreSQL".If your PostgreSQL server will be on the same system as your Evergreen software, then as the root user install the required PostgreSQL server packages:PostgreSQL 8.1 is deprecated and will become unsupported in a future release, though existing installations upgrading from Evergreen 1.4 or before will work fine. However, consider upgrading your Postgres soon! VERIFY: IS THIS STILL TRUE? ADD INFO ON HOW TO DETERMINE WHICH VERSION OF POSTGRESQL YOU HAVE (OPTIONAL) Install Perl Modules on PostgreSQL ServerIf PostgreSQL is running on the same system as your Evergreen software, then the Perl modules will automatically be available. Just skip this step.Otherwise, if your PostgreSQL server is running on another system, then as the root user install the following Perl modules on that system: ADD INFO ON HOW TO INSTALL THE PERL MODULES ADD INFO ON HOW TO VERIFY THAT THE PERL MODULES ARE INSTALLED Update the System Dynamic Library PathAs the root user, you must update the system dynamic library path to make your system recognize the newly installed libraries. Do this by creating a new file named /etc/ld.so.conf.d/eg.conf containing two new library paths, then run the command ldconfig to automatically read the file and modify the system dynamic library path:(OPTIONAL) Restart the PostgreSQL ServiceIf PostgreSQL is running on the same system as the rest of Evergreen, as the root user you must restart the PostgreSQL service to avoid a problem where the library plperl.so cannot be found. If your PostgreSQL server is running on another system, just skip this step. ADD INFO ON OTHER VERSIONS OF POSTGRESQL Where "PGSQL_VERSION" is your installed PostgreSQL version (e.g. "8.3").Configure EvergreenAs the opensrf user, return to the Evergreen build directory and use the utility "configure" to prepare for the next step of compiling and linking the software:Compile, Link and Install EvergreenIn this step you will actually compile, link and install Evergreen and the default Evergreen Staff Client.As the root user, return to the Evergreen build directory and use the make command as shown below. The Staff Client will also be automatically built, but you must remember to set the variable STAFF_CLIENT_BUILD_ID to match the version of the Staff Client you will use to connect to the Evergreen server.For further information on manually building the Staff Client, see the section "Installing the Evergreen Staff Client".To complete the Staff Client installation, as the root user create a symbolic link named server in the head of the Staff Client directory /openils/var/web/xul that points to the /server subdirectory of the new Staff Client build:Copy the OpenSRF Configuration FilesAs the root user, copy the example OpenSRF configuration files into place. This replaces the configuration files that you set up in a previous step when you installed and tested OpenSRF. You should also create backup copies of the old files for troubleshooting purposes. Finally, change the ownership on the installed files to the user opensrf:Create and Configure PostgreSQL DatabaseAs the postgres user on your PostgreSQL server, create the Evergreen database.In the commands below, remember to adjust the path of the contrib repository to match your PostgreSQL server layout. For example, if you built PostgreSQL from source the path would be /usr/local/share/contrib; if you installed the PostgreSQL 8.3 server packages on Ubuntu 8.04, the path would be /usr/share/postgresql/8.3/contrib/.Create and configure the databaseAs the postgres user on the PostgreSQL system create the PostgreSQL database, then set some internal paths:Where "PGSQL_VERSION" is your installed PostgreSQL version (e.g. "8.3").Create new Evergreen superuserAs the postgres user on the PostgreSQL system, create the new database user evergreen and assign a password:Where "MYNEWPASSWORD" is the password chosen.Create Database SchemaAs the root user, create the database schema and configure your system with the corresponding database authentication details for the database user evergreen that you created in the previous step.Enter the following commands and replace HOSTNAME, PORT, PASSWORD and DATABASENAME with appropriate values.Where, on most systems, HOSTNAME will be localhost, PORT will be 5432, and PASSWORD and DATABASENAME will be those assigned when PostgreSQL was installed in the previous step.If you are entering the above command on a single line, do not include the \ (backslash) characters. If you are using the bash shell, these should only be used at the end of a line at a bash prompt to indicate that the command is continued on the next line.Configure the Apache ServerAs the root user, configure the Apache server and copy several new configuration files to the Apache server directories:Create a Security Certificate (SSL Key)Use the command openssl to create a new SSL key for your Apache server. For a public production server you should configure or purchase a signed SSL certificate, but for now you can just use a self-signed certificate and accept the warnings in the Staff Client and browser during testing and development:This is only a temporary measure to expedite testing. You must get a proper SSL certificate for a public production system. ADD INFO ON HOW TO GET A SIGNED SSL CERTIFICATE Modify the Apache Configuration FileAs the root user, edit the Apache configuration file /etc/apache2/sites-available/eg.conf and make the following changes:Comment out the line Allow from 10.0.0.0/8, then uncomment the line Allow from all.This change allows access to your configuration CGI scripts from any workstation on any network. This is only a temporary change to expedite testing and should be removed after you have finished and successfully tested the Evergreen installation.You must remove these changes after testing is completed. See the section "Post-Installation Chores" for further details on removing this change after the Evergreen installation is complete.Comment out the line Listen 443 as it conflicts with the same declaration in the configuration file: /etc/apache2/ports.conf. Debian etch users should not do this. ADD INFO ON WHY DEBIAN ETCH USERS SHOULD NOT DO THIS The following updates are needed to allow the logs to function properly, but it may break other Apache applications on your server. We hope to make this unnecessary in a future Evergreen release.For the Linux distributions Ubuntu Hardy or Debian Etch, as the root user, edit the Apache configuration file /etc/apache2/apache2.conf and change the user: www-data to the user: opensrf.For the Linux distributions Ubuntu Karmic or Ubuntu Lucid or Debian Lenny, as the root user, edit the Apache configuration file /etc/apache2/envvars and change the phrase: export APACHE_RUN_USER=www-data to the phrase: export APACHE_RUN_USER=opensrf.As the root user, edit the Apache configuration file /etc/apache2/apache2.conf and add the line KeepAliveTimeout 1, or modify an existing line if it already exists.(OPTIONAL) Performance Modifications for ApacheSome further configuration changes to Apache may be necessary for busy systems. These changes increase the number of Apache server processes that are started to support additional browser connections.As the root user, edit the Apache configuration file /etc/apache2/apache2.conf, locate and modify the section related to prefork configuration to suit the load on your system.As the root user, edit the Apache configuration file /etc/apache2/apache2.conf and add the line MaxKeepAliveRequests 100, or modify an existing line if it already exists.
Enable the Evergreen SiteAs the root user, execute the following Apache configuration commands to disable the default "It Works" web page and to enable the Evergreen web site:Modify the OpenSRF Configuration FileAs the opensrf user, edit the OpenSRF configuration file /openils/conf/opensrf_core.xml to update the Jabber usernames and passwords, and to specify the domain from which we will accept and to which we will make connections.If you are installing Evergreen on a single server and using the private.localhost / public.localhost domains, these will already be set to the correct values. Otherwise, search and replace to match your customized values.The following example uses common XPath syntax on the left-hand side to indicate the approximate position needing changes within the XML file: ADD A BETTER DIAGRAM HERE Create Configuration Files for Users Needing srfshThe software installation will automatically create a utility named srfsh (surf shell). This is a command line diagnostic tool for testing and interacting with the OpenSRF network software. It will be used in a future step to complete and test the Evergreen installation. See the section "Testing the Installation" for further information.In this section you will set up a special configuration file for each user who will need to run the utility. Copy the short sample configuration file /openils/conf/srfsh.xml.example to the file .srfsh.xml (note the leading dot!) in the home directory of each user who will use srfsh. Finally, edit each users' .srfsh.xml file and make the following changes:Modify domain to be the router hostname (following our domain examples, private.localhost will give srfsh access to all OpenSRF services, while public.localhost will only allow access to those OpenSRF services that are publicly exposed).Modify username and password to match the opensrf Jabber user for the chosen domainModify logfile to be the full path for a log file to which the user has write accessModify loglevel as needed for testingModify the OpenSRF EnvironmentAs the opensrf user, change the permissions of .cgi files in the directory /openils/var/cgi-bin to executable, then modify the shell configuration file ~/.bashrc for opensrf by adding a Perl environmental variable. Finally, execute the shell configuration file to load the new variables into your current environment.In a multi-server environment, you must add any modifications to ~/.bashrc to the top of the file before the line [ -z "$PS1" ] && return. This will allow headless (scripted) logins to load the correct environment.Starting EvergreenAs the root user, start the "ejabberd" and "memcached" services (if they are not already running):As the opensrf user, start Evergreen.Use the flag -l to force Evergreen to use localhost (your current system) as the hostname. Using the start_all option will start the OpenSRF router, Perl services, and C services:You can also start Evergreen without the -l flag, but the utility osrf_ctl.sh must know the fully qualified domain name for the system on which it will execute. That hostname may have been specified in the configuration file opensrf.xml, which you configured in a previous step. ADD EXPLANATION FOR CONFIGURING "opensrf.xml" Execute the following command to determine the fully qualified domain name of your system:When you attempt to start Evergreen, if you receive an error message similar to osrf_ctl.sh: command not found, then your environment variable PATH does not include the directory /openils/bin. As the opensrf user, edit the configuration file /home/opensrf/.bashrc and add the following line: export PATH=$PATH:/openils/binWhen you attempt to start Evergreen, if you receive an error message similar to Can't locate OpenSRF/System.pm in @INC ... BEGIN failed--compilation aborted, then your environment variable PERL5LIB does not include the directory /openils/lib/perl5. As the opensrf user, edit the configuration file /home/opensrf/.bashrc and add the following line: export PERL5LIB=$PERL5LIB:/openils/lib/perl5As the opensrf user, generate the Web files needed by the Staff Client and catalogue, and calculate the proximity of locations in the Organizational Unit tree (which allows Holds to work properly).You must do this the first time you start Evergreen, and after any changes you make to the library hierarchy in the configuration file config.cgi.As the root user, restart the Apache Web server:If the Apache Web server was running when you started the OpenSRF services, you might not be able to successfully log in to the OPAC or Staff Client until the Apache Web server is restarted.Testing the InstallationThis section describes several simple tests you can perform to verify that the Evergreen server-side software has been installed and configured properly and is running as expected.Testing Connections to EvergreenOnce you have installed and started Evergreen, test your connection to Evergreen. As the opensrf user start the utility srfsh and try logging onto the Evergreen server using the default administrator username and password. Following is sample output generated by executing that script after a successful Evergreen installation:Other Connection Tests with "srfsh"There is another srfsh command called math_bench that sends queries to the math servers. Note that opensrf.math and opensrf.dbmath must be running for this command to work:
srfsh# math_bench 10
|.........|.........|.........|.........|.........|.........|.........|.........|.........|.........
++++++++++++++++++++++++++++++++++++++++
Average round trip time: 0.033425
srfsh#
The first argument is how many sets of 4 queries (+ - * /) are sent to opensrf.math. When the response is successful, you will see the string of "+" symbols. If the system is not running correctly, you will either get an exception or no result at all.For other srfsh commands, type 'help' in at the prompt.If this does not work, try the troubleshooting steps in the following section.Testing with "settings-tester.pl"As the opensrf user, run the script settings-tester.pl to see if it finds any system configuration problems. Following is sample output generated by executing that script after a successful Evergreen installation: REWORK THIS DIAGRAM TO USE SAME IMAGE STANDARDS AS OTHER CHAPTERS If the output from the script does not help you find the problem, please do not make any further significant changes to your configuration. Follow the steps in the troubleshooting guide, "Troubleshooting".If you have followed the entire set of installation steps listed here closely, you are probably extremely close to a working system. Gather your configuration files and log files and contact the Evergreen development mailing list for assistance before making any drastic changes to your system configuration.Testing the CatalogBy default, the OPAC will live at the URL http://my.domain.com/opac/.Navigate to this URL and the front page of the OPAC should load. There is a basic text entry field with some extra search options. If you have any problems loading this page, check the Apache error logs. If the page loads but does not function correctly, then check for possible javascript errors. We hightly reccommend testing with the Firefox browser because of the helpful javascript debugging tools.Assuming that the OPAC is functioning and there is data in your database, you can now perform other simple functional tests (e.g., searching the catalog). ADD OTHER SIMPLE FUNCTIONAL TESTS Running the Evergreen Staff ClientRun the Evergreen Staff Client by using the application XULRunner (installed automatically and by default with Firefox version 3.0 and later on Ubuntu and Debian distributions).For example, if the source files for the Evergreen installation are in the directory /home/opensrf/Evergreen-ILS-1.6.0.7/, start the Staff Client as follows:Testing the Apache Web ServerOnce you have started Evergreen and confirmed that a basic login attempt works, you can test and start the Apache web server.As the root user, execute the following commands. Note the use of restart to force the new Evergreen modules to be reloaded even if the Apache server is already running. Any problems found with your configuration files should be displayed:Stopping EvergreenAs the opensrf user, stop all Evergreen services by using the following command:You can also stop Evergreen services without the -l flag, but the utility osrf_ctl.sh must know the fully qualified domain name for the system on which it will execute. That hostname may have been specified in the configuration file opensrf.xml, which you configured in a previous step. ADD EXPLANATION FOR CONFIGURING "opensrf.xml" Post-Installation ChoresRemove temporary changes from Apache configuration fileAs the root user, edit the Apache configuration file /etc/apache2/sites-available/eg.conf again and make the following change:Uncomment the line Allow from 10.0.0.0/8, then comment out the line Allow from all. You modified this file in an earlier step as a temporary measure to expedite testing (see the section "Modify the Apache Configuration File" for further information). Those changes must now be reversed in order to deny unwanted access to your CGI scripts from users on other public networks. You must secure this for a public production system.Configure a permanent SSL keyIn a previous step, we used the command openssl to temporarily create a new SSL key for the Apache server. For a public production server you should configure or purchase a signed SSL certificateThe temporary SSL key was only created to expedite testing. You must get a proper SSL certificate for a public production system. ADD EXPLANATION OF HOW TO GET PERMANENT SSL CERTIFICATE Set Up Support For ReportsEvergreen reports are extremely powerful, but some configuration is required. See the section "Reports" for details.Starting the Reporter DaemonOnce the open-ils.reporter process is running and enabled on the gateway, you can start the reporter daemon. That process periodically checks for requests for new reports or scheduled reports and gets them running.As the opensrf user, start the reporter daemon using the following command:You can also specify other options with this utility:--sleep=interval : number of seconds to sleep between checks for new reports to run; defaults to 10--lockfile=filename : where to place the lockfile for the process; defaults to /tmp/reporter-LOCK--concurrency=integer : number of reporter daemon processes to run; defaults to "1"--bootstrap=filename : OpenSRF bootstrap configuration file; defaults to /openils/conf/opensrf_core.xmlStopping the Reporter DaemonTo stop the Reporter daemon, you must kill the process and remove the lockfile. The daemon may have just a single associated process, with a lockfile in the default location.It is possible that several processes are running; see the optional commands in the previous section. As the opensrf user, perform the following commands to stop the Reporter daemon:Installing the Evergreen Staff ClientThe Staff Client is automatically built by default as part of the normal make install process for Evergreen server-side software. See the section "Compile, Link and Install Evergreen" to review the final compile/link/install phase of the default Evergreen build process.Building the Evergreen Staff ClientYou can also build the Staff Client manually by running the make command in the source directory /home/opensrf/Evergreen-ILS-1.6.0.7/Open-ILS/xul/staff_client. The make command accepts a number of options to build special versions of the Staff Client. Following is a list of environment variables that can be passed to make to influence the manual build process:Option STAFF_CLIENT_BUILD_IDThis variable defaults to an automatically generated date/time string during the normal Evergreen server-side software installation process, but you can also specify it manually. The following commands could have been used during the normal build process:You can also manually set the BUILD_ID. The following commands will manually build the Staff Client using a different BUILD_ID.As the opensrf user, change directory to the Staff Client source directory, then set the variable and build the Staff Client:Option STAFF_CLIENT_VERSIONDuring the normal Evergreen server-side software build process this variable is pulled automatically from a README file in the Evergreen source root, but you can also specify it manually. The following commands could have been used during the normal build process:If you manually build the Staff Client, VERSION will default to 0trunk.revision, where revision is either automatically pulled from SVN or an empty string on failure. If you wish to make extensions update automatically then your version needs to conform to the format found in Toolkit Version Format and newer versions need to be "higher" than older versions.You can manually set VERSION. The following commands will manually build the Staff Client using a different VERSION.As the opensrf user, change directory to the Staff Client source directory, then set the variable and build the Staff Client:Option STAFF_CLIENT_STAMP_ID variableDuring the normal Evergreen server-side software build process this variable is generated from STAFF_CLIENT_VERSION, but you can also specify it manually. The following commands could have been used during the normal build process:It is possible to have multiple versions of the Staff Client with different stamps, possibly for different uses or client-side customizations.You can manually set STAMP_ID. The following commands will manually build the Staff Client using a different STAMP_ID.As the opensrf user, change directory to the Staff Client source directory, then set the variable and build the Staff Client:Advanced Build OptionsIn addition to the basic options listed above, there are a number of other options for building the Staff Client. Most are target names for the make utility and require that you build the Staff Client from its source directory. See the following table for a list of possible make target keywords:
Keywords Targets for "make" CommandKeywordDescriptionclientsRun "make win-client", "make linux-client", and "make generic-client" individuallyclient_dirBuild a client directory from the build directory, without doing a rebuild. The same as "copy everything but server/".client_appPrereq "client_dir"; removes "install.rdf" from client directory so an app bundle can't be installed as an extensionclient_extPrereq "client_dir"; remove "application.ini", "autoupdate.js", "standalone_xul_app.js" from client directory so an extension won't break FirefoxextensionPrereq "client_ext"; rewritten to use "client_ext"generic-clientPrereq "client_app"; make an XPI file suitable for use with "xulrunner --install-app""win-xulrunnerPrereq "client_app"; add Windows xulrunner to client buildlinux-xulrunnerPrereq "client_app"; add Linux xulrunner to client buildwin-clientPrereq "win-xulrunner"; build "setup exe" (requires that "nsis" package be installed, will add options for automatic update if configured and developer options if client build was a "make devbuild")linux-clientPrereq "linux_xulrunner"; build a "tar.bz2" bundle of the Linux client[generic | win | linux | extension]-updates[-client]Call external/make_updates.sh to build full and partial updates generic/win/linux/extension prefix limit to that distribution; Adding "-client" builds clients and copies them to a subdirectory of the "updates" directory as well; "extension-updates-client" doesn't exist.
Developer BuildYou can create a so-called "developer build" of the Staff Client by substituting "devbuild" for "build" when running make. The build will contain an extra configuration file that enables some special developer options.As the opensrf user, run make from the Staff Client source directory:Compressed JavascriptYou can automatically run the Google "Closure Compiler" utility to review and compress Javascript code after the build process completes by substituting "compress-javascript" for "build" when running make.As the opensrf user, run the following commands from the Staff Client source directory:You can also combine Javascript review and compression, and also perform a "developer build".As the opensrf user, run the following commands from the Staff Client source directory:Automatic Update HostThe host used to check for automatic Staff Client updates can be overridden by specifying the AUTOUPDATE_HOST option. The following commands could have been used during the normal build process:You can manually set AUTOUPDATE_HOST. The following commands will manually build the Staff Client using a different AUTOUPDATE_HOST.As the opensrf user, change directory to the Staff Client source directory, then set the variable and build the Staff Client:For more information see the section "Automatic Updates".Installing and Activating the Staff ClientThe Staff Client is automatically built, installed and activated as part of the normal make install process for Evergreen server-side software. However, if you manually build the Staff Client from its source directory, then you need to take additional steps to install and active it.Assuming you have already built the Staff Client, and that your installation is in the directory /openils/var/web/xul, as the opensrf user, change directory to the Staff Client source directory, then execute the following commands:Packaging the Staff ClientOnce the Staff Client has been built, you can create several forms of client packages by using some targetted make commands in the Staff Client source directory.Packaging a Generic ClientThis build creates a Staff Client packaged as an XPI file suitable for use with XULRunner.This special build requires that you already have the "zip" utility installed on your system. It will create the output file "evergreen_staff_client.xpi", suitable for use with the XULRunner parameter --install-app.As the opensrf user, change directory to the Staff Client source directory, then execute the following commands:Packaging a Windows ClientThis build creates a Staff Client packaged as a Windows executableThis special build requires that you already have the "zip" utility installed on your system. It also requires that you install NSIS (Nullsoft Scriptable Install System), a professional open source utility package used to create Windows installers (the "makensis" utility is installed as part of the "nsis" package). We recommend using Version 2.45 or later. The output file "evergreen_staff_client_setup.exe" will be created.(OPTIONAL) If you wish for the Staff Client to have a link icon/tray icon by default, you may wish to provide a pre-modified xulrunner-stub.exe. Place it in the Staff Client source directory and make will automatically use it instead of the one that comes with the downloaded XULRunner release. The version of xulrunner-stub.exe need not match exactly.You can also use a tool such as Resource Hacker to embed icons. "Resource Hacker" is an open-source utility used to view, modify, rename, add, delete and extract resources in 32bit Windows executablesAs the opensrf user, change directory to the Staff Client source directory, then execute the following commands:Packaging a Linux ClientThis build creates a Staff Client package for Linux as a "tar.bz2" file with XULRunner already bundled with it. The output file "evergreen_staff_client.tar.bz2" will be created.As the opensrf user, change directory to the Staff Client source directory, then execute the following commands:Packaging a Firefox ExtensionThis special build requires that you already have the "zip" utility installed on your system. This build creates a Staff Client packaged as a Firefox extension. The output file "evergreen.xpi" will be created.As the opensrf user, change directory to the Staff Client source directory, then execute the following commands:Automatic UpdatesIt is possible to set up support for automatic Staff Client updates, either during the normal Evergreen server-side build process, or by later building the Staff Client with certain special options.Automatic update server certificate requirements are more strict than normal server requirements. Firefox and XULRunner will both ignore any automatic update server that is not validated by a trusted certificate authority. Servers with exceptions added to force the Staff Client to accept them WILL NOT WORK.In addition, automatic updates have special requirements for the file update.rdf:It must be served from an SSL server, orIt must be signed with the utility McCoy.You can pre-install the signing key into the file install.rdf directly, or install it into a copy as install.mccoy.rdf. If the latter exists it will be copied into the build instead of the original file install.rdf.The name of the automatic update host can be provided in either of two ways:At configuration time for the Evergreen server-side software, orDuring the Staff Client build processSpecifying the Automatic Update HostAt configuration time for the Evergreen server-side softwareThis must be done when the Evergreen server-side software is first configured (see the section "Configure Evergreen" ). As the opensrf user, use the utility "configure" as shown:During the Staff Client build processYou will used the variable AUTOUPDATE_HOST=hostname (see above). If you specify just a hostname (such as "example.com") then the URL will be a secure HTTPS URL (such as "https://example.com"). If you wish to use a non-HTTPS URL then prefix the hostname with "http://". (such as "http://example.com").If neither option is used then, by default, the Staff Client will not include the automatic update preferences.Building UpdatesSimilar to building clients, the targets "generic-updates", "win-updates", "linux-updates", and "extension-updates" can be used individually with make to build the update files for the Staff Client. To build all the targets at once, simply use the target "updates".A "full" update will be built for each specified target (or for all if the target "updates" is used). For all but extensions any previous "full" updates (archived by default in the directory /openils/var/updates/archives) will be used to make "partial" updates. Partial updates tend to be much smaller and will thus download more quickly, but if something goes wrong with a partial update the full update will be used as a fallback. Extensions do not currently support partial updates.As the opensrf user, change directory to the Staff Client source directory, then execute the following commands:Building updates with "-client"To save time and effort you can build updates and manual download clients at the same time by adding the string "-client" to each target name (for instance, you can specify "win-updates-client"). You can also specify "updates-client" to build all the targets at once. This does not work for extension-updates.The clients will be installed alongside the updates and listed on the "manualupdate.html" page, rather than left in the Staff Client directory.As the opensrf user, change directory to the Staff Client source directory, then execute the following commands:Activating the Update ServerThis section reviews scripts associated with the update server, and requires some final adjustments to file permissions.The Apache example configuration creates an "updates" directory that, by default, points to the directory /openils/var/updates/pub. This directory contains one HTML file and several specially-named script filesThe "updatedetails.html" file is the fallback web page for the update details. The "check" script is used for XULRunner updates. The "update.rdf" script is used for extension updates. The "manualupdate.html" script checks for clients to provide download links when automatic updates have failed and uses the download script to force a download of the generic client xpi (compared to Firefox trying to install it as an extension).As the root user, change directory to the updates directory, then execute the following commands:The following scripts should be marked as executable: check, download, manualupdate.html, update.rdf.Other tipsMultiple workstations on one installMultiple workstation registrations for the same server can be accomplished with a single Staff Client install by using multiple profiles. When running XULRunner you can specify the option "-profilemanager" or "-P" (uppercase "P") to force the Profile Manager to start. Unchecking the "Don't ask at startup" option will make this the default.Once you have opened the Profile Manager you can create additional profiles, one for each workstation you wish to register. You may need to install SSL exceptions for each profile.When building targets "win-client", "win-updates-client", or "updates-client", you can specify "NSIS_EXTRAOPTS=-DPROFILES" to add an "Evergreen Staff Client Profile Manager" option to the start menu.As the opensrf user, change directory to the Staff Client source directory, then execute the following commands: Multiple Staff ClientsThis may be confusing if you are not careful, but you can log in to multiple Evergreen servers at the same time, or a single Evergreen server multiple times. In either case you will need to create an additional profile for each additional server or workstation you want to log in as (see previous tip).Once you have done so, run XULRunner with the option "-no-remote" (in addition to "-profilemanger" or "-P" if neeeded). Instead of XULRunner opening a new login window on your existing session it will start a new session instead, which can then be logged in to a different server or workstation ID.Running the Evergreen Staff ClientADD CONTENT: LINUX VS WINDOWS STAFF CLIENTRun the Evergreen Staff Client on a Linux system by using the application XULRunner (installed automatically and by default with Firefox version 3.0 and later on Ubuntu and Debian distributions).For example, if the source files for the Evergreen installation are in the directory /home/opensrf/Evergreen-ILS-1.6.0.7/, start the Staff Client as shown in the following command example:Installing Evergreen On Other Linux Systems ADD CONTENT FOR INSTALLING ON OTHER LINUX SYSTEMS Installing Evergreen in Virtualized Unix EnvironmentsEvergreen software currently runs as a native application on any of several well-known Linux distributions (e.g., Ubuntu and Debian). It does not run as a native application on the Windows operating system (e.g., WindowsXP, WindowsXP Professional, Windows7), but the software can be installed and run on Windows via a virtualized Unix-guest Operating System (using, for example, VirtualBox or VMware to emulate a Linux environment). ADD CONTENT FOR INSTALLING EVERGREEN IN VIRTUALIZED UNIX ENVIRONMENTS VirtualBox ADD CONTENT FOR VirtualBox VMware ADD CONTENT FOR VMware VirtualPC ADD CONTENT FOR VirtualPC Installing Previous Versions of EvergreenEarlier releases of Evergreen are available. Instructions for installing, configuring and testing earlier versions are found below.The next most recent previous release of Evergreen is version 1.4.0.6. The accompanying previous release of OpenSRF is version 1.0.x.Installing Evergreen 1.4.0.6 on Ubuntu or Debian ADD CONTENT FOR INSTALLING EVERGREEN 1.4.0.6 ON UBUNTU OR DEBIAN Installing OpenSRF 1.0.x ADD CONTENT FOR INSTALLING OPENSRF 1.0.x Installing PostgreSQL ADD CONTENT FOR POSTGRESQL ApacheSecuring Apache (httpd)The main consideration is to secure the directory cgi-bin. The only persons that need access to this directory are Evergreen system administrators. This directory should be restricted by both IP (to those workstations designated as Evergeen Administration systems), and by username/password. ADD CONTENT ON HOW TO RESTRICT APACHE BY IP AND USERNAME/PASSWORD A user could add new libraries, re-arrange consortia, or change user groups; or a staff member could access the directory, and change his associated security group to administrative level privileges. ADD MORE CONTENT FOR APACHE memcached Servers ADD CONTENT FOR MEMCACHED Organization and Policy EditingAfter installing Evergreen, you will want to make configuration changes to reflect the organizational hierarchy and the policies of your library or libraries. See the section "Organizational Unit Types and Organizational Units" for further information. Examples of what can be configured include:Adding a branch libraryChanging circulation rules for an existing libraryAdding a new staff position or user group ADD CONTENT FOR ORGANIZATION AND POLICY EDITING Installing the SIP Server ADD CONTENT FOR INSTALLING THE SIP SERVER Using nginx to serve static content ADD CONTENT FOR USING NGINX TO SERVE STATIC CONTENT (OPTIONAL) Configuration for Other LanguagesThis section describes how translations such as Armenian (hy-AM), Canadian French (fr-CA) and others are loaded into the database to complete the translations (default English) available in the OPAC and Staff Client. ADD SECTION ON LANGUAGE LOCALIZATION