]> git.evergreen-ils.org Git - working/Evergreen.git/blob - 1.6/admin/ServersideInstallation.xml
ae56b65dc52f05212ea79bc90dade71ad32ed080
[working/Evergreen.git] / 1.6 / admin / ServersideInstallation.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <chapter xml:id="ServersideInstallation" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xl="http://www.w3.org/1999/xlink">
3         <info>
4                 <title>Server-side Installation of Evergreen Software</title>
5                 <abstract>
6                         <para>This section describes installation of the Evergreen server-side software. Installation, configuration, testing and verification of the Evergreen server-side software is straightforward if you follow some simple directions. Installation of the Evergreen Staff Client software is handled in the section <emphasis><emphasis role="bold"><link linkend="serversideinstallation-staffclient"> "Installing the Evergreen Staff Client" </link></emphasis></emphasis>. </para>
7                 </abstract>
8         </info>
9         <section xml:id="serversideinstallation-overview">
10                 <title>Overview</title>
11                 <para>A bare-minimum system Evergreen system requires only a single Server and a single Staff Client, both residing on a single server machine. In fact, that is a reasonable architecture for simple experiments or as a proof of concept in a conference-room pilot. But typical real-world systems will probably consist of at least one or two Evergreen servers plus multiple Staff Clients.</para>
12                 <para>Another simple system may require only that you install one or more instances of the Staff Client software. For instance, if your consortium already provides the Evergreen server software or if you are using the hosted version provided by Equinox, you do not need to install the Evergreen server-side software at all.</para>
13                 <para>Current versions of Evergreen software run as native applications on any of several well-known Linux distributions (e.g., <emphasis>Ubuntu</emphasis> and <emphasis>Debian</emphasis>). It does not currently run as a native application on the Windows operating system (e.g., WindowsXP, WindowsXP Professional, Windows7), but the software can still be installed and run on Windows via a so-called <emphasis>virtualized</emphasis> Unix-guest Operating System (using, for example, VirtualBox or VMware to emulate a Linux environment). More information on running Evergreen in virtualized environments can be found in the section <emphasis><emphasis role="bold"><link linkend="serversideinstallation-virtual">"Installing Evergreen in Virtualized Unix Environments"</link></emphasis></emphasis>.</para>
14         </section>
15         <section xml:id="serversideinstallation-requirements">
16                 <title>System Requirements</title>
17                 <para>This section describes various requirements of the hardware and software environment that must be fulfilled to support a successful Evergreen installation. For a description of the installation process itself and for links to further instructions please review the section <emphasis><emphasis role="bold"><link linkend="serversideinstallation-process">"The Installation Process"</link></emphasis></emphasis> .</para>
18                 <para>The system requirements for running Evergreen really depend on what you want to do with it. For just evaluating the software, or for a very small library (for example, 1 circulation station, a few thousand items, and infrequent online catalog use), any modern desktop or laptop made within the last few years capable of running Linux, FreeBSD, etc. should suffice. We recommend at least 512mb of RAM.</para>
19                 <para> [[ Other hardware and software requirements ]] </para>
20                 <para>
21                         <screen>
22                         From Dan Scott on [http://list.georgialibraries.org/pipermail/
23                           open-ils-general/2007-July/000316.html|OPEN-ILS-GENERAL]:
24                         On 8/11/07, lan ye &lt;lye at mail.slcl.org> wrote:
25                         > We've been researching the Evergreen Open Source Library system,
26                         > and would like to have a list of hardware requirements for the
27                         > installation of a small test server. To keep things within a
28                         > small budget, I would like to just use an ordinary PC. Could you
29                         > send some information to us?
30
31                         For system requirements, it depends on how extensive you want your
32                         tests to be. Evergreen and all of the pieces it depends on
33                         (PostgreSQL, Apache, Ejabberd) run happily in a VMWare image
34                         allocated 512MB of RAM on my laptop with just the Project
35                         Gutenberg e-books loaded, and that's enough to evaluate the OPAC
36                         interface / try out the staff client / make some local changes and
37                         generally experiment. But I'm not going to load one million bib
38                         records into that system and expect it to perform. So, probably
39                         any hardware you have lying around would be adequate for a small
40                         test server.
41
42                         > It looks like Evergreen has been successfully installed on two
43                         > Linux systems: Gentoo and Ubuntu. Which one is the best for us
44                         > to test using what's already in place at other libraries? Are
45                         > there any differences / Advantages in functionality between
46                         > Gentoo and Ubuntu?
47
48                         As John said, GPLS is running on Debian, and that's the only
49                         Evergreen system that is in production at the moment. However, the
50                         documentation for installing on Debian is a bit scattered right
51                         now. The developers themselves used Gentoo originally, and that's
52                         what I'm using at the moment &amp; have documented in the wiki;
53                         the install process on Ubuntu is very thoroughly documented and
54                         Ubuntu is reasonably close to Debian.  
55                         See http://open-ils.org/dokuwiki/doku.php?id=server_installation 
56                         for the list of install instructions for various distributions.
57
58                         As for advantages / disadvantages of particular distributions,
59                         that's a religious war that I don't want to step into... We'll try
60                         to help you out no matter what distribution you choose; just
61                         please choose a current release :)
62
63                         -- 
64                         Dan Scott
65                         Laurentian University
66                         </screen>
67                         <screen>
68                         And from James Fournie in that same [http://list.georgialibraries.org/
69                           pipermail/open-ils-general/2007-July/000317.html|thread]:
70                         We are running a test Ubuntu server on a ~1ghz Celeron PC with
71                         512mb RAM.  It seems to be ok handling the Gutenberg samples, and
72                         our collection of about 8000 records. We did have serious problems
73                         using anything less than 512mb RAM. Also, I tried Evergreen on a
74                         K6 II 350, but it wasn't pretty.
75
76                         James Fournie
77                         Digitization Librarian
78                         Union of B.C. Indian Chiefs
79                         </screen>
80                 </para>
81         </section>
82         <section xml:id="serversideinstallation-examples">
83                 <title>Example System Architectures</title>
84                 <para>This sections describes examples of some working Evergreen system architectures, including both server-side software and Staff Client software.</para>
85                 <section xml:id="serversideinstallation-example-pines">
86                         <title>PINES</title>
87                         <para>In order to provide load balancing and high-availability at the OPAC and Staff Client level, PINES has implemented a Linux Virtual Server environment with five independent mini-clusters. This allows live updates of the entire system with no perceived downtime or interruption in service.</para>
88                         <para>[[ further information on PINES ]] </para>
89                 </section>
90                 <section xml:id="serversideinstallation-example-sitka">
91                         <title>Sitka</title>
92                         <para>[[ further information on Sitka ]] </para>
93                 </section>
94                 <section xml:id="serversideinstallation-example-other">
95                         <title>Other working systems</title>
96                         <para>[[ further information on other working systems ]] </para>
97                 </section>
98         </section>
99         <section xml:id="serversideinstallation-process">
100                 <title>The Installation Process</title>
101                 <para>Installing, configuring and testing the Evergreen server-side software is straightforward with the current stable software release. Earlier software distributions are also available. In the following sections you will find instructions tailored to specific distributions.</para>
102                 <section>
103                         <title>Current Stable Software Release</title>
104                         <para>The current stable release of Evergreen is version <emphasis><emphasis role="bold">1.6.0.7</emphasis></emphasis>. Instructions for installing, configuring and testing that version on the <emphasis>Ubuntu</emphasis> or <emphasis>Debian</emphasis> Linux systems are found in the section <emphasis><emphasis role="bold"><link linkend="serversideinstallation-ubuntudebian"> "Installing Evergreen 1.6.0.7 on Ubuntu or Debian" </link></emphasis></emphasis> .
105                         </para>
106                         <para>This release of Evergreen software is dependent on the OpenSRF software system. The current stable release of OpenSRF is version <emphasis><emphasis role="bold">1.0.6</emphasis></emphasis>. Instructions for installing, configuring and testing that version are found in the section <emphasis><emphasis role="bold"><link linkend="serversideinstallation-opensrf"> "Installing OpenSRF" </link></emphasis></emphasis> .
107                         </para>
108                 </section>
109                 <section>
110                         <title>Previous Software Releases</title>
111                         <para>Earlier releases of Evergreen are also available. Instructions for installing, configuring and testing earlier versions are found in the section <emphasis><emphasis role="bold"><link linkend="serversideinstallation-previousversions">Installing Previous Versions of Evergreen</link></emphasis></emphasis> .</para>
112                         <para>The most recent previous release of Evergreen is version <emphasis><emphasis role="bold">1.4.0.6</emphasis></emphasis>. Instructions for installing, configuring and testing that version are found in the section <emphasis><emphasis role="bold"><link linkend="serversideinstallation-ubuntudebian-previous">Installing Evergreen 1.4.0.6 on Ubuntu or Debian</link></emphasis></emphasis> .
113                         </para>
114                         <para>The most recent previous release of OpenSRF is version <emphasis><emphasis role="bold">1.0.x</emphasis></emphasis>. Instructions for installing, configuring and testing that version are found in the section <emphasis><emphasis role="bold"><link linkend="serversideinstallation-opensrf-previous">Installing OpenSRF 1.0.x</link></emphasis></emphasis> .
115                         </para>
116                 </section>
117         </section>
118         <section xml:id="serversideinstallation-ubuntudebian">
119                 <title>Installing Evergreen 1.6.0.7 On Ubuntu or Debian</title>
120                 <para>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.</para>
121                 <para>In the following instructions, you are asked to perform certain steps as either the <emphasis role="bold">root</emphasis> user, the <emphasis role="bold">opensrf</emphasis> user, or the <emphasis role="bold">postgres</emphasis> user.</para>
122                 <para>To become the <emphasis role="bold">root</emphasis> user, issue the command: <emphasis><emphasis role="bold">su - root</emphasis></emphasis>. To switch from the <emphasis role="bold">root</emphasis> user to a different user, issue a command like: <emphasis><emphasis role="bold">su - USERNAME</emphasis></emphasis>. For example, to switch from the <emphasis role="bold">root</emphasis> user to the <emphasis role="bold">opensrf</emphasis> user, issue this command: <emphasis><emphasis role="bold">su - opensrf</emphasis></emphasis>. Once you have become a non-root user, to become the <emphasis role="bold">root</emphasis> user again, simply issue the <emphasis><emphasis role="bold">exit</emphasis></emphasis> command.</para>
123                 <section>
124                         <title>Installing the latest version of OpenSRF</title>
125                         <para>For further information on installing the Open Service Request Framework (OpenSRF), see the section <emphasis><emphasis role="bold"><link linkend="serversideinstallation-opensrf"> "Installing OpenSRF" </link></emphasis></emphasis>.</para>
126                         <para>Follow the steps outlined in that section, then run the specified test(s) to ensure that OpenSRF is properly installed before continuing with any further Evergreen installation steps. The Evergreen application depends on properly installation of OpenSRF. If OpenSRF does not work correctly, Evergreen will not work properly either.</para>
127                 </section>
128                 <section>
129                         <title>Downloading and Building Evergreen </title>
130                         <para>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.</para>
131                         <para>As far as possible, perform the following steps in the order they are 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.</para>
132                         <para>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.</para>
133                         <section>
134                                 <title>Download and Unpack Latest Evergreen Version</title>
135                                 <para>As the <emphasis role="bold">opensrf</emphasis> user, download and extract the latest version of Evergreen. The latest version can be found here: <emphasis><emphasis role="bold"><ulink url="http://evergreen-ils.org/downloads/Evergreen-ILS-1.6.0.7.tar.gz"></ulink></emphasis></emphasis></para>
136                                 <figure>
137                                         <title>Commands to download/extract Evergreen</title>
138                                         <screen>
139                                         $ su - opensrf
140                                         $ wget http://evergreen-ils.org/downloads/Evergreen-ILS-1.6.0.7.tar.gz
141                                         $ tar zxf Evergreen-ILS-1.6.0.7.tar.gz
142                                         </screen>
143                                 </figure>
144                         </section>
145                         <section>
146                                 <title>Install Prerequisites to Build Evergreen</title>
147                                 <para>In this step you will install and configure a set of prerequisites for building Evergreen. In a following step you will actually build the software.</para>
148                                 <para>As the <emphasis role="bold">root</emphasis> user, build the prerequisites from the software distribution that you just downloaded and unpacked. Enter the commands show below. Remember to replace <emphasis>[distribution]</emphasis> in the following example with the keyword that corresponds to your actual Linux distribution (see the following list):</para>
149                                 <itemizedlist>
150                                         <listitem><emphasis>debian-etch</emphasis> for Debian Etch (4.0)</listitem>
151                                         <listitem><emphasis>debian-lenny</emphasis> for Debian Lenny (5.0)</listitem>
152                                         <listitem>[[other Debian distributions]]</listitem>
153                                         <listitem><emphasis>ubuntu-hardy</emphasis> for Ubuntu Hardy (8.04)</listitem>
154                                         <listitem><emphasis>ubuntu-karmic</emphasis> for Ubuntu Karmic (9.10) and Ubuntu Lucid (10.04)</listitem>
155                                         <listitem>[[other Ubuntu distributions]]</listitem>
156                                 </itemizedlist>
157                                 <figure>
158                                         <title>Commands to install prerequisites for Evergreen</title>
159                                         <screen>
160                                         $ su - root
161                                         $ cd /home/opensrf/Evergreen-ILS-1.6.0.7
162                                         $ make -f Open-ILS/src/extras/Makefile.install [distribution]
163                                         </screen>
164                                 </figure>
165                         </section>
166                         <section>
167                                 <title>(OPTIONAL) Install the PostgreSQL Server</title>
168                                 <para>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.</para>
169                                 <para>For further information on installing PostgreSQL, see the section <emphasis><emphasis role="bold"><link linkend="serversideinstallation-postgresql"> "Installing PostgreSQL" </link></emphasis></emphasis>.</para>
170                                 <para>If your PostgreSQL server will be on the same system as your Evergreen software, then as the <emphasis role="bold">root</emphasis> user install the required PostgreSQL server packages:</para>
171                                 <figure>
172                                         <title>Commands to install the PostgreSQL server</title>
173                                         <screen>
174                                         $ su - root
175
176                                         # Debian Lenny and Ubuntu Hardy (8.04)
177                                         $ make -f Open-ILS/src/extras/Makefile.install install_pgsql_server_debs_83
178
179                                         # Ubuntu Karmic (9.10) and Ubuntu Lucid (10.04)
180                                         $ make -f Open-ILS/src/extras/Makefile.install install_pgsql_server_debs_84
181                                         </screen>
182                                 </figure>
183                                 <para><emphasis role="bold">Note:</emphasis> PostgreSQL 8.1 is deprecated and will become unsupported in a future release, though existing installations upgrading from Evergreen 1.4 or before will work fine. However, consider upgrading your Postgres soon!</para>
184                                 <para>[[ is this still true? ]]</para>
185                                 <para>[[ how to determine which version of PostgreSQL you have? ]]</para>
186                         </section>
187                         <section>
188                                 <title>(OPTIONAL) Install Perl Modules on PostgreSQL Server</title>
189                                 <para>If PostgreSQL is running on the same system as your Evergreen software, then the Perl modules will automatically be available. Just skip this step.</para>
190                                 <para>Otherwise, if your PostgreSQL server is running on another system, then as the <emphasis role="bold">root</emphasis> user install the following Perl modules on that system:</para>
191                                 <figure>
192                                         <title>Commands to install Perl modules</title>
193                                         <screen>
194                                         # ensure the gcc compiler is installed
195                                         $ su - root
196                                         $ aptitude install gcc
197
198                                         # install the Perl modules
199                                         $ perl -MCPAN -e shell
200                                         cpan> install JSON::XS
201                                         cpan> install MARC::Record
202                                         cpan> install MARC::File::XML
203                                         </screen>
204                                 </figure>
205                                 <para>[[ how to install the Perl modules ]]</para>
206                                 <para>[[ how to verify that the Perl modules are installed ]]</para>
207                         </section>
208                         <section>
209                                 <title>Add Additional Library Paths on Evergreen System</title>
210                                 <para>As the <emphasis role="bold">root</emphasis> user, you must update the system dynamic library path to ensure the system will recognize the newly installed libraries. Do this by creating a new file named <emphasis role="bold">/etc/ld.so.conf.d/eg.conf</emphasis> containing the two paths, then run the command <emphasis role="bold">ldconfig</emphasis> to automatically read the file and modify the dynamic library path:</para>
211                                 <figure>
212                                         <title>Commands to modify system dynamic library path</title>
213                                         <screen>
214                                         $ su - root
215                                         $ cat > /etc/ld.so.conf.d/eg.conf &lt;&lt; ENDOFFILE
216                                         /usr/local/lib
217                                         /usr/local/lib/dbd
218                                         ENDOFFILE
219                                         $ ldconfig
220                                         </screen>
221                                 </figure>
222                         </section>
223                         <section>
224                                 <title>(OPTIONAL) Restart the PostgreSQL Service</title>
225                                 <para>If PostgreSQL is running on the same system as the rest of Evergreen, as the <emphasis role="bold">root</emphasis> user you must restart the PostgreSQL service to avoid a problem where the library <emphasis role="bold">plperl.so</emphasis> cannot be found. If your PostgreSQL server is running on another system, just skip this step.</para>
226                                 <para>[[ other versions of PostgreSQL ]]</para>
227                                 <figure>
228                                         <title>Commands to restart PostgreSQL service</title>
229                                         <screen>
230                                         $ su - root
231                                         $ /etc/init.d/postgresql-8.3 restart
232                                         </screen>
233                                 </figure>
234                         </section>
235                         <section>
236                                 <title>Configure and Compile Evergreen Sources</title>
237                                 <para>As the <emphasis role="bold">opensrf</emphasis> user, configure and compile the software from the prerequisites that were set up in previous steps:</para>
238                                 <figure>
239                                         <title>Commands to configure and compile Evergreen</title>
240                                         <screen>
241                                         $ su - opensrf
242                                         $ cd /home/opensrf/Evergreen-ILS-1.6.0.7
243                                         $ ./configure --prefix=/openils --sysconfdir=/openils/conf
244                                         $ make
245                                         </screen>
246                                 </figure>
247                         </section>
248                         <section>
249                                 <title>Link and Install Evergreen</title>
250                                 <para>As the <emphasis role="bold">root</emphasis> user, link and install the compiled code. In the commands below, remember to set the variable <emphasis role="bold"> STAFF_CLIENT_BUILD_ID </emphasis> to match the version of the Staff Client you will use to connect to the Evergreen server. Finally, create a symbolic link named <emphasis role="bold">server</emphasis> in <emphasis role="bold">/openils/var/web/xul</emphasis> to the <emphasis role="bold">/server</emphasis> subdirectory of your Staff Client build:</para>
251                                 <figure>
252                                         <title>Commands to link and install Evergreen</title>
253                                         <screen>
254                                         $ su - root
255                                         $ cd /home/opensrf/Evergreen-ILS-1.6.0.7
256                                         $ make STAFF_CLIENT_BUILD_ID=rel_1_6_0_6 install
257                                         $ cd /openils/var/web/xul
258                                         $ ln -sf rel_1_6_0_7/server server
259                                         </screen>
260                                 </figure>
261                         </section>
262                         <section>
263                                 <title>Copy the OpenSRF Configuration Files</title>
264                                 <para>As the <emphasis role="bold">root</emphasis> user, copy the example OpenSRF configuration files into place. This will replace the OpenSRF configuration files that you set up while installing and testing OpenSRF. You should also create backup copies of the old files for troubleshooting purposes. Finally, change the ownership on the installed files to the user <emphasis role="bold">opensrf</emphasis>:</para>
265                                 <figure>
266                                         <title>Commands to copy OpenSRF configuration files</title>
267                                         <screen>
268                                         $ su - root
269                                         $ cp /openils/conf/opensrf.xml.example      /openils/conf/opensrf.xml
270                                         $ cp /openils/conf/opensrf_core.xml.example /openils/conf/opensrf_core.xml
271                                         $ cp /openils/conf/oils_web.xml.example     /openils/conf/oils_web.xml
272                                         $ chown -R opensrf:opensrf /openils/
273                                         </screen>
274                                 </figure>
275                         </section>
276                         <section>
277                                 <title>Create and configure PostgreSQL Database</title>
278                                 <para>As the <emphasis role="bold">postgres</emphasis> user on your PostgreSQL server, create the Evergreen database.</para>
279                                 <para>Remember to adjust the path for the <emphasis role="bold">contrib</emphasis> repository to match your PostgreSQL server layout. For example, if you built PostgreSQL from source following the cheat sheet, the contrib directory will be located here: <emphasis role="bold">/usr/local/share/contrib</emphasis> . If you installed the PostgreSQL 8.3 server packages on Ubuntu 8.04, the directory will be located here: <emphasis role="bold">/usr/share/postgresql/8.3/contrib/</emphasis> .</para>
280                                 <orderedlist>
281                                         <listitem>
282                                                 <para>
283                                                         <emphasis role="bold">Create and configure the database</emphasis>
284                                                 </para>
285                                                 <para>As the <emphasis role="bold">postgres</emphasis> user on the PostgreSQL system create the PostgreSQL database, then set some internal paths:</para>
286                                                 <figure>
287                                                         <title>Commands to create database and adjust the path</title>
288                                                         <screen>
289                                                         # create the database
290                                                         $ su - postgres
291                                                         $ createdb -E UNICODE evergreen
292                                                         $ createlang plperl   evergreen
293                                                         $ createlang plperlu  evergreen
294                                                         $ createlang plpgsql  evergreen
295         
296                                                         # adjust the paths
297                                                         $ psql -f /usr/share/postgresql/8.3/contrib/tablefunc.sql evergreen
298                                                         $ psql -f /usr/share/postgresql/8.3/contrib/tsearch2.sql  evergreen
299                                                         $ psql -f /usr/share/postgresql/8.3/contrib/pgxml.sql     evergreen
300                                                         </screen>
301                                                 </figure>
302                                         </listitem>
303                                         <listitem>
304                                                 <para><emphasis role="bold">Create new Evergreen superuser</emphasis> </para>
305                                                 <para>As the <emphasis role="bold">postgres</emphasis> user on the PostgreSQL system, create the new user <emphasis role="bold"> evergreen </emphasis>:</para>
306                                                 <figure>
307                                                         <title>Commands to create the 'evergreen' user</title>
308                                                         <screen>
309                                                         # create superuser 'evergreen' and set the password
310                                                         $ su - postgres
311                                                         $ createuser -P -s evergreen
312                                                         Enter password for new role:  mynewpassword
313                                                         Enter it again:  mynewpassword
314                                                         </screen>
315                                                 </figure>
316                                         </listitem>
317                                 </orderedlist>
318                         </section>
319                         <section>
320                                 <title>Create Database Schema</title>
321                                 <para>As the <emphasis role="bold">root</emphasis> user, create the database schema and configure your system with the corresponding database authentication details for the database user 'evergreen' that you created in the previous step.</para>
322                                 <para>Enter the commands and replace <emphasis>[HOSTNAME], [PORT], [USER], [PASSWORD]</emphasis> and <emphasis>[DATABASENAME]</emphasis> with appropriate values.</para>
323                                 <para>On most systems <emphasis>[HOSTNAME]</emphasis> will be <emphasis role="bold">localhost</emphasis>, and <emphasis>[PORT]</emphasis> will be <emphasis role="bold">5432</emphasis>.</para>
324                                 <figure>
325                                         <title>Commands to create Evergreen database schema</title>
326                                         <screen>
327                                         $ su - root
328                                         $ cd /home/opensrf/Evergreen-ILS-1.6.0.7
329                                         $ perl Open-ILS/src/support-scripts/eg_db_config.pl --update-config \
330                                                 --service all --create-schema --create-bootstrap --create-offline \
331                                                 --hostname [HOSTNAME] --port [PORT] \
332                                                 --user [USER] --password [PASSWORD] --database [DATABASENAME]
333                                         </screen>
334                                 </figure>
335                                 <para>
336                                         <emphasis> NOTE: If you are entering the above command on a single line, do not include the ''\'' characters. If you are using the <emphasis role="bold"> bash </emphasis> 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.</emphasis>
337                                 </para>
338                         </section>
339                         <section>
340                                 <title>Setup the Apache Server</title>
341                                 <para>As the <emphasis role="bold">root</emphasis> user, configure the Apache server and copy several new configuration files to the Apache server directories:</para>
342                                 <figure>
343                                         <title>Commands to configure the Apache server</title>
344                                         <screen>
345                                         # configure the Apache server
346                                         $ su - root
347                                         $ a2enmod ssl        # enable mod_ssl
348                                         $ a2enmod rewrite    # enable mod_rewrite
349                                         $ a2enmod expires    # enable mod_expires
350                                         $ cd /home/opensrf/Evergreen-ILS-1.6.0.7
351
352                                         # copy files
353                                         $ cp Open-ILS/examples/apache/eg.conf       /etc/apache2/sites-available/
354                                         $ cp Open-ILS/examples/apache/eg_vhost.conf /etc/apache2/
355                                         $ cp Open-ILS/examples/apache/startup.pl    /etc/apache2/
356                                         </screen>
357                                 </figure>
358                         </section>
359                         <section>
360                                 <title>Create a Security Certificate (SSL Key)</title>
361                                 <para>Use the command <emphasis role="bold"> openssl </emphasis> to create a new SSL key for your Apache server. For a public production server you should configure or purchase a signed SSL certificate, but for now you can just use a self-signed certificate and accept the warnings in the Staff Client and browser during testing and development:</para>
362                                 <figure>
363                                         <title>Commands to create an SSL key</title>
364                                         <screen>
365                                         $ mkdir /etc/apache2/ssl
366                                         $ cd /etc/apache2/ssl
367                                         $ openssl req -new -x509 -days 365 -nodes -out server.crt -keyout server.key
368                                         </screen>
369                                 </figure>
370                                 <para><emphasis><emphasis role="bold"> Warning:</emphasis> This is only a temporary measure to expedite testing. You <emphasis role="bold"> must </emphasis> get a proper SSL certificate for a public production system. See this section for further comments on setting up a properly signed SSL certificate: </emphasis> </para>
371                                 <para> [[how to get a signed SSL certificate]] </para>
372                         </section>
373                         <section>
374                                 <title>Modify the Apache Configuration File</title>
375                                 <para>Edit the Apache configuration file <emphasis>/etc/apache2/sites-available/eg.conf</emphasis> and make the following changes:</para>
376                                 <itemizedlist>
377                                         <listitem>
378                                                 <para>Comment out the line <emphasis role="bold">Allow from 10.0.0.0/8</emphasis>, then uncomment the line <emphasis role="bold">Allow from all</emphasis>. This is a temporary measure to expedite testing.</para>
379                                                 <para>
380                                                         <emphasis><emphasis role="bold"> Warning: </emphasis> You must remove these changes after testing is completed. This will enable access to the configuration CGI scripts from any workstation on any network. You <emphasis role="bold"> must </emphasis> secure this for a public production system, preferably by explicitly specifying the allowed IP addresses and adding proper authentication.</emphasis>
381                                                 </para>
382                                         </listitem>
383                                         <listitem>
384                                                 <para>Comment out the line <emphasis role="bold">Listen 443</emphasis> as it conflicts with the same declaration in the configuration file: <emphasis role="bold">/etc/apache2/ports.conf</emphasis> .</para>
385                                                 <para> [[Debian Etch users - do not do this!]] </para>
386                                         </listitem>
387                                 </itemizedlist>
388                         </section>
389                         <section>
390                                 <title>Modifications to Keep the Logs Functioning</title>
391                                 <para>You must modify the Apache configuration file to allow the logs to function properly, but it may break other Apache applications on your server. We hope to make this unnecessary soon.</para>
392                                 <para> [[ is this still necessary ? ]] </para>
393                                 <orderedlist>
394                                         <listitem>
395                                                 <para>For the Linux distributions <emphasis>Ubuntu Hardy / Debian Etch </emphasis>, as the <emphasis role="bold">root</emphasis> user, edit the Apache configuration file <emphasis role="bold"> /etc/apache2/apache2.conf </emphasis> and change the user:</para>
396                                                 <screen>www-data</screen>
397                                                 <para>to the user:</para>
398                                                 <screen>opensrf</screen>
399                                         </listitem>
400                                         <listitem>
401                                                 <para>For the Linux distributions <emphasis>Ubuntu Karmic / Ubuntu Lucid / Debian Lenny </emphasis>, as the <emphasis role="bold">root</emphasis> user, edit the Apache configuration file <emphasis role="bold">/etc/apache2/envvars </emphasis> and change the phrase:</para>
402                                                 <screen>export APACHE_RUN_USER=www-data</screen>
403                                                 <para>to the phrase:</para>
404                                                 <screen>export APACHE_RUN_USER=opensrf</screen>
405                                         </listitem>
406                                 </orderedlist>
407                         </section>
408                         <section>
409                                 <title>Modify Apache Configuration File</title>
410                                 <para>As the <emphasis role="bold">root</emphasis> user, edit the Apache configuration file <emphasis>/etc/apache2/apache2.conf</emphasis> and add the line <emphasis role="bold">KeepAliveTimeout 1</emphasis>, or modify an existing line if it already exists.</para>
411                         </section>
412                         <section>
413                                 <title>(OPTIONAL) Performance Modifications for Apache</title>
414                                 <para>As the <emphasis role="bold">root</emphasis> user, edit the Apache configuration file <emphasis>/etc/apache2/apache2.conf</emphasis> and add the line <emphasis role="bold">MaxKeepAliveRequests 100</emphasis>, or modify an existing line if it already exists. Additionally, locate and modify the section related to <emphasis>prefork configuration</emphasis> to suit the load on your system.</para>
415                                 <para>Following are settings that may apply to a busy system:</para>
416                                 <figure>
417                                         <title>"Prefork configuration" section of Apache configuration file</title>
418                                         <screen>
419                                         &lt;IfModule mpm_prefork_module>
420                                            StartServers    20
421                                            MinSpareServers       5
422                                            MaxSpareServers      15
423                                            MaxClients       150
424                                            MaxRequestsPerChild 10000
425                                         &lt;/IfModule>
426                                         </screen>
427                                 </figure>
428                                 <para>[[ settings of "prefork configuration" section for busy/notbusy systems ]]</para>
429                         </section>
430                         <section>
431                                 <title>Enable the Evergreen Site</title>
432                                 <para>As the <emphasis role="bold">root</emphasis> user, enable the Evergreen site:</para>
433                                 <figure>
434                                         <title>Commands to enabl e the Evergreen site</title>
435                                         <screen>
436                                         $ su - root
437                                         $ a2dissite default    # OPTIONAL: disable the default site (i.e., the "It Works" page).
438                                         $ a2ensite eg.conf
439                                         </screen>
440                                 </figure>
441                         </section>
442                         <section>
443                                 <title>Modify the OpenSRF Configuration File</title>
444                                 <para>As the <emphasis role="bold">opensrf</emphasis> user, edit the OpenSRF configuration file <emphasis>/openils/conf/opensrf_core.xml</emphasis> to update the Jabber usernames and passwords, and to specify the domains from which we'll accept and to which we'll make connections.</para>
445                                 <para>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.</para>
446                                 <para><emphasis role="bold">Note:</emphasis> the following example uses common XPath syntax on the left-hand side to indicate the position within the XML file:</para>
447                                 <figure>
448                                         <title>Updates needed to the file /openils/conf/opensrf_core.xml</title>
449                                         <screen>
450                                         /config/opensrf/username  = opensrf
451                                         /config/opensrf/passwd    = password for **private.localhost** opensrf user
452                                         /config/gateway/username  = opensrf
453                                         /config/gateway/passwd    = password for **public.localhost** opensrf user
454                                         /config/routers/router/transport - first entry, where ''transport/server'' == **public.localhost** :
455                                             username = router
456                                             password = password for **public.localhost** router user
457                                         /config/routers/router/transport'' - second entry, where ''transport/server'' == **private.localhost** :
458                                             username = router
459                                             password = password for **private.localhost** router user
460                                         </screen>
461                                 </figure>
462                                 <para>[[ better diagram needed here ]]</para>
463                         </section>
464                         <section>
465                                 <title>Create Private Configuration Files for Certain Users</title>
466                                 <para>The software installation will automatically create a utility named <emphasis>srfsh</emphasis> (surf shell). This is a command line diagnostic tool for interacting with the OpenSRF network software. You must set up a special configuration file for each user who will need to run the utility.</para>
467                                 <para>Copy the file <emphasis>/openils/conf/srfsh.xml.example</emphasis> to the file <emphasis>.srfsh.xml</emphasis> in the home directory of each user who will use <emphasis role="bold">srfsh</emphasis>. Finally, edit each file <emphasis>.srfsh.xml</emphasis> and make the following changes:</para>
468                                 <itemizedlist>
469                                         <listitem>Modify <emphasis role="bold">domain</emphasis> to be the router hostname (following our domain examples, <emphasis role="bold">private.localhost</emphasis> will give the utility <emphasis role="bold">srfsh</emphasis> access to all OpenSRF services, while <emphasis role="bold">public.localhost</emphasis> will only allow access to those OpenSRF services that are publicly exposed).</listitem>
470                                         <listitem>Modify <emphasis role="bold">username</emphasis> and <emphasis role="bold">password</emphasis> to match the <emphasis role="bold">opensrf</emphasis> Jabber user for the chosen domain</listitem>
471                                         <listitem>Modify <emphasis role="bold">logfile</emphasis> to be the full path for a log file to which the user has write access</listitem>
472                                         <listitem>Modify <emphasis role="bold">loglevel</emphasis> as needed for testing</listitem>
473                                 </itemizedlist>
474                                 <figure>
475                                         <title>Sample of configuration file /openils/conf/srfsh.xml.example</title>
476                                         <screen>
477                                         &lt;?xml version="1.0"?>
478                                         &lt;!-- This file follows the standard bootstrap config file layout -->
479                                         &lt;!-- found in opensrf_core.xml -->
480                                         &lt;srfsh>
481                                         &lt;router_name>router&lt;/router_name>
482                                         &lt;domain>private.localhost&lt;/domain>
483                                         &lt;username>opensrf&lt;/username>
484                                         &lt;passwd>evergreen&lt;/passwd>
485                                         &lt;port>5222&lt;/port>
486                                         &lt;logfile>/tmp/srfsh.log&lt;/logfile>
487                                         &lt;!-- 0 None, 1 Error, 2 Warning, 3 Info, 4 debug, 5 Internal (Nasty) -->
488                                         &lt;loglevel>4&lt;/loglevel>
489                                         &lt;/srfsh>
490                                         </screen>
491                                 </figure>
492                         </section>
493                         <section>
494                                 <title>Modify the OpenSRF Environment</title>
495                                 <para>As the <emphasis role="bold">opensrf</emphasis> user, change the file permissions the directory <emphasis>/openils/var/cgi-bin</emphasis> to <emphasis>executable</emphasis>, then modify the shell configuration file <emphasis>~/.bashrc</emphasis> of that user by adding a Perl environmental variable.</para>
496                                 <para><emphasis role="bold">Note:</emphasis> in a multi-server environment, you must add the modifications to <emphasis role="bold">~/.bashrc</emphasis> at the top of the file <emphasis>before</emphasis> the line <emphasis role="bold"> [ -z "$PS1" ] &amp;&amp; return</emphasis>. This will allow headless (scripted) logins to load the correct environment.</para>
497                                 <figure>
498                                         <title>Modify the OpenSRF environment</title>
499                                         <screen>
500                                         # change permissions
501                                         $ su - opensrf
502                                         $ chmod 755 /openils/var/cgi-bin/*.cgi
503
504                                         # add environmental variable
505                                         $ echo "export PERL5LIB=/openils/lib/perl5:\$PERL5LIB" >> ~/.bashrc
506                                         $ . ~/.bashrc    # inherit the new environment
507                                         </screen>
508                                 </figure>
509                         </section>
510                         <section>
511                                 <title>(OPTIONAL) Configuration for Other Languages</title>
512                                 <para>Load translations such as Armenian (hy-AM), Canadian French (fr-CA), and others into the database to complete the translations available in the OPAC and Staff Client. See the section <emphasis><emphasis role="bold"><link linkend="serversideinstallation-localization"> "Adding Language Localization" </link></emphasis></emphasis> for details.</para>
513                         </section>
514                 </section>
515                 <section xml:id="serversideinstallation-starting">
516                         <title>Starting Evergreen</title>
517                         <orderedlist>
518                                 <listitem>
519                                         <para>As the <emphasis role="bold">root</emphasis> user, start the memcached and ejabberd services (if they aren't already running):</para>
520                                         <figure>
521                                                 <title>Start some services</title>
522                                                 <screen>
523                                                 $ su - root
524                                                 $ /etc/init.d/ejabberd start
525                                                 $ /etc/init.d/memcached start
526                                                 </screen>
527                                         </figure>
528                                 </listitem>
529                                 <listitem>
530                                         <para>As the <emphasis role="bold">opensrf</emphasis> user, start Evergreen.</para>
531                                         <para>Use the flag <emphasis>-l</emphasis> to force Evergreen to use <emphasis>localhost</emphasis> (your current system) as the hostname.</para>
532                                         <figure>
533                                                 <title>Start Evergreen</title>
534                                                 <screen>
535                                                 $ su - opensrf
536
537                                                 # ensure you have the needed path
538                                                 $ export PATH=$PATH:/openils/bin
539
540                                                 # start the server;
541                                                 # use "-l" to force hostname to be "localhost"
542                                                 $ osrf_ctl.sh -l -a start_all     
543                                                 </screen>
544                                         </figure>
545                                         <para><emphasis role="bold">Note:</emphasis> You can also start Evergreen <emphasis role="bold">without</emphasis> the <emphasis>-l</emphasis> flag, but the utility <emphasis> osrf_ctl.sh</emphasis> must know the fully qualified domain name for the system on which it will execute. That hostname would have been specified in the configuration file <emphasis>opensrf.xml</emphasis>, which you configured in a previous step.</para>
546                                         <para>[[ explanation for configuring opensrf.xml ]]</para>
547                                         <para>Execute the following command to determine the fully qualified domain name of your system:</para>
548                                         <figure>
549                                                 <title>(OPTIONAL) Determine the fully qualified domain name</title>
550                                                 <screen>
551                                                 $ perl -e 'use Net::Domain qw(hostfqdn); print hostfqdn()."\n"'
552                                                 </screen>
553                                         </figure>
554                                         <itemizedlist>
555                                                 <listitem>When you attempt to start Evergreen, if you receive an error message similar to <emphasis>osrf_ctl.sh: command not found</emphasis>, then your environment variable <emphasis role="bold">PATH</emphasis> does not include the directory <emphasis>/openils/bin</emphasis>. As the <emphasis role="bold">opensrf</emphasis> user, edit the configuration file <emphasis>/home/opensrf/.bashrc</emphasis> and add the following line: <emphasis role="bold"><screen>export PATH=$PATH:/openils/bin</screen></emphasis></listitem>
556                                                 <listitem>When you attempt to start Evergreen, if you receive an error message similar to <emphasis>Can't locate OpenSRF/System.pm in @INC ... BEGIN failed--compilation aborted</emphasis>, then your environment variable <emphasis role="bold">PERL5LIB</emphasis> does not include the directory <emphasis>/openils/lib/perl5</emphasis>. As the <emphasis role="bold">opensrf</emphasis> user, edit the configuration file <emphasis>/home/opensrf/.bashrc</emphasis> and add the following line: <emphasis role="bold"><screen>export PERL5LIB=$PERL5LIB:/openils/lib/perl5</screen></emphasis></listitem>
557                                         </itemizedlist>
558                                 </listitem>
559                                 <listitem>
560                                         <para>As the <emphasis role="bold">opensrf</emphasis> user, generate the Web files needed by the Staff Client and catalogue, and calculate the proximity of locations in the Organizational Unit tree (which allows <emphasis>Holds</emphasis> to work properly).</para>
561                                         <para>You must do this the first time you start Evergreen, and after any time you change the library hierarchy in the configuration file <emphasis>config.cgi</emphasis>.</para>
562                                         <figure>
563                                                 <title>Generate web files</title>
564                                                 <screen>
565                                                 $ su - opensrf
566                                                 $ cd /openils/bin
567                                                 $ ./autogen.sh -c /openils/conf/opensrf_core.xml -u
568                                                 Updating Evergreen organization tree and IDL using '/openils/conf/opensrf_core.xml'
569
570                                                 Updating fieldmapper
571                                                 Exception: OpenSRF::EX::Session 2010-04-16T06:31:38 OpenSRF::Utils::SettingsClient /usr/local/share/perl/5.10.0/OpenSRF/Utils/SettingsClient.pm:103 Session Error: router@private.localhost/opensrf.settings IS NOT CONNECTED TO THE NETWORK!!!
572                                                 </screen>
573                                                 <para>[[ TEST THIS! ]]</para>
574                                         </figure>
575                                 </listitem>
576                                 <listitem>
577                                         <para>As the <emphasis role="bold">root</emphasis> user, restart the Apache Web server:</para>
578                                         <figure>
579                                                 <title>Generate web files</title>
580                                                 <screen>
581                                                 $ su - root
582                                                 $ /etc/init.d/apache2 restart
583                                                 </screen>
584                                         </figure>
585                                         <para>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.</para>
586                                 </listitem>
587                         </orderedlist>
588                 </section>
589                 <section xml:id="serversideinstallation-testing">
590                         <title>Testing the Installation</title>
591                         <para>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.</para>
592                         <section xml:id="serversideinstallation-testing-connections">
593                                 <title>Testing Connections to Evergreen</title>
594                                 <para>Once you have installed and started Evergreen, test your connection to Evergreen. As the <emphasis role="bold">opensrf</emphasis> user start the utility <emphasis>srfsh</emphasis> 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:</para>
595                                 <figure>
596                                         <title>Running the srfsh utility</title>
597                                         <screen>
598                                         $ su - opensrf
599                                         $ /openils/bin/srfsh
600                                         srfsh% login admin open-ils
601                                         Received Data: "250bf1518c7527a03249858687714376"
602                                         ------------------------------------
603                                         Request Completed Successfully
604                                         Request Time in seconds: 0.045286
605                                         ------------------------------------
606                                         Received Data: {
607                                            "ilsevent":0,
608                                            "textcode":"SUCCESS",
609                                            "desc":" ",
610                                            "pid":21616,
611                                            "stacktrace":"oils_auth.c:304",
612                                            "payload":{
613                                               "authtoken":"e5f9827cc0f93b503a1cc66bee6bdd1a",
614                                               "authtime":420
615                                            }
616                                         }
617                                         ------------------------------------
618                                         Request Completed Successfully
619                                         Request Time in seconds: 1.336568
620                                         ------------------------------------
621                                         </screen>
622                                 </figure>
623                                 <para>If this does not work, try other simple troubleshooting steps:</para>
624                                 <itemizedlist>
625                                         <listitem>
626                                                 <para>As the <emphasis role="bold">opensrf</emphasis> user, run the script <emphasis>settings-tester.pl</emphasis> to see if it finds any system configuration problems. Following is sample output generated by executing that script after a successful Evergreen installation:</para>
627                                                 <figure>
628                                                         <title>Executing the script <emphasis> settings-test.pl</emphasis></title>
629                                                         <mediaobject>
630                                                                 <imageobject>
631                                                                         <imagedata fileref="../media/serversideinstallation-testing-1.png" scalefit="1" width="100%"/>
632                                                                 </imageobject>
633                                                         </mediaobject>
634                                                         <mediaobject>
635                                                                 <imageobject>
636                                                                         <imagedata fileref="../media/serversideinstallation-testing-2.png" scalefit="1" width="100%"/>
637                                                                 </imageobject>
638                                                         </mediaobject>
639                                                 </figure>
640                                                 <para>If the output from the script does not help you find the problem, please do not make any further significant changes to your configuration. Follow the steps in the troubleshooting guide, <emphasis><emphasis role="bold"><link linkend="troubleshooting"> "Troubleshooting" </link></emphasis></emphasis> .</para>
641                                         </listitem>
642                                         <listitem>If you have followed the entire set of installation steps listed here closely, you are probably extremely close to a working system. Gather your configuration files and log files and contact the [[ http://open-ils.org/listserv.php|Evergreen development mailing list ]] for assistance before making any drastic changes to your system configuration.</listitem>
643                                 </itemizedlist>
644                         </section>
645                         <section xml:id="serversideinstallation-testing-opac">
646                                 <title>Testing the Catalog</title>
647                                 <para>By default, the OPAC will live at the URL <emphasis>http://my.domain.com/opac/</emphasis>.</para>
648                                 <para>Navigate to this URL and the front page of the OPAC should load. There is a basic text entry field with some extra search options. If you have any problems loading this page, check the Apache error logs. If the page loads but does not function correctly, then check for possible javascript errors. We hightly reccommend testing with the <emphasis>Firefox</emphasis> browser because of the helpful javascript debugging tools.</para>
649                                 <para>Assuming that the OPAC is functioning and there is data in your database, you can now perform other simple functional tests (e.g., searching the catalog).</para>
650                                 <para>[[ other simple functional tests ]]</para>
651                         </section>
652                         <section xml:id="serversideinstallation-testing-othersrfsh">
653                                 <title>Other Tests with srfsh</title>
654                                 <para>There is also a <emphasis>srfsh</emphasis> command called <emphasis>math_bench</emphasis> that sends queries to the math servers. Note that opensrf.math and opensrf.dbmath must be running for this command to work:</para>
655                                 <screen>
656                                 srfsh# math_bench 10
657                                 |.........|.........|.........|.........|.........|.........|.........|.........|.........|.........
658                                 ++++++++++++++++++++++++++++++++++++++++
659                                 Average round trip time: 0.033425
660                                 srfsh#
661                                 </screen>
662                                 <para>The first argument is how many sets of 4 queries (+ - * /) are sent to <emphasis>opensrf.math</emphasis>. 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.</para>
663                                 <para>For other srfsh commands, type 'help' in at the prompt.</para>
664                         </section>
665                 </section>
666                 <section xml:id="serversideinstallation-running-staffclient">
667                         <title>Running the Staff Client on Linux</title>
668                         <para>Run the Evergreen Staff Client on a Linux system by using the application <emphasis>XULRunner</emphasis> (installed automatically and by default with Firefox version 3.0 and later on Ubuntu and Debian distributions).</para>
669                         <para>For example, if the source files for the Evergreen installation are in the directory <emphasis>/home/opensrf/Evergreen-ILS-1.6.0.7/</emphasis>, start the Staff Client as shown in the following command example:</para>
670                         <figure>
671                                 <title>Running the Linux Staff Client</title>
672                                 <screen>
673                                 $ su - opensrf
674                                 $ xulrunner /home/opensrf/Evergreen-ILS-1.6.0.7/Open-ILS/xul/staff_client/build/application.ini
675                                 </screen>
676                         </figure>
677                 </section>
678                 <section xml:id="serversideinstallation-starting-apache-server">
679                         <title>Starting the Apache Web Server</title>
680                         <para>Once you have started Evergreen and confirmed that a basic login attempt works, you can test and start the Apache web server.</para>
681                         <para>As the <emphasis role="bold">root</emphasis> user, execute the following commands. Note the use of <emphasis>restart</emphasis> to force the new Evergreen modules to be reloaded even if the Apache server is already running. Any problems found with your configuration files should be displayed:</para>
682                         <figure>
683                                 <title>Start the Apache Web Server</title>
684                                 <screen>
685                                 $ su - root
686                                 $ apache2ctl configtest &amp;&amp; /etc/init.d/apache2 restart
687                                 </screen>
688                         </figure>
689                 </section>
690                 <section xml:id="serversideinstallation-stopping">
691                         <title>Stopping the Evergreen Services</title>
692                         <para>As the <emphasis role="bold">opensrf</emphasis> user, stop all Evergreen services by using the following command:</para>
693                         <figure>
694                                 <title>Stop all Evergreen services</title>
695                                 <screen>
696                                 $ su - opensrf
697
698                                 # stop the server:
699                                 # use "-l" to force hostname to be "localhost"
700                                 $ osrf_ctl.sh -l -a stop_all
701                                 </screen>
702                         </figure>
703                         <para><emphasis role="bold">Note:</emphasis> You can also stop Evergreen services <emphasis role="bold">without</emphasis> the <emphasis>-l</emphasis> flag, but the utility <emphasis> osrf_ctl.sh</emphasis> must know the fully qualified domain name for the system on which it will execute. That hostname would have been specified in the configuration file <emphasis>opensrf.xml</emphasis>, which you configured in a previous step.</para>
704                         <para>[[ explanation for configuring opensrf.xml ]]</para>
705                 </section>
706                 <section xml:id="serversideinstallation-reports">
707                         <title>Setting Up Support For Reports</title>
708                         <para>Evergreen reports are extremely powerful, but some configuration is required. See the section <emphasis><emphasis role="bold"><link linkend="report-introduction"> "Reports" </link></emphasis></emphasis> for details.</para>
709                 </section>
710                 <section xml:id="serversideinstallation-starting-reporter-daemon">
711                         <title>Starting the Reporter Daemon</title>
712                         <para>Once the <emphasis>open-ils.reporter</emphasis> process is running and enabled on the gateway, you can start the reporter daemon. That process periodically checks for requests for new reports or scheduled reports and gets them running.</para>
713                         <para>As the <emphasis role="bold">opensrf</emphasis> user, start the reporter daemon using the following command:</para>
714                         <figure>
715                                 <title>Starting the Reporter Daemon</title>
716                                 <screen>
717                                 $ su - opensrf
718                                 $ cd /home/opensrf/Evergreen-ILS-1.6.0.7/Open-ILS/src/reporter
719                                 $ ./clark-kent.pl --daemon
720                                 </screen>
721                         </figure>
722                         <para>You can also specify other options with this utility:</para>
723                         <itemizedlist>
724                                 <listitem>--sleep=interval      : number of seconds to sleep between checks for new reports to run; defaults to 10</listitem>
725                                 <listitem>--lockfile=filename   : where to place the lockfile for the process; defaults to <emphasis>/tmp/reporter-LOCK</emphasis></listitem>
726                                 <listitem>--concurrency=integer : number of reporter daemon processes to run; defaults to "1"</listitem>
727                                 <listitem>--boostrap=filename   : OpenSRF bootstrap configuration file; defaults to <emphasis>/openils/conf/opensrf_core.xml</emphasis></listitem>
728                         </itemizedlist>
729                 </section>
730                 <section xml:id="serversideinstallation-stopping-reporter-daemon">
731                         <title>Stopping the Reporter Daemon</title>
732                         <para>To stop the Reporter daemon, you must kill the process and remove the lockfile. The daemon may have just a single associated process, with a lockfile in the default location. <emphasis role="bold">Note:</emphasis> it is possible that several processes are running; see the optional commands in the previous section. As the <emphasis role="bold">opensrf</emphasis> user, perform the following commands to stop the Reporter daemon:</para>
733                         <figure>
734                                 <title>Stopping the Reporter Daemon</title>
735                                 <screen>
736                                 $ su - opensrf
737                                 # find and kill the process ID number(s)
738                                 $ kill `ps wax | grep "Clark Kent" | grep -v grep | cut -b1-6`
739                                 # remove the lock file
740                                 $ rm /tmp/reporter-LOCK
741                                 </screen>
742                         </figure>
743                 </section>
744         </section>
745         <section xml:id="serversideinstallation-opensrf">
746                 <title>Installing OpenSRF</title>
747                 <para>[[ Installing OpenSRF 1.2.x ]]</para>
748         </section>
749         <section xml:id="serversideinstallation-otherlinux">
750                 <title>Installing Evergreen On Other Linux Systems</title>
751                 <para>[[ Installing on Other Linux Systems ]]</para>
752         </section>
753         <section xml:id="serversideinstallation-virtual">
754                 <title>Installing Evergreen in Virtualized Unix Environments</title>
755                 <para>Evergreen software currently runs as a native application on any of several well-known Linux distributions (e.g., <emphasis>Ubuntu</emphasis> and <emphasis>Debian</emphasis>). It does not run as a native application on the Windows operating system (e.g., WindowsXP, WindowsXP Professional, Windows7), but the software can be installed and run on Windows via a virtualized Unix-guest Operating System (using, for example, VirtualBox or VMware to emulate a Linux environment). More information on virtualized environments can be found in the section <emphasis><emphasis role="bold"><link linkend="serversideinstallation-virtual">"Installing Evergreen in Virtualized Unix Environments"</link></emphasis></emphasis>.</para>
756                 <para>[[ Installing Evergreen in Virtualized Unix Environments ]]</para>
757                 <section xml:id="serversideinstallation-virtualized-virtualbox">
758                         <title>VirtualBox</title>
759                         <para>[[ VirtualBox ]]</para>
760                 </section>
761                 <section xml:id="serversideinstallation-virtualized-vmware">
762                         <title>VMware</title>
763                         <para>[[ VMware ]]</para>
764                 </section>
765                 <section xml:id="serversideinstallation-virtualized-virtualpc">
766                         <title>VirtualPC</title>
767                         <para>[[ VirtualPC ]]</para>
768                 </section>
769         </section>
770         <section xml:id="serversideinstallation-previousversions">
771                 <title>Installing Previous Versions of Evergreen</title>
772                 <para>Earlier releases of Evergreen are available. Instructions for installing, configuring and testing earlier versions are found below.</para>
773                 <section xml:id="serversideinstallation-ubuntudebian-previous">
774                         <title>Installing Evergreen 1.4.0.6 on Ubuntu or Debian</title>
775                         <para>[[ Installing Evergreen 1.4.0.6 on Ubuntu or Debian ]]</para>
776                 </section>
777                 <section xml:id="serversideinstallation-opensrf-previous">
778                         <title>Installing OpenSRF 1.0.x</title>
779                         <para>[[ Installing OpenSRF 1.0.x ]]</para>
780                 </section>
781         </section>
782         <section xml:id="serversideinstallation-organizationandpolicy">
783                 <title>Organization and Policy Editing</title>
784                 <para>[[ Organization and Policy Editing ]] </para>
785         </section>
786         <section xml:id="serversideinstallation-staffclient">
787                 <title>Installing the Staff Client</title>
788                 <para>[[ Installing the Staff Client ]]</para>
789         </section>
790         <section xml:id="serversideinstallation-localization">
791                 <title>Adding Language Localization</title>
792                 <para>[[ Adding Localized Languages to the Database ]]</para>
793         </section>
794         <section xml:id="serversideinstallation-sip">
795                 <title>Installing the SIP Server</title>
796                 <para>[[ Installing the SIP Server ]]</para>
797         </section>
798         <section xml:id="serversideinstallation-nginx">
799                 <title>Using nginx to serve static content</title>
800                 <para>[[ Using nginx to serve static content ]]</para>
801         </section>
802 </chapter>