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