From c3450b7dc8cd9289ecab77c22a322abd53d76e1f Mon Sep 17 00:00:00 2001 From: Steve Sheppard Date: Fri, 1 Oct 2010 16:03:21 -0400 Subject: [PATCH] fix typo in labels for two tables; --- 1.6/admin/ServersideInstallation.xml | 2781 ++++++++++++-------------- 1 file changed, 1328 insertions(+), 1453 deletions(-) diff --git a/1.6/admin/ServersideInstallation.xml b/1.6/admin/ServersideInstallation.xml index d1f4d75e73..3984da73ee 100644 --- a/1.6/admin/ServersideInstallation.xml +++ b/1.6/admin/ServersideInstallation.xml @@ -1,1453 +1,1328 @@ - - - - Server-side Installation of Evergreen Software - - This 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. - - - Installing, configuring and testing the Evergreen server-side software is straightforward with the current stable software release. See - for instructions tailored to installing on some particular distributions of the Linux - operating system. Earlier software distributions are described in . - 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 Microsoft 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 Linux-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 . - Installation of the Evergreen Staff Client software is reviewed in . - The 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: - - Evergreen Software Dependencies - - - - - - - Evergreen - OpenSRF - PostgreSQL - - - - - 1.6.x - 1.2 - 8.2 / 8.3 - - - 1.4.x - 1.0 - 8.1 / 8.2 - - - 1.2.x - 0.9 - 8.1 / 8.2 - - - -
-
- Installing Server-Side Software - This 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 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 1.2.2 On <systemitem class="osname">Ubuntu</systemitem> or <systemitem class="osname">Debian</systemitem> - This 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.2 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 the root 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 User - As 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: - - useradd -m -s /bin/bash opensrf - passwd opensrf - - - - Download and Unpack Latest OpenSRF Version - As the opensrf user, download and extract the latest version of OpenSRF. The latest version can be found here: - - - wget http://evergreen-ils.org/downloads/OpenSRF-1.2.2.tar.gz - tar zxf OpenSRF-1.2.2.tar.gz - - The new directory /home/opensrf/OpenSRF-1.2.2 will be created. - - - Install Prerequisites to Build OpenSRF - In 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 distribution - keywordstable. - - cd /home/opensrf/OpenSRF-1.2.2 - make -f src/extras/Makefile.install [DISTRIBUTION] - - - Keywords Targets for <application>"make"</application> Command - - - - - - Keyword - Description - - - - - debian-lenny - for Debian Lenny (5.0) - - - debian-etch - for Debian Etch (4.0) - - - ubuntu-karmic - for Ubuntu Karmic (9.10) - - - ubuntu-intrepid - for Ubuntu Jaunty (9.04) or Intrepid (8.10) - - - ubuntu-hardy - for Ubuntu Hardy (8.04) - - - -
- - ZZZ-REVIEW - ADD INFO FOR OTHER LINUX DISTRIBUTIONS - - 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 OpenSRF - As the opensrf user, return to the OpenSRF build directory and use the configure - utility to prepare for the next step of compiling and linking the software. You can include the and - configuration options if you wish to include support for Python and Java, respectively: - - cd /home/opensrf/OpenSRF-1.2.2 - ./configure --prefix=/openils --sysconfdir=/openils/conf - make - - - - Compile, Link and Install OpenSRF - As the root user, return to the OpenSRF build directory and use the make utility to compile, - link and install OpenSRF: - - cd /home/opensrf/OpenSRF-1.2.2 - make install - - - - Update the System Dynamic Library Path - As the root user, you must update the system dynamic library path to make your system recognize the newly - installed libraries. Do this by creating the new file /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: - - echo "/openils/lib" > /etc/ld.so.conf.d/osrf.conf - ldconfig - - - - Define Public and Private OpenSRF Domains - Define 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 host names 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: - -127.0.1.2 public.localhost public -127.0.1.3 private.localhost private - - - - Change File Ownerships - As the root user, change the ownership of files installed in the directory - /openils to the opensrf user: - - chown -R opensrf:opensrf /openils - - - - Stop the <systemitem class="service">ejabberd</systemitem> Service - As the root user, stop the ejabberd service: - -$ /etc/init.d/ejabberd stop - - If ejabberd eeports 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 configuration file /etc/ejabberd/ejabberd.cfg to hardcode a - domain: - - epmd -kill - killall beam; killall beam.smp - rm /var/lib/ejabberd/* - echo 'ERLANG_NODE=ejabberd@localhost' >> /etc/default/ejabberd - - - - Edit the <systemitem class="service">ejabberd</systemitem> configuration - As 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 <systemitem class="service">ejabberd</systemitem> service - As the root user, restart the ejabberd service to test the configuration - changes and to register your users: - - /etc/init.d/ejabberd start - - - - Register <systemitem class="username">router</systemitem> and <systemitem class="username">ejabberd</systemitem> users - On 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 examples - - As the root user, use the ejabberdctl utility 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. The syntax for registering a user with ejabberdctl is ejabberdctl register <user> <domain> <password> - These users will correspond to those configured in the file /openils/conf/opensrf_core.xml: - - ejabberdctl register router private.localhost <password> - ejabberdctl register opensrf private.localhost <password> - ejabberdctl register router public.localhost <password> - ejabberdctl register opensrf public.localhost <password> - - - - Create configuration files - As the opensrf user, use the example templates to create the configuration files - /openils/conf/opensrf_core.xml and /openils/conf/opensrf.xml: - - cd /openils/conf - cp opensrf.xml.example opensrf.xml - cp opensrf_core.xml.example opensrf_core.xml - - - - Edit opensrf_core.xml - Edit 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 approximate position needing changes within the XML - file. - - - /config/opensrf/username = opensrf - /config/opensrf/passwd = password for private.localhostopensrf user - /config/opensrf/passwd = password for private.localhostopensrf user - /config/gateway/username = opensrf - /config/gateway/passwd = password for public.localhostopensrf user - /config/routers/router/transport (first entry, where - transport/server ==public.localhost) - - username = router - password = password for public.localhostrouter - user - - /config/routers/router/transport (second entry, where - transport/server == private.localhost) - - username = router - password = password for private.localhostrouter - user - - 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 <filename>opensrf.xml</filename> - As the opensrf user, edit the file /openils/conf/opensrf.xml to set the location of the - persistent database in the dbfile element near the end of the file: - - - - /tmp/persist.db - - -]]> - - - Create Configuration Files for Users Needing <command>srfsh</command> - In this section you will set up a special configuration file for each user who will need to run the srfsh - (pronounced surf shell) utility. - The software installation will automatically create srfsh. This is a command line diagnostic tool for testing and interacting with - OpenSRF. It will be used in a future step to complete and test the Evergreen installation. - See 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 - domain - Modify logfile to be the full path for a log file to which the user has write access - Modify loglevel as needed for testing - - - - - -router -private.localhost -opensrf -privsrf -5222 -/tmp/srfsh.log - -4 - -]]> - - - Modify Environmental Variable PATH for <systemitem class="username">opensrf</systemitem> User - As the opensrf user, modify the environmental variable PATH by adding a new file path to - the opensrf user's shell configuration file .bashrc: - - echo "export PATH=/openils/bin:\$PATH" >> ~/.bashrc - - - - Start OpenSRF - As the root user, start the ejabberd and - memcached services: - - /etc/init.d/ejabberd start - /etc/init.d/memcached start - - Finally, as the opensrf user, start OpenSRF: - - start the OpenSRF service: - use "-l" to force hostname to be "localhost" - osrf_ctl.sh -l -a start_all - - - If you receive the error message bash: osrf_ctl.sh: command not found, then your environment variable PATH does - not include the /openils/bin directory; - this should have been set by .bashrc when you logged in as the opensrf user, but you - can manually set it using the following command: - - export PATH=$PATH:/openils/bin - - - You can also start Evergreen without the 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. - - - Test connections to OpenSRF - Once you have installed and started OpenSRF, as the root user, test your connection to - OpenSRF - using the srfsh utility and trying to call the add method on the OpenSRF - math service: - /openils/bin/srfshsrfsh# request opensrf.math add 2 2 -Received Data: 4 ------------------------------------- -Request Completed Successfully -Request Time in seconds: 0.007519 ------------------------------------- -srfsh# - For other srfsh commands, type help in at the prompt. - - - Stopping OpenSRF - As the opensrf user, stop OpenSRF: - - osrf_ctl.sh -l -a stop_all - - -
-
-
- Installing Evergreen 1.6.0.7 On <systemitem class="osname">Ubuntu</systemitem> or <systemitem class="osname">Debian</systemitem> - This section outlines the installation process for the latest stable version of Evergreen. - 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 the root 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. - - - - Install OpenSRF - Evergreen 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 . - 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 Version - As the opensrf user, download and extract the latest version of Evergreen. The latest version can be found here: - - - wget http://evergreen-ils.org/downloads/Evergreen-ILS-1.6.0.7.tar.gz - tar zxf Evergreen-ILS-1.6.0.7.tar.gz - - The new directory /home/opensrf/Evergreen-ILS-1.6.0.7 will be created. - - - Install Prerequisites to Build Evergreen - In 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 - distribution keywords table. - - cd /home/opensrf/Evergreen-ILS-1.6.0.7 - make -f Open-ILS/src/extras/Makefile.install [distribution] - - - - - - - - Keyword - Description - - - - - debian-lenny - for Debian Lenny (5.0), the most recent version - - - debian-etch - for Debian Etch (4.0) - - - ubuntu-karmic - for Ubuntu Lucid (10.04) [same as for Karmic] - - - ubuntu-karmic - for Ubuntu Karmic (9.10) - - - ubuntu-intrepid - for Ubuntu Intrepid (8.10) - - - ubuntu-hardy - for Ubuntu Hardy (8.04) - - - ubuntu-gutsy - for Ubuntu Gutsy (7.10) - - - gentoo - generic for Gentoo versions - - - centos - generic for Centos versions - - - -
- - ZZZ-REVIEW - ADD INFO FOR OTHER LINUX DISTRIBUTIONS - - ADD INFO FOR OTHER LINUX DISTRIBUTIONS -
- - (OPTIONAL) Install the PostgreSQL Server - Since 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 manually installing PostgreSQL, visit the PostgreSQL Site. - 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: - - su - root - - For Debian Lenny and Ubuntu Hardy (8.04): - - make -f Open-ILS/src/extras/Makefile.install install_pgsql_server_debs_83 - - For Ubuntu Karmic (9.10) and Ubuntu Lucid (10.04): - - make -f Open-ILS/src/extras/Makefile.install install_pgsql_server_debs_84 - - - Postgresql 8.3 or 8.4 are the recommended versions to work with Evergreen 1.6. If you have an older version of PostgreSQL, you should upgrade before - installing Evergreen. To find the running version of PostgreSQL, switch to the postgres user and run the - psql. Then type SELECT version(); to get detailed information of your version of PostgreSQL. - - - - Install Perl Modules on PostgreSQL Server - If 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: - ensure the gcc compiler is installed: - - apt-get install gcc - - install the Perl modules - perl -MCPAN -e shellcpan> install JSON::XScpan> install MARC::Recordcpan> install MARC::File::XML - For more information on installing Perl Modules vist the CPAN site. - - - Update the System Dynamic Library Path - As the root user, you must update the system dynamic library path to make your system recognize the newly - installed libraries. Do this by creating the new file /etc/ld.so.conf.d/eg.conf containing two new library path. - Create a file named /etc/ld.so.conf.d/eg.conf containing the following lines: - -/usr/local/lib -/usr/local/lib/dbd - - Then run the command ldconfig to automatically read the file and modify the system dynamic library path: - - ldconfig - - - - Restart the PostgreSQL Server - If PostgreSQL is running on the same system as the rest of Evergreen, as the root user you must restart - PostgreSQL. If PostgreSQL is running on another system, you may skip this step. - - /etc/init.d/postgresql-[PGSQL_VERSION] restart - - Where PGSQL_VERSION is your installed PostgreSQL version (e.g. 8.3). - - - Configure Evergreen - As the opensrf user, return to the Evergreen build directory and use the configure utility to - prepare for the next step of compiling and linking the software: - - cd /home/opensrf/Evergreen-ILS-1.6.0.7 - ./configure --prefix=/openils --sysconfdir=/openils/conf - make - - - - Compile, Link and Install Evergreen - In 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 utility 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 . - - cd /home/opensrf/Evergreen-ILS-1.6.0.7 - make STAFF_CLIENT_BUILD_ID=rel_1_6_0_7 install - - The above commands will create a new subdirectory /openils/var/web/xul/rel_1_6_0_7 containing the 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 subdirectory - /server of the new Staff Client build: - - cd /openils/var/web/xul - ln -sf rel_1_6_0_7/server server - - - - Copy the OpenSRF Configuration Files - As 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 opensrf user: - - cp /openils/conf/opensrf.xml.example /openils/conf/opensrf.xml - cp /openils/conf/opensrf_core.xml.example /openils/conf/opensrf_core.xml - cp /openils/conf/oils_web.xml.example /openils/conf/oils_web.xml - chown -R opensrf:opensrf /openils/ - - - - Create and Configure PostgreSQL Database - As 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 database - - As the postgres user on the PostgreSQL system create the PostgreSQL database, then set some internal - paths: - Create the database: - - createdb -E UNICODE evergreen - createlang plperl evergreen - createlang plperlu evergreen - createlang plpgsql evergreen - - Adjust the paths: - - psql -f /usr/share/postgresql/PGSQL_VERSION/contrib/tablefunc.sql evergreen - psql -f /usr/share/postgresql/PGSQL_VERSION/contrib/tsearch2.sql evergreen - psql -f /usr/share/postgresql/PGSQL_VERSION/contrib/pgxml.sql evergreen - - Where PGSQL_VERSION is your installed PostgreSQL version (e.g. 8.3). - - - Create a new Evergreen superuser - As the postgres user on the PostgreSQL system, create the new database - evergreen user and assign a password: - - createuser -P -s evergreen - - Enter the password twice for new role when prompted. - - - Create Database Schema - As the root user, create the database schema and configure your system with the corresponding - database authentication details for the evergreen database user that you created in the previous step. - Enter the following commands and replace HOSTNAME, PORT, PASSWORD and DATABASENAME with appropriate - values. - - cd /home/opensrf/Evergreen-ILS-1.6.0.7 - perl Open-ILS/src/support-scripts/eg_db_config.pl --update-config \ - --service all --create-schema --create-bootstrap --create-offline \ - --hostname HOSTNAME --port PORT \ - --user evergreen --password PASSWORD --database DATABASENAME - - On most systems, HOSTNAME will be localhost, PORT will be - 5432, and PASSWORD and DATABASENAME will be - evergreen. - - 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. - - - - Modify the Apache configuration files for the Evergreen site. - - - Enable some built-in Apache modules with the utility a2enmod, and install some additional Apache - configuration files. As the root user, enable some modules in the Apache server, then copy - the new configuration files to the Apache server directories: - Enable the required Apache Modules: - - a2enmod ssl # enable mod_ssl - a2enmod rewrite # enable mod_rewrite - a2enmod expires # enable mod_expires - cd /home/opensrf/Evergreen-ILS-1.x.x.x - - - - Copy the Apache configuration files from the Evergreen installation dierectory: - - cp Open-ILS/examples/apache/eg.conf /etc/apache2/sites-available/ - cp Open-ILS/examples/apache/eg_vhost.conf /etc/apache2/ - cp Open-ILS/examples/apache/startup.pl /etc/apache2/ - - - - Create a new Security Certificate (SSL Key) for the Apache server with the command openssl. 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: - - mkdir /etc/apache2/ssl - cd /etc/apache2/ssl - openssl req -new -x509 -days 365 -nodes -out server.crt -keyout server.key - - - This generates a self-signed SSL certificate. You should acquire a proper SSL certificate for a public - production system to avoid warning messages when users login to their account through the OPAC or when staff - login through the staff client. - For further information on getting a proper SSL certificate, see . - - - - Several changes are needed in the new Apache configuration file /etc/apache2/sites-available/eg.conf. - As the root user, edit the file and make the following changes: - - - Comment out the line Listen 443, since it conflicts with the same declaration in the configuration - file: /etc/apache2/ports.conf. Debian Etch users should not - do this since the conflict does not apply to that OS. - - - For the Linux distributions - Ubuntu Hardy - or Debian Etch, as the root user, edit the - Apache configuration file /etc/apache2/apache2.conf and change User www-data to - 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 line export APACHE_RUN_USER=www-data to export APACHE_RUN_USER=opensrf. - - The following updates are needed to allow the logs to function properly, but it may break other Apache applications - on your server. - - - - - As the root user, edit the Apache configuration file - /etc/apache2/apache2.conf and add the lines KeepAliveTimeout 1 and - MaxKeepAliveRequests 100, or modify any existing lines. - - - - - Performance Modifications for Apache - Some 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. - - StartServers 20 - MinSpareServers 5 - MaxSpareServers 15 - MaxClients 150 - MaxRequestsPerChild 10000 - -]]> - - - Finally, as the root user, execute the following Apache configuration commands to disable the default - It Works web page and to enable the Evergreen web site: - - a2dissite default - a2ensite eg.conf - - - - - - Modify the OpenSRF Configuration File - As 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: - /config/opensrf/username = opensrf - /config/opensrf/passwd = password for private.localhostopensrf user - /config/gateway/username = opensrf - /config/gateway/passwd = password for public.localhostopensrf user - /config/routers/router/transport (first entry, where transport/server == public.localhost) - - username = router - password = password for public.localhost router - user - - /config/routers/router/transport (second entry, where transport/server == private.localhost) - - username = router - password = password for private.localhost router - user - - - - Create Configuration Files for Users Needing <command>srfsh</command> - The 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 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 domain. - - - Modify logfile to be the full path for a log file to which the user has write access. - - - Modify loglevel as needed for testing. - - - - - - -router -private.localhost -opensrf -evergreen -5222 -/tmp/srfsh.log - -4 - -]]> - - - Modify the OpenSRF Environment - Modify the shell configuration file ~/.bashrc for opensrf by adding a Perl environmental - variable and 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. - - - - echo "export PERL5LIB=/openils/lib/perl5:\$PERL5LIB" >> ~/.bashrc - . ~/.bashrc - - - - Start Evergreen - - - As the root user, start the ejabberd and - memcached services (if they are not already running): - - /etc/init.d/ejabberd start - /etc/init.d/memcached start - - - - As the opensrf user, start Evergreen. - Use the flag to force Evergreen to use localhost - (your current system) as the hostname. - Using the option will start the OpenSRF router , - Perl , and C services: - $ osrf_ctl.sh -l -a start_all - - - You can also start Evergreen without the flag, but the - osrf_ctl.sh utility 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. - - Use the hostname command to determine the fully qualified domain name of your system. - - - - 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/bin - - - 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/perl5 - - - - - As the opensrf user, generate the Web files needed by the Staff Client and catalog, - 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 making any changes to the library hierarchy. - cd /openils/bin./autogen.sh -c /openils/conf/opensrf_core.xml -u -Updating Evergreen organization tree and IDL using '/openils/conf/opensrf_core.xml' -Updating fieldmapper - - - - As the root user, restart the Apache Web server: - /etc/init.d/apache2 restart - - 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 Installation - This 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 Evergreen - Once you have installed and started Evergreen, test your connection to Evergreen. As the opensrf user start - the srfsh application 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: - /openils/bin/srfshsrfsh% login admin open-ils -Received Data: "250bf1518c7527a03249858687714376" ------------------------------------- -Request Completed Successfully -Request Time in seconds: 0.045286 ------------------------------------- -Received Data: { - "ilsevent":0, - "textcode":"SUCCESS", - "desc":" ", - "pid":21616, - "stacktrace":"oils_auth.c:304", - "payload":{ - "authtoken":"e5f9827cc0f93b503a1cc66bee6bdd1a", - "authtime":420 - } -} ------------------------------------- -Request Completed Successfully -Request Time in seconds: 1.336568 ------------------------------------- - - 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 test fails or you have any other problems during installation, refer to the chapter. - -
-
- Installing In Virtualized <systemitem class="osname">Linux</systemitem> Environments - This section describes the installation of Evergreen software in so-called "virtualized" software environments. Evergreen software runs as a native application on any of several well-known x86 (32-bit) and x86-64 (64-bit) Linux distributions including Ubuntu and Debian but it does not run as a native application on the Microsoft Windows operating system. However, it is possible to execute Evergreen on a Windows host system by running it within a virtual Linux-guest installation, which itself executes on the Windows system. The Linux environment is fully emulated and acts (within limits) just as if it were executing on a real standalone system. - This technique of emulating a Linux environment on a Windows host is a practical way to install and run an Evergreen system if it is not possible to dedicate a physical machine solely as a Linux host for Evergreen. This architecture is not recommended for large scale systems since there are performance limitations to running Evergreen in a virtualized environment. However, it is a reasonable architecture for smaller experimental systems, as a proof of concept, or as a conference-room pilot. - - Installing Virtualization Software - As described above, Evergreen can be installed on top of an emulated Linux environment. The Linux environment, in turn, is installed on top of a software application such as "VirtualBox", "VMware" or "VirtualPC" which must first be installed on the Windows system. This section contains step-by-step examples that show installing popular virtualization applications on a Windows host system. Following this section are further descriptions of installing Linux and Evergreen systems using that virtualization software. -
- Installing <application>"VirtualBox"</application> Virtualization Software - This section reviews installation of the "VirtualBox" application on WindowsXP Professional (SP2). Download VirtualBox from their official website: http://download.virtualbox.org/virtualbox/3.2.8/VirtualBox-3.2.8-64453-Win.exe, then run the executable file. Continue with the steps shown in the next five figures until the software has been successfully installed: -
- Starting the Windows installation file - - - - - -
-
- Welcome to <application>VirtualBox</application> setup wizard - - - - - -
-
- Accept the license agreement - - - - - -
-
- Waiting for files to be copied - - - - - -
-
- Installation is complete - - - - - -
-
-
- Installing <application>"VMware"</application> Virtualization Software - This section reviews installation of the "VMware" application on WindowsXP Professional (SP2). Download VMware from their official website: link, then run the executable file. Continue with the steps shown in the figures until the software has been successfully installed: -
- Starting the Windows installation file - - - - - -
- - ZZZ-REVIEW - ADD INFO ON VMWARE - - ADD INFO ON VMWARE - At this point, VirtualBox has been installed, started for the first time, and a new virtual machine (VM) has been created. This VM is the environment in which the Linux / Evergreen installation will execute. Please continue in with the installation of the Linux / Evergreen distribution. -
-
- Installing <application>"VirtualPC"</application> Virtualization Software - This section reviews installation of the "VirtualPC" application on WindowsXP Professional (SP2). Download VMware from their official website: link, then run the executable file. Continue with the steps shown in the figures until the software has been successfully installed: -
- Starting the Windows installation file - - - - - -
- - ZZZ-REVIEW - ADD INFO ON VIRTUALPC - - ADD INFO ON VIRTUALPC - At this point, VirtualBox has been installed, started for the first time, and a new virtual machine (VM) has been created. This VM is the environment in which the Linux / Evergreen installation will execute. Please continue in with the installation of the Linux / Evergreen distribution. -
-
- - Installing <systemitem class="osname">Linux</systemitem> / Evergreen on Virtualization Software - After the virtualization software is installed and running, there are two ways to continue with installing Linux and Evergreen software in the new virtualized environment: - - - Download and install a prebuilt software image that contains a working Linux / Evergreen system (see for details) - - - Manually install a Linux guest system, then manually install Evergreen on it (see for details) - - - We review each method in the following sections. -
- Download and install a prebuilt software image - You can download a prebuilt software image that, when installed with your virtualization software, emulates a Linux guest system containing a running Evergreen distribution. The image is essentially a snapshot of a hard disk from a fully configured, functional Linux system with Evergreen already installed. - We recommend this approach if you wish to get Evergreen running quickly with minimal attention to configuration. After reviewing only a few configuration details you can have a working Evergreen system that integrates smoothly with the rest of your network. See for a list of prebuilt software images that are currently available to download and install - DISCLAIMER: The following virtual images have been contributed by members of the Evergreen community for the purposes of testing, evaluation, training, and development. - - Linux / Evergreen Virtual Images - - - - Linux Version - Evergreen Version - Image - Comments - - - - - Debian lenny (5.0) - 1.6.0.1 - - download - - VirtualBox image - - - Ubuntu karmic koala (9.10) - 1.6.0.0 - - download - - VirtualBox image - - - Ubuntu hardy heron (8.04) - 1.2.3.1 - - download - - VirtualBox image; no preloaded data - - - Debian etch (4.0) - 1.2.2.3 - - download - - VMware image; preloaded with 13,000 Gutenberg records - - - Ubuntu gutsy gibbon (7.10) - 1.2.1.4 - - download - - VMware image - - - Gentoo - 1.1.5 - - download - - VMware image - - - -
- - ZZZ-REVIEW - EXPAND LIST OF OTHER PREBUILT IMAGES - - EXPAND LIST OF OTHER PREBUILT IMAGES - For the following example, we have already installed the VirtualBox application (see for details). Continue with the steps as shown; refer to the accompanying figures for further information: - - Start VirtualBox for the first time and select FileVirtualBox Media ManagerAdd to locate the prebuilt software image just downloaded (the example shows it was extracted from the original .ZIP file into a temporary directory C:\temp). See for details. - After selecting the file, click Open to import it (see for details). - Then click OK to save the selection and return to the VirtualBox Media Manager (see for details). - Click New to start the "Virtual Machine Wizard", then Next to continue and create a new virtual machine (VM) ). - Create a new name for the VM and set the operating system type, then click Next (see ). - Set the memory size (we chose the default value of 512Mb), then click Next (see ). - Edit the Virtual Hard Disk configuration settings; click the radio boxes "Boot Hard Disk" and "Use existing hard disk" and ensure that the disk name "Evergreen1601_DebianLenny.vmdk" is selected. Click Finish to finish the setup (see ). - - Install the VirtualBox Guest Additions (really a required upgrade to VirtualBox) - - ZZZ-REVIEW - ADD INFO ON INSTALLING VIRTUALBOX GUEST ADDITIONS - - ADD INFO ON INSTALLING VIRTUALBOX GUEST ADDITIONS - - Return to VirtualBox and see the summary of the VM just created. Click Start to boot the new VM (see ). - See the start of the Linux boot sequence. Choose "Debian Gnu/Linux, kernel 2.6.26-2-686" from the startup menu and type Enter to start Linux and Evergreen (see ). After some delay you should see the command line prompt: debian-lenny login: . Log in with username root and password evergreen to continue (see ). - - At this point you have a running Linux / Evergreen system. If you need to modify the Evergreen configuration in any way, review the sectons of the standard Evergreen installation instructions in that deal with configuration. -
- Starting <application>VirtualBox</application> for the first time - - - - - -
-
- Selecting the software image in Virtual Media Manager - - - - - -
-
- New software image added to <application>VirtualBox</application> - - - - - -
-
- Creating a new VM - - - - - -
-
- Setting the VM name and OS type - - - - - -
-
- Setting memory size - - - - - -
-
- Setting up the Virtual Hard Disk - - - - - -
-
- Finishing definition of new VM - - - - - -
-
- Summary of the new VM - - - - - -
-
- Selecting VM from startup menu - - - - - -
-
- Starting the new VM - - - - - -
-
- Starting the new VM (continued) - - - - - -
-
- Logging into the new VM - - - - - -
-
-
- Manually install <systemitem class="osname">Linux</systemitem> and Evergreen - You can manually install a Linux guest system and Evergreen on your virtualization software. - We recommend this approach if you need to specially configure either the Linux system or Evergreen itself. This will require a detailed review of both Linux and Evergreen configuration details. You are essentially doing a normal Evergreen installation on a Linux system; it just happens that Linux is running within a virtualized environment. Refer to for information on the normal Evergreen installation, then continue with this section. - For the following example, we have already installed the VirtualBox application (see for details). Continue with the steps as shown; refer to the accompanying figures for further information: - - - Download and install a standard Ubuntu distribution in "VirtualBox". - You can download a software image of a prebuilt Ubuntu distribution and immediately import it into "VirtualBox" , or you can download and install - - - ZZZ-REVIEW - ADD DETAILS ON MANUAL INSTALLATION OF LINUX - - ADD DETAILS ON MANUAL INSTALLATION OF LINUX - - - Start (boot) Ubuntu. - - ZZZ-REVIEW - ADD DETAILS ON VM LINUX BOOT SEQUENCE - - ADD DETAILS ON VM LINUX BOOT SEQUENCE - - - Install Evergreen on Ubuntu. - - ZZZ-REVIEW - ADD DETAILS ON MANUAL INSTALLATION OF EVERGREEN - - ADD DETAILS ON MANUAL INSTALLATION OF EVERGREEN - - - At this point, the Windows system is hosting an Ubuntu system, which itself is hosting the Evergreen distribution. So far as Evergreen is concerned, it is happily executing in a standard Ubuntu environment and behaves exactly as if it were executing on a standalone Ubuntu system. - Of course, there are limitations to how well a virtualized Ubuntu system emulates a real one. The "VirtualBox" application itself consumes memory, and it contributes to the CPU load on the Windows host system. The emulated Ubuntu system will have less available memory and will execute more slowly than if it were a standalone system, therefore Evergreen itself will inherit some limitations from this overall environment. - However, this technique of using a Windows host to emulate a Linux environment is a practical way to install and run an Evergreen system even if it isn't possible to dedicate a real machine solely as a Linux host for testing. This is a reasonable architecture for simple experiments, or as a proof of concept, or as a conference-room pilot. -
-
-
-
- Installing PostgreSQL - In production Evergreen systems, the PostgreSQL database server may reside on the same system on which Evergreen is installed or on another standalone system so, by default, PostgreSQL is not automatically installed along with Evergreen. This section details the steps needed to manually install PostgreSQL on a Ubuntu or Debian system. - If your PostgreSQL server will be on the same system as your Evergreen software, return to the previous section and follow those instructions. Otherwise, to manually install PostgreSQL on a system, continue with the instructions below. - - Some Linux distributions, such as Debian Etch (4.0), do not offer PostgreSQL version 8.2 as an installable package. Before you continue, examine the software dependencies listed in to ensure that your Linux distribution supports the required version of PostgreSQL. - - - - Install the application "stow" on your system if it is not already installed. Issue the following command as the root user: -
- Installing <application>"stow"</application> - - $ apt-get install stow - ... - -
-
- - Download, compile, and install the latest release for PostgreSQL 8.2 (which was version 8.2.12 at the time of this writing). As the root user, follow these steps: -
- Installing PostgreSQL - - $ wget http://wwwmaster.postgresql.org/redir/198/h/source/v8.2.17/postgresql-8.2.17.tar.bz2 - $ tar xzf postgresql-8.2.17.tar.gz - $ cd postgresql-8.2.17 - $ ./configure --with-perl --enable-integer-datetimes --with-openssl --prefix=/usr/local/stow/pgsql - ... - $ make - ... - $ make install - ... - $ cd contrib - $ make - ... - $ make install - $ cd xml2 - $ make - ... - $ make install - $ cd /usr/local/stow - $ stow pgsql - -
-
- - Create the new user postgres to run the PostgreSQL processes. As the root user, execute this command: -
- Adding <systemitem class="username">postgres</systemitem> - - $ adduser postgres - -
-
- - Initialize the database directory and start up PostgreSQL. As the root user, follow these steps: -
- Adding <systemitem class="username">postgres</systemitem> - - $ mkdir -p /usr/local/pgsql/data - $ chown postgres /usr/local/pgsql/data - $ su - postgres - $ initdb -D /usr/local/pgsql/data -E UNICODE --locale=C - $ pg_ctl -D /usr/local/pgsql/data -l /home/postgres/logfile start - -
- - If an error occurs during the final step above, review the path of the home directory for the postgres user. It may be /var/lib/postresql instead of /home/postres. - -
- - The values of several PostreSQL configuration parameters may be changed for enhanced performance. The following table lists the default values and some suggested updates for several useful parameters: - - Suggested configuration values - - - - - - - Parameter - Default - Suggested - - - - - default_statistics_target - 10 - 100 - - - work_mem - 4Mb - 128Mb - - - shared_buffers - 8Mb - 512Mb - - - effective_cache_size - 128Mb - 4Gb - - - -
- - ZZZ-REVIEW - ADD CONTENT ON HOW TO UPDATE POSTRESQL PARAMETERS - - ADD CONTENT ON HOW TO UPDATE POSTRESQL PARAMETERS -
-
-
-
- Installing Apache - - Securing 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. - - ZZZ-REVIEW - ADD CONTENT ON HOW TO RESTRICT APACHE BY IP AND 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. - - - ZZZ-REVIEW - ADD MORE CONTENT FOR APACHE - - ADD MORE CONTENT FOR APACHE -
-
-
+ + + + Server-side Installation of Evergreen Software + + This 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. + + + Installing, configuring and testing the Evergreen server-side software is straightforward with the current stable software release. See + for instructions tailored to installing on some particular distributions of the Linux + operating system. + 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 Microsoft 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 Linux-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 . + Installation of the Evergreen Staff Client software is reviewed in . + The 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: + + Evergreen Software Dependencies + + + + + + + Evergreen + OpenSRF + PostgreSQL + + + + + 1.6.x + 1.2 + 8.2 / 8.3 + + + 1.4.x + 1.0 + 8.1 / 8.2 + + + 1.2.x + 0.9 + 8.1 / 8.2 + + + +
+
+ Installing Server-Side Software + This 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 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 1.2.2 On <systemitem class="osname">Ubuntu</systemitem> or <systemitem class="osname">Debian</systemitem> + This 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.2 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 the root 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 User + As 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: + + useradd -m -s /bin/bash opensrf + passwd opensrf + + + + Download and Unpack Latest OpenSRF Version + As the opensrf user, download and extract the latest version of OpenSRF. The latest version can be found here: + + + wget http://evergreen-ils.org/downloads/OpenSRF-1.2.2.tar.gz + tar zxf OpenSRF-1.2.2.tar.gz + + The new directory /home/opensrf/OpenSRF-1.2.2 will be created. + + + Install Prerequisites to Build OpenSRF + In 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 distribution + keywordstable. + + cd /home/opensrf/OpenSRF-1.2.2 + make -f src/extras/Makefile.install [DISTRIBUTION] + + + Keywords Targets for <application>"make"</application> Command + + + + + + Keyword + Description + + + + + debian-lenny + for Debian Lenny (5.0) + + + debian-etch + for Debian Etch (4.0) + + + ubuntu-karmic + for Ubuntu Karmic (9.10) + + + ubuntu-intrepid + for Ubuntu Jaunty (9.04) or Intrepid (8.10) + + + ubuntu-hardy + for Ubuntu Hardy (8.04) + + + +
+ + ZZZ-REVIEW + ADD INFO FOR OTHER LINUX DISTRIBUTIONS + + 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 OpenSRF + As the opensrf user, return to the OpenSRF build directory and use the configure + utility to prepare for the next step of compiling and linking the software. You can include the and + configuration options if you wish to include support for Python and Java, respectively: + + cd /home/opensrf/OpenSRF-1.2.2 + ./configure --prefix=/openils --sysconfdir=/openils/conf + make + + + + Compile, Link and Install OpenSRF + As the root user, return to the OpenSRF build directory and use the make utility to compile, + link and install OpenSRF: + + cd /home/opensrf/OpenSRF-1.2.2 + make install + + + + Update the System Dynamic Library Path + As the root user, you must update the system dynamic library path to make your system recognize the newly + installed libraries. Do this by creating the new file /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: + + echo "/openils/lib" > /etc/ld.so.conf.d/osrf.conf + ldconfig + + + + Define Public and Private OpenSRF Domains + Define 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 host names 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: + +127.0.1.2 public.localhost public +127.0.1.3 private.localhost private + + + + Change File Ownerships + As the root user, change the ownership of files installed in the directory + /openils to the opensrf user: + + chown -R opensrf:opensrf /openils + + + + Stop the <systemitem class="service">ejabberd</systemitem> Service + As the root user, stop the ejabberd service: + +$ /etc/init.d/ejabberd stop + + If ejabberd eeports 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 configuration file /etc/ejabberd/ejabberd.cfg to hardcode a + domain: + + epmd -kill + killall beam; killall beam.smp + rm /var/lib/ejabberd/* + echo 'ERLANG_NODE=ejabberd@localhost' >> /etc/default/ejabberd + + + + Edit the <systemitem class="service">ejabberd</systemitem> configuration + As 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 <systemitem class="service">ejabberd</systemitem> service + As the root user, restart the ejabberd service to test the configuration + changes and to register your users: + + /etc/init.d/ejabberd start + + + + Register <systemitem class="username">router</systemitem> and <systemitem class="username">ejabberd</systemitem> users + On 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 examples + + As the root user, use the ejabberdctl utility 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. The syntax for registering a user with ejabberdctl is ejabberdctl register <user> <domain> <password> + These users will correspond to those configured in the file /openils/conf/opensrf_core.xml: + + ejabberdctl register router private.localhost <password> + ejabberdctl register opensrf private.localhost <password> + ejabberdctl register router public.localhost <password> + ejabberdctl register opensrf public.localhost <password> + + + + Create configuration files + As the opensrf user, use the example templates to create the configuration files + /openils/conf/opensrf_core.xml and /openils/conf/opensrf.xml: + + cd /openils/conf + cp opensrf.xml.example opensrf.xml + cp opensrf_core.xml.example opensrf_core.xml + + + + Edit opensrf_core.xml + Edit 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 approximate position needing changes within the XML + file. + + + /config/opensrf/username = opensrf + /config/opensrf/passwd = password for private.localhostopensrf user + /config/opensrf/passwd = password for private.localhostopensrf user + /config/gateway/username = opensrf + /config/gateway/passwd = password for public.localhostopensrf user + /config/routers/router/transport (first entry, where + transport/server ==public.localhost) + + username = router + password = password for public.localhostrouter + user + + /config/routers/router/transport (second entry, where + transport/server == private.localhost) + + username = router + password = password for private.localhostrouter + user + + 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 <filename>opensrf.xml</filename> + As the opensrf user, edit the file /openils/conf/opensrf.xml to set the location of the + persistent database in the dbfile element near the end of the file: + + + + /tmp/persist.db + + +]]> + + + Create Configuration Files for Users Needing <command>srfsh</command> + In this section you will set up a special configuration file for each user who will need to run the srfsh + (pronounced surf shell) utility. + The software installation will automatically create srfsh. This is a command line diagnostic tool for testing and interacting with + OpenSRF. It will be used in a future step to complete and test the Evergreen installation. + See 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 + domain + Modify logfile to be the full path for a log file to which the user has write access + Modify loglevel as needed for testing + + + + + +router +private.localhost +opensrf +privsrf +5222 +/tmp/srfsh.log + +4 + +]]> + + + Modify Environmental Variable PATH for <systemitem class="username">opensrf</systemitem> User + As the opensrf user, modify the environmental variable PATH by adding a new file path to + the opensrf user's shell configuration file .bashrc: + + echo "export PATH=/openils/bin:\$PATH" >> ~/.bashrc + + + + Start OpenSRF + As the root user, start the ejabberd and + memcached services: + + /etc/init.d/ejabberd start + /etc/init.d/memcached start + + Finally, as the opensrf user, start OpenSRF: + + start the OpenSRF service: + use "-l" to force hostname to be "localhost" + osrf_ctl.sh -l -a start_all + + + If you receive the error message bash: osrf_ctl.sh: command not found, then your environment variable PATH does + not include the /openils/bin directory; + this should have been set by .bashrc when you logged in as the opensrf user, but you + can manually set it using the following command: + + export PATH=$PATH:/openils/bin + + + You can also start Evergreen without the 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. + + + Test connections to OpenSRF + Once you have installed and started OpenSRF, as the root user, test your connection to + OpenSRF + using the srfsh utility and trying to call the add method on the OpenSRF + math service: + /openils/bin/srfshsrfsh# request opensrf.math add 2 2 +Received Data: 4 +------------------------------------ +Request Completed Successfully +Request Time in seconds: 0.007519 +------------------------------------ +srfsh# + For other srfsh commands, type help in at the prompt. + + + Stopping OpenSRF + As the opensrf user, stop OpenSRF: + + osrf_ctl.sh -l -a stop_all + + +
+
+
+ Installing Evergreen 1.6.0.7 On <systemitem class="osname">Ubuntu</systemitem> or <systemitem class="osname">Debian</systemitem> + This section outlines the installation process for the latest stable version of Evergreen. + 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 the root 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. + + + + Install OpenSRF + Evergreen 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 . + 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 Version + As the opensrf user, download and extract the latest version of Evergreen. The latest version can be found here: + + + wget http://evergreen-ils.org/downloads/Evergreen-ILS-1.6.0.7.tar.gz + tar zxf Evergreen-ILS-1.6.0.7.tar.gz + + The new directory /home/opensrf/Evergreen-ILS-1.6.0.7 will be created. + + + Install Prerequisites to Build Evergreen + In 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 + distribution keywords table. + + cd /home/opensrf/Evergreen-ILS-1.6.0.7 + make -f Open-ILS/src/extras/Makefile.install [distribution] + + + + + + + + Keyword + Description + + + + + debian-lenny + for Debian Lenny (5.0), the most recent version + + + debian-etch + for Debian Etch (4.0) + + + ubuntu-karmic + for Ubuntu Lucid (10.04) [same as for Karmic] + + + ubuntu-karmic + for Ubuntu Karmic (9.10) + + + ubuntu-intrepid + for Ubuntu Intrepid (8.10) + + + ubuntu-hardy + for Ubuntu Hardy (8.04) + + + ubuntu-gutsy + for Ubuntu Gutsy (7.10) + + + gentoo + generic for Gentoo versions + + + centos + generic for Centos versions + + + +
+ + ZZZ-REVIEW + ADD INFO FOR OTHER LINUX DISTRIBUTIONS + + ADD INFO FOR OTHER LINUX DISTRIBUTIONS +
+ + (OPTIONAL) Install the PostgreSQL Server + Since 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 manually installing PostgreSQL, visit the PostgreSQL Site. + 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: + + su - root + + For Debian Lenny and Ubuntu Hardy (8.04): + + make -f Open-ILS/src/extras/Makefile.install install_pgsql_server_debs_83 + + For Ubuntu Karmic (9.10) and Ubuntu Lucid (10.04): + + make -f Open-ILS/src/extras/Makefile.install install_pgsql_server_debs_84 + + + Postgresql 8.3 or 8.4 are the recommended versions to work with Evergreen 1.6. If you have an older version of PostgreSQL, you should upgrade before + installing Evergreen. To find the running version of PostgreSQL, switch to the postgres user and run the + psql. Then type SELECT version(); to get detailed information of your version of PostgreSQL. + + + + Install Perl Modules on PostgreSQL Server + If 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: + ensure the gcc compiler is installed: + + apt-get install gcc + + install the Perl modules + perl -MCPAN -e shellcpan> install JSON::XScpan> install MARC::Recordcpan> install MARC::File::XML + For more information on installing Perl Modules vist the CPAN site. + + + Update the System Dynamic Library Path + As the root user, you must update the system dynamic library path to make your system recognize the newly + installed libraries. Do this by creating the new file /etc/ld.so.conf.d/eg.conf containing two new library path. + Create a file named /etc/ld.so.conf.d/eg.conf containing the following lines: + +/usr/local/lib +/usr/local/lib/dbd + + Then run the command ldconfig to automatically read the file and modify the system dynamic library path: + + ldconfig + + + + Restart the PostgreSQL Server + If PostgreSQL is running on the same system as the rest of Evergreen, as the root user you must restart + PostgreSQL. If PostgreSQL is running on another system, you may skip this step. + + /etc/init.d/postgresql-[PGSQL_VERSION] restart + + Where PGSQL_VERSION is your installed PostgreSQL version (e.g. 8.3). + + + Configure Evergreen + As the opensrf user, return to the Evergreen build directory and use the configure utility to + prepare for the next step of compiling and linking the software: + + cd /home/opensrf/Evergreen-ILS-1.6.0.7 + ./configure --prefix=/openils --sysconfdir=/openils/conf + make + + + + Compile, Link and Install Evergreen + In 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 utility 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 . + + cd /home/opensrf/Evergreen-ILS-1.6.0.7 + make STAFF_CLIENT_BUILD_ID=rel_1_6_0_7 install + + The above commands will create a new subdirectory /openils/var/web/xul/rel_1_6_0_7 containing the 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 subdirectory + /server of the new Staff Client build: + + cd /openils/var/web/xul + ln -sf rel_1_6_0_7/server server + + + + Copy the OpenSRF Configuration Files + As 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 opensrf user: + + cp /openils/conf/opensrf.xml.example /openils/conf/opensrf.xml + cp /openils/conf/opensrf_core.xml.example /openils/conf/opensrf_core.xml + cp /openils/conf/oils_web.xml.example /openils/conf/oils_web.xml + chown -R opensrf:opensrf /openils/ + + + + Create and Configure PostgreSQL Database + As 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 database + + As the postgres user on the PostgreSQL system create the PostgreSQL database, then set some internal + paths: + Create the database: + + createdb -E UNICODE evergreen + createlang plperl evergreen + createlang plperlu evergreen + createlang plpgsql evergreen + + Adjust the paths: + + psql -f /usr/share/postgresql/PGSQL_VERSION/contrib/tablefunc.sql evergreen + psql -f /usr/share/postgresql/PGSQL_VERSION/contrib/tsearch2.sql evergreen + psql -f /usr/share/postgresql/PGSQL_VERSION/contrib/pgxml.sql evergreen + + Where PGSQL_VERSION is your installed PostgreSQL version (e.g. 8.3). + + + Create a new Evergreen superuser + As the postgres user on the PostgreSQL system, create the new database + evergreen user and assign a password: + + createuser -P -s evergreen + + Enter the password twice for new role when prompted. + + + Create Database Schema + As the root user, create the database schema and configure your system with the corresponding + database authentication details for the evergreen database user that you created in the previous step. + Enter the following commands and replace HOSTNAME, PORT, PASSWORD and DATABASENAME with appropriate + values. + + cd /home/opensrf/Evergreen-ILS-1.6.0.7 + perl Open-ILS/src/support-scripts/eg_db_config.pl --update-config \ + --service all --create-schema --create-bootstrap --create-offline \ + --hostname HOSTNAME --port PORT \ + --user evergreen --password PASSWORD --database DATABASENAME + + On most systems, HOSTNAME will be localhost, PORT will be + 5432, and PASSWORD and DATABASENAME will be + evergreen. + + 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. + + + + Modify the Apache configuration files for the Evergreen site. + + + Enable some built-in Apache modules with the utility a2enmod, and install some additional Apache + configuration files. As the root user, enable some modules in the Apache server, then copy + the new configuration files to the Apache server directories: + Enable the required Apache Modules: + + a2enmod ssl # enable mod_ssl + a2enmod rewrite # enable mod_rewrite + a2enmod expires # enable mod_expires + cd /home/opensrf/Evergreen-ILS-1.x.x.x + + + + Copy the Apache configuration files from the Evergreen installation dierectory: + + cp Open-ILS/examples/apache/eg.conf /etc/apache2/sites-available/ + cp Open-ILS/examples/apache/eg_vhost.conf /etc/apache2/ + cp Open-ILS/examples/apache/startup.pl /etc/apache2/ + + + + Create a new Security Certificate (SSL Key) for the Apache server with the command openssl. 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: + + mkdir /etc/apache2/ssl + cd /etc/apache2/ssl + openssl req -new -x509 -days 365 -nodes -out server.crt -keyout server.key + + + This generates a self-signed SSL certificate. You should acquire a proper SSL certificate for a public + production system to avoid warning messages when users login to their account through the OPAC or when staff + login through the staff client. + For further information on getting a proper SSL certificate, see . + + + + Several changes are needed in the new Apache configuration file /etc/apache2/sites-available/eg.conf. + As the root user, edit the file and make the following changes: + + + Comment out the line Listen 443, since it conflicts with the same declaration in the configuration + file: /etc/apache2/ports.conf. Debian Etch users should not + do this since the conflict does not apply to that OS. + + + For the Linux distributions + Ubuntu Hardy + or Debian Etch, as the root user, edit the + Apache configuration file /etc/apache2/apache2.conf and change User www-data to + 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 line export APACHE_RUN_USER=www-data to export APACHE_RUN_USER=opensrf. + + The following updates are needed to allow the logs to function properly, but it may break other Apache applications + on your server. + + + + + As the root user, edit the Apache configuration file + /etc/apache2/apache2.conf and add the lines KeepAliveTimeout 1 and + MaxKeepAliveRequests 100, or modify any existing lines. + + + + + Performance Modifications for Apache + Some 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. + + StartServers 20 + MinSpareServers 5 + MaxSpareServers 15 + MaxClients 150 + MaxRequestsPerChild 10000 + +]]> + + + Finally, as the root user, execute the following Apache configuration commands to disable the default + It Works web page and to enable the Evergreen web site: + + a2dissite default + a2ensite eg.conf + + + + + + Modify the OpenSRF Configuration File + As 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: + /config/opensrf/username = opensrf + /config/opensrf/passwd = password for private.localhostopensrf user + /config/gateway/username = opensrf + /config/gateway/passwd = password for public.localhostopensrf user + /config/routers/router/transport (first entry, where transport/server == public.localhost) + + username = router + password = password for public.localhost router + user + + /config/routers/router/transport (second entry, where transport/server == private.localhost) + + username = router + password = password for private.localhost router + user + + + + Create Configuration Files for Users Needing <command>srfsh</command> + The 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 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 domain. + + + Modify logfile to be the full path for a log file to which the user has write access. + + + Modify loglevel as needed for testing. + + + + + + +router +private.localhost +opensrf +evergreen +5222 +/tmp/srfsh.log + +4 + +]]> + + + Modify the OpenSRF Environment + Modify the shell configuration file ~/.bashrc for opensrf by adding a Perl environmental + variable and 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. + + + + echo "export PERL5LIB=/openils/lib/perl5:\$PERL5LIB" >> ~/.bashrc + . ~/.bashrc + + + + Start Evergreen + + + As the root user, start the ejabberd and + memcached services (if they are not already running): + + /etc/init.d/ejabberd start + /etc/init.d/memcached start + + + + As the opensrf user, start Evergreen. + Use the flag to force Evergreen to use localhost + (your current system) as the hostname. + Using the option will start the OpenSRF router , + Perl , and C services: + $ osrf_ctl.sh -l -a start_all + + + You can also start Evergreen without the flag, but the + osrf_ctl.sh utility 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. + + Use the hostname command to determine the fully qualified domain name of your system. + + + + 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/bin + + + 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/perl5 + + + + + As the opensrf user, generate the Web files needed by the Staff Client and catalog, + 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 making any changes to the library hierarchy. + cd /openils/bin./autogen.sh -c /openils/conf/opensrf_core.xml -u +Updating Evergreen organization tree and IDL using '/openils/conf/opensrf_core.xml' +Updating fieldmapper + + + + As the root user, restart the Apache Web server: + /etc/init.d/apache2 restart + + 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 Installation + This 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 Evergreen + Once you have installed and started Evergreen, test your connection to Evergreen. As the opensrf user start + the srfsh application 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: + /openils/bin/srfshsrfsh% login admin open-ils +Received Data: "250bf1518c7527a03249858687714376" +------------------------------------ +Request Completed Successfully +Request Time in seconds: 0.045286 +------------------------------------ +Received Data: { + "ilsevent":0, + "textcode":"SUCCESS", + "desc":" ", + "pid":21616, + "stacktrace":"oils_auth.c:304", + "payload":{ + "authtoken":"e5f9827cc0f93b503a1cc66bee6bdd1a", + "authtime":420 + } +} +------------------------------------ +Request Completed Successfully +Request Time in seconds: 1.336568 +------------------------------------ + + 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 test fails or you have any other problems during installation, refer to the chapter. + +
+
+ Installing In Virtualized <systemitem class="osname">Linux</systemitem> Environments + This section describes the installation of Evergreen software in so-called "virtualized" software environments. Evergreen software runs as a native application on any of several well-known x86 (32-bit) and x86-64 (64-bit) Linux distributions including Ubuntu and Debian but it does not run as a native application on the Microsoft Windows operating system. However, it is possible to execute Evergreen on a Windows host system by running it within a virtual Linux-guest installation, which itself executes on the Windows system. The Linux environment is fully emulated and acts (within limits) just as if it were executing on a real standalone system. + This technique of emulating a Linux environment on a Windows host is a practical way to install and run an Evergreen system if it is not possible to dedicate a physical machine solely as a Linux host for Evergreen. This architecture is not recommended for large scale systems since there are performance limitations to running Evergreen in a virtualized environment. However, it is a reasonable architecture for smaller experimental systems, as a proof of concept, or as a conference-room pilot. + + Installing Virtualization Software + As described above, Evergreen can be installed on top of an emulated Linux environment. The Linux environment, in turn, is installed on top of a software application such as "VirtualBox", "VMware" or "VirtualPC" which must first be installed on the Windows system. This section contains step-by-step examples that show installing popular virtualization applications on a Windows host system. Following this section are further descriptions of installing Linux and Evergreen systems using that virtualization software. +
+ Installing <application>"VirtualBox"</application> Virtualization Software + This section reviews installation of the "VirtualBox" application on WindowsXP Professional (SP2). Download VirtualBox from their official website: http://download.virtualbox.org/virtualbox/3.2.8/VirtualBox-3.2.8-64453-Win.exe, then run the executable file. Continue with the steps shown in the next five figures until the software has been successfully installed: +
+ Starting the Windows installation file + + + + + +
+
+ Welcome to <application>VirtualBox</application> setup wizard + + + + + +
+
+ Accept the license agreement + + + + + +
+
+ Waiting for files to be copied + + + + + +
+
+ Installation is complete + + + + + +
+
+
+ Installing <application>"VMware"</application> Virtualization Software + This section reviews installation of the "VMware" application on WindowsXP Professional (SP2). Download VMware from their official website: link, then run the executable file. Continue with the steps shown in the figures until the software has been successfully installed: +
+ Starting the Windows installation file + + + + + +
+ + ZZZ-REVIEW + ADD INFO ON VMWARE + + ADD INFO ON VMWARE + At this point, VirtualBox has been installed, started for the first time, and a new virtual machine (VM) has been created. This VM is the environment in which the Linux / Evergreen installation will execute. Please continue in with the installation of the Linux / Evergreen distribution. +
+
+ Installing <application>"VirtualPC"</application> Virtualization Software + This section reviews installation of the "VirtualPC" application on WindowsXP Professional (SP2). Download VMware from their official website: link, then run the executable file. Continue with the steps shown in the figures until the software has been successfully installed: +
+ Starting the Windows installation file + + + + + +
+ + ZZZ-REVIEW + ADD INFO ON VIRTUALPC + + ADD INFO ON VIRTUALPC + At this point, VirtualBox has been installed, started for the first time, and a new virtual machine (VM) has been created. This VM is the environment in which the Linux / Evergreen installation will execute. Please continue in with the installation of the Linux / Evergreen distribution. +
+
+ + Installing <systemitem class="osname">Linux</systemitem> / Evergreen on Virtualization Software + After the virtualization software is installed and running, there are two ways to continue with installing Linux and Evergreen software in the new virtualized environment: + + + Download and install a prebuilt software image that contains a working Linux / Evergreen system (see for details) + + + Manually install a Linux guest system, then manually install Evergreen on it (see for details) + + + We review each method in the following sections. +
+ Download and install a prebuilt software image + You can download a prebuilt software image that, when installed with your virtualization software, emulates a Linux guest system containing a running Evergreen distribution. The image is essentially a snapshot of a hard disk from a fully configured, functional Linux system with Evergreen already installed. + We recommend this approach if you wish to get Evergreen running quickly with minimal attention to configuration. After reviewing only a few configuration details you can have a working Evergreen system that integrates smoothly with the rest of your network. See for a list of prebuilt software images that are currently available to download and install + DISCLAIMER: The following virtual images have been contributed by members of the Evergreen community for the purposes of testing, evaluation, training, and development. + + Linux / Evergreen Virtual Images + + + + Linux Version + Evergreen Version + Image + Comments + + + + + Debian lenny (5.0) + 1.6.0.1 + + download + + VirtualBox image + + + Ubuntu karmic koala (9.10) + 1.6.0.0 + + download + + VirtualBox image + + + Ubuntu hardy heron (8.04) + 1.2.3.1 + + download + + VirtualBox image; no preloaded data + + + Debian etch (4.0) + 1.2.2.3 + + download + + VMware image; preloaded with 13,000 Gutenberg records + + + Ubuntu gutsy gibbon (7.10) + 1.2.1.4 + + download + + VMware image + + + Gentoo + 1.1.5 + + download + + VMware image + + + +
+ + ZZZ-REVIEW + EXPAND LIST OF OTHER PREBUILT IMAGES + + EXPAND LIST OF OTHER PREBUILT IMAGES + For the following example, we have already installed the VirtualBox application (see for details). Continue with the steps as shown; refer to the accompanying figures for further information: + + Start VirtualBox for the first time and select FileVirtualBox Media ManagerAdd to locate the prebuilt software image just downloaded (the example shows it was extracted from the original .ZIP file into a temporary directory C:\temp). See for details. + After selecting the file, click Open to import it (see for details). + Then click OK to save the selection and return to the VirtualBox Media Manager (see for details). + Click New to start the "Virtual Machine Wizard", then Next to continue and create a new virtual machine (VM) ). + Create a new name for the VM and set the operating system type, then click Next (see ). + Set the memory size (we chose the default value of 512Mb), then click Next (see ). + Edit the Virtual Hard Disk configuration settings; click the radio boxes "Boot Hard Disk" and "Use existing hard disk" and ensure that the disk name "Evergreen1601_DebianLenny.vmdk" is selected. Click Finish to finish the setup (see ). + + Install the VirtualBox Guest Additions (really a required upgrade to VirtualBox) + + ZZZ-REVIEW + ADD INFO ON INSTALLING VIRTUALBOX GUEST ADDITIONS + + ADD INFO ON INSTALLING VIRTUALBOX GUEST ADDITIONS + + Return to VirtualBox and see the summary of the VM just created. Click Start to boot the new VM (see ). + See the start of the Linux boot sequence. Choose "Debian Gnu/Linux, kernel 2.6.26-2-686" from the startup menu and type Enter to start Linux and Evergreen (see ). After some delay you should see the command line prompt: debian-lenny login: . Log in with username root and password evergreen to continue (see ). + + At this point you have a running Linux / Evergreen system. If you need to modify the Evergreen configuration in any way, review the sectons of the standard Evergreen installation instructions in that deal with configuration. +
+ Starting <application>VirtualBox</application> for the first time + + + + + +
+
+ Selecting the software image in Virtual Media Manager + + + + + +
+
+ New software image added to <application>VirtualBox</application> + + + + + +
+
+ Creating a new VM + + + + + +
+
+ Setting the VM name and OS type + + + + + +
+
+ Setting memory size + + + + + +
+
+ Setting up the Virtual Hard Disk + + + + + +
+
+ Finishing definition of new VM + + + + + +
+
+ Summary of the new VM + + + + + +
+
+ Selecting VM from startup menu + + + + + +
+
+ Starting the new VM + + + + + +
+
+ Starting the new VM (continued) + + + + + +
+
+ Logging into the new VM + + + + + +
+
+
+ Manually install <systemitem class="osname">Linux</systemitem> and Evergreen + You can manually install a Linux guest system and Evergreen on your virtualization software. + We recommend this approach if you need to specially configure either the Linux system or Evergreen itself. This will require a detailed review of both Linux and Evergreen configuration details. You are essentially doing a normal Evergreen installation on a Linux system; it just happens that Linux is running within a virtualized environment. Refer to for information on the normal Evergreen installation, then continue with this section. + For the following example, we have already installed the VirtualBox application (see for details). Continue with the steps as shown; refer to the accompanying figures for further information: + + + Download and install a standard Ubuntu distribution in "VirtualBox". + You can download a software image of a prebuilt Ubuntu distribution and immediately import it into "VirtualBox" , or you can download and install + + + ZZZ-REVIEW + ADD DETAILS ON MANUAL INSTALLATION OF LINUX + + ADD DETAILS ON MANUAL INSTALLATION OF LINUX + + + Start (boot) Ubuntu. + + ZZZ-REVIEW + ADD DETAILS ON VM LINUX BOOT SEQUENCE + + ADD DETAILS ON VM LINUX BOOT SEQUENCE + + + Install Evergreen on Ubuntu. + + ZZZ-REVIEW + ADD DETAILS ON MANUAL INSTALLATION OF EVERGREEN + + ADD DETAILS ON MANUAL INSTALLATION OF EVERGREEN + + + At this point, the Windows system is hosting an Ubuntu system, which itself is hosting the Evergreen distribution. So far as Evergreen is concerned, it is happily executing in a standard Ubuntu environment and behaves exactly as if it were executing on a standalone Ubuntu system. + Of course, there are limitations to how well a virtualized Ubuntu system emulates a real one. The "VirtualBox" application itself consumes memory, and it contributes to the CPU load on the Windows host system. The emulated Ubuntu system will have less available memory and will execute more slowly than if it were a standalone system, therefore Evergreen itself will inherit some limitations from this overall environment. + However, this technique of using a Windows host to emulate a Linux environment is a practical way to install and run an Evergreen system even if it isn't possible to dedicate a real machine solely as a Linux host for testing. This is a reasonable architecture for simple experiments, or as a proof of concept, or as a conference-room pilot. +
+
+
+
+ Getting a Signed SSL Certificate + This section describes how to get a properly signed SSL certificate. + For temporary testing purposes, you can use the command openssl to create a new SSL key for your Apache server. This is just a self-signed certificate and will generate warnings in the Staff Client and browser during testing and development. For a public production server you should configure or purchase a properly signed SSL certificate. + + ZZZ-REVIEW + ADD INFO ON HOW TO GET A SIGNED SSL CERTIFICATE + + ADD INFO ON HOW TO GET A SIGNED SSL CERTIFICATE +
+
+
-- 2.43.2