1 <?xml version="1.0" encoding="UTF-8"?>
2 <chapter version="5.0" xml:id="serversideinstallation" xml:lang="EN" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xl="http://www.w3.org/1999/xlink">
4 <title>Server-side Installation of Evergreen Software</title>
6 <para>This section describes installation of the Evergreen server-side software and its associated components.
7 Installation, configuration, testing and verification
8 of the software is straightforward if you follow some simple directions.</para>
11 <para>Installing, configuring and testing the Evergreen server-side software is straightforward with the current
12 stable software release. See <xref linkend="serversideinstallation-all"/> for instructions tailored to
13 installing on some particular distributions of the <systemitem class="osname">Linux</systemitem> operating
15 <para>The current version of the Evergreen server-side software runs as a native application on any of several
16 well-known <systemitem class="osname">Linux</systemitem> distributions
17 (e.g., <systemitem class="osname">Ubuntu</systemitem> and <systemitem class="osname">Debian</systemitem>).
18 It does not currently run as a native application on the <systemitem class="osname">Microsoft Windows</systemitem>
19 operating system (e.g., <systemitem class="osname">WindowsXP</systemitem>, <systemitem class="osname">WindowsXP
20 Professional</systemitem>, <systemitem class="osname">Windows7</systemitem>), but the software can still be
21 installed and run on <systemitem class="osname">Windows</systemitem> via a so-called
22 <emphasis>virtualized</emphasis> Linux-guest Operating System (using, for example,
23 <application>"VirtualBox"</application>, or <application>"VMware"</application>, or
24 <application>"VirtualPC"</application> to emulate a <systemitem class="osname">Linux</systemitem>
25 environment). It can also be installed to run on other <systemitem class="osname">Linux</systemitem>
26 systems via virtualized environments (using, for example, <application>"VirtualBox"</application> or
27 <application>"VMware"</application>). More information on virtualized environments can be found in
28 <xref linkend="serversideinstallation-virtual"/>.</para>
29 <para>Installation of the Evergreen Staff Client software is reviewed in <xref linkend="staffclientinstallation"/>. </para>
30 <para>The Evergreen server-side software has dependencies on particular versions of certain major software
31 sub-components. Successful installation of Evergreen software requires that software versions agree with those
33 <table xml:id="serversideinstall-software-dependencies">
34 <title>Evergreen Software Dependencies</title>
36 <primary>Evergreen software dependencies</primary>
38 <tgroup align="left" cols="3" colsep="1" rowsep="1">
39 <colspec colname="Evergreen" colnum="1" colwidth="1.0*"/>
40 <colspec colname="OpenSRF" colnum="2" colwidth="1.0*"/>
41 <colspec colname="PostgreSQL" colnum="3" colwidth="1.0*"/>
44 <entry>Evergreen</entry>
45 <entry>OpenSRF</entry>
46 <entry>PostgreSQL</entry>
51 <entry>1.6.1.x</entry>
53 <entry>8.2 / 8.3</entry>
56 <entry>1.6.0.x</entry>
58 <entry>8.2 / 8.3</entry>
63 <entry>8.1 / 8.2</entry>
68 <entry>8.1 / 8.2</entry>
73 <section xml:id="serversideinstallation-all">
74 <title>Installing Server-Side Software</title>
75 <para>This section describes the installation of the major components of Evergreen server-side software.</para>
76 <para>As far as possible, you should perform the following steps in the exact order given since the
77 success of many steps relies on the successful completion of earlier steps. You should make backup
78 copies of files and environments when you are instructed to do so. In the event of installation problems
79 those copies can allow you to back out of a step gracefully and resume the installation from a known
80 state. See <xref linkend="backingup"/> for further information.</para>
81 <para>Of course, after you successfully complete and test the entire Evergreen installation you should
82 take a final snapshot backup of your system(s). This can be the first in the series of regularly
83 scheduled system backups that you should probably also begin.</para>
84 <section xml:id="serversideinstallation-opensrf">
86 <primary>OpenSRF</primary>
87 <secondary>installation</secondary>
89 <title>Installing OpenSRF 1.4.x On <systemitem class="osname">Ubuntu</systemitem> or
90 <systemitem class="osname">Debian</systemitem></title>
92 <primary>Linux</primary>
93 <secondary>Debian</secondary>
96 <primary>Linux</primary>
97 <secondary>Ubuntu</secondary>
99 <para>This section describes the installation of the latest version of the Open Service Request
100 Framework (OpenSRF), a major component of the Evergreen server-side software, on
101 <systemitem class="osname">Ubuntu</systemitem> or <systemitem class="osname">Debian</systemitem>
102 systems. Evergreen software is integrated with and depends on the OpenSRF software
104 <para>Follow the steps outlined here and run the specified tests to ensure that OpenSRF is
105 properly installed and configured. Do <emphasis><emphasis role="bold">not</emphasis></emphasis>
106 continue with any further Evergreen installation steps
107 until you have verified that OpenSRF has been successfully installed and tested.</para>
109 <para>The following steps have been tested on the x86 (32-bit) and x86-64 (64-bit)
110 platforms. OpenSRF 1.4.0 has been tested on <systemitem class="osname">Debian Etch
111 (4.0)</systemitem>, <systemitem class="osname">Debian Lenny (5.0)</systemitem> and
112 <systemitem class="osname">Ubuntu Lucid Lynx (10.04)</systemitem>.</para>
113 <para>In the following instructions, you are asked to perform certain steps as
114 either the <systemitem class="username">root</systemitem> user, the
115 <systemitem class="username">opensrf</systemitem> user, or the
116 <systemitem class="username">postgres</systemitem> user.</para>
119 <para><systemitem class="osname">Debian</systemitem> -- To become the
120 <systemitem class="username">root</systemitem> user, issue the command
121 <command>su -</command> and enter the password of the
122 <systemitem class="username">root</systemitem> user.</para>
125 <para><systemitem class="osname">Ubuntu</systemitem> -- To become the
126 <systemitem class="username">root</systemitem> user, issue the command
127 <command>sudo su -</command> and enter the password of the
128 <systemitem class="username">root</systemitem> user.</para>
131 <para>To switch from the <systemitem class="username">root</systemitem> user to a
132 different user, issue the command <command>su - USERNAME</command>. For example, to
133 switch from the <systemitem class="username">root</systemitem> user to the
134 <systemitem class="username">opensrf</systemitem> user, issue the command
135 <command>su - opensrf</command>. Once you have become a non-root user, to become
136 the <systemitem class="username">root</systemitem> user again, simply issue the command
137 <command>exit</command>.</para>
141 <title>Add New <systemitem class="username">opensrf</systemitem> User</title>
142 <para>As the <systemitem class="username">root</systemitem> user, add the
143 <systemitem class="username">opensrf</systemitem> user to the system.
144 In the following example, the default shell for the
145 <systemitem class="username">opensrf</systemitem> user is automatically set
146 to <command>/bin/bash</command> to inherit a reasonable environment:</para>
148 <prompt># as the root user:</prompt>
149 <userinput>useradd -m -s /bin/bash opensrf</userinput>
150 <userinput>passwd opensrf</userinput>
154 <title>Download and Unpack Latest OpenSRF Version</title>
156 <primary>OpenSRF</primary>
157 <secondary>download</secondary>
159 <para>The latest version of OpenSRF can be found here:
160 <ulink url="http://evergreen-ils.org/downloads/OpenSRF-1.4.0.tar.gz"></ulink> .
161 As the <systemitem class="username">opensrf</systemitem> user, change to
162 the directory <filename class="directory">/home/opensrf</filename> then download
163 and extract OpenSRF. The new subdirectory
164 <filename class="directory">/home/opensrf/OpenSRF-1.4.0</filename> will be created:</para>
166 <prompt># as the opensrf user:</prompt>
167 <userinput>cd /home/opensrf</userinput>
168 <userinput>wget http://evergreen-ils.org/downloads/OpenSRF-1.4.0.tar.gz</userinput>
169 <userinput>tar zxf OpenSRF-1.4.0.tar.gz</userinput>
173 <title>Install Prerequisites to Build OpenSRF</title>
174 <para>In this section you will install and configure a set of prerequisites that will be
175 used to build OpenSRF. In a following step you will actually build the OpenSRF software
176 using the <command>make</command> utility.</para>
177 <para>As the <systemitem class="username">root</systemitem> user, enter the commands show
178 below to build the prerequisites from the software distribution that you just downloaded
179 and unpacked. Remember to replace <emphasis>[DISTRIBUTION]</emphasis> in the following
180 example with the keyword corresponding to the name of one of the
181 <systemitem class="osname">Linux</systemitem> distributions listed in the following
182 distribution keywords table <xref linkend="serversideinstallation-keywords-opensrf"/> .
183 For example, to install the prerequisites for Ubuntu version 10.04 (Lucid Lynx) you would
184 enter this command: <command>make -f src/extras/Makefile.install ubuntu-lucid</command> .</para>
186 <prompt># as the root user:</prompt>
187 <userinput>cd /home/opensrf/OpenSRF-1.4.0</userinput>
188 <userinput>make -f src/extras/Makefile.install [DISTRIBUTION]</userinput>
190 <table xml:id="serversideinstallation-keywords-opensrf">
191 <title>Keyword Targets for OpenSRF <application>"make"</application> Command</title>
192 <tgroup align="left" cols="2" colsep="1" rowsep="1">
193 <colspec colnum="1" colwidth="1.0*"/>
194 <colspec colnum="2" colwidth="3.0*"/>
197 <entry>Keyword</entry>
198 <entry>Linux Version</entry>
203 <entry>debian-etch</entry>
204 <entry>Debian "Etch" (4.0)</entry>
207 <entry>debian-lenny</entry>
208 <entry>Debian "Lenny" (5.0)</entry>
211 <entry>ubuntu-hardy</entry>
212 <entry>Ubuntu "Hardy Heron" (8.04)</entry>
215 <entry>ubuntu-karmic</entry>
216 <entry>Ubuntu "Karmic Koala" (9.10)</entry>
219 <entry>ubuntu-lucid</entry>
220 <entry>Ubuntu "Lucid Lynx" (10.04)</entry>
223 <entry>fedora13</entry>
224 <entry>Fedora "Goddard" (13)</entry>
227 <entry>centos</entry>
228 <entry>Centos</entry>
235 <entry>gentoo</entry>
236 <entry>Gentoo</entry>
241 <para>This will install a number of packages on the system that are required by OpenSRF,
242 including some Perl modules from CPAN. You can say <literal>No</literal> to the initial
243 CPAN configuration prompt to allow it to automatically configure itself to download and
244 install Perl modules from CPAN. The CPAN installer will ask you a number of times whether
245 it should install prerequisite modules - say <literal>Yes</literal>.</para>
248 <title>Build OpenSRF</title>
249 <para>In this section you will configure, build and install the OpenSRF
250 components that support other Evergreen services.</para>
253 <title>Configure OpenSRF</title>
255 <primary>OpenSRF</primary>
256 <secondary>configure</secondary>
258 <para>As the <systemitem class="username">opensrf</systemitem>
259 user, return to the new OpenSRF build directory and use the
260 <command>configure</command> utility to prepare for the next
261 step of compiling and linking the software. If you wish to
262 include support for Python and Java, add the configuration
263 options <option>--enable-python</option> and
264 <option>--enable-java</option>, respectively:</para>
266 <prompt># as the opensrf user:</prompt>
267 <userinput>cd /home/opensrf/OpenSRF-1.4.0</userinput>
268 <userinput>./configure --prefix=/openils --sysconfdir=/openils/conf</userinput>
269 <userinput>make</userinput>
271 <para>This step will take several minutes to complete.</para>
274 <title>Compile, Link and Install OpenSRF</title>
275 <para>As the <systemitem class="username">root</systemitem>
276 user, return to the new OpenSRF build directory and use the
277 <command>make</command> utility to compile, link and install
280 <prompt># as the root user:</prompt>
281 <userinput>cd /home/opensrf/OpenSRF-1.4.0</userinput>
282 <userinput>make install</userinput>
284 <para>This step will take several minutes to complete.</para>
287 <title>Update the System Dynamic Library Path</title>
288 <para>You must update the system dynamic library path to force
289 your system to recognize the newly installed libraries. As the
290 <systemitem class="username">root</systemitem> user, do this by
291 creating the new file
292 <filename>/etc/ld.so.conf.d/osrf.conf</filename> containing a
293 new library path, then run the command
294 <command>ldconfig</command> to automatically read the file and
295 modify the system dynamic library path:</para>
297 <prompt># as the root user:</prompt>
298 <userinput>echo "/openils/lib" > /etc/ld.so.conf.d/osrf.conf</userinput>
299 <userinput>ldconfig</userinput>
302 <step xml:id="serversideinstallation-definedomains">
303 <title>Define Public and Private OpenSRF Domains</title>
304 <para>For security purposes, OpenSRF uses Jabber domains to separate services
305 into public and private realms. On a single-server system the easiest way to
306 define public and private OpenSRF domains is to define separate host names by
307 adding entries to the file <filename>/etc/hosts</filename>.</para>
308 <para>In the following steps we will use the example domains
309 <systemitem class="domainname">public.localhost</systemitem> for the public
310 domain and <systemitem class="domainname">private.localhost</systemitem>
311 for the private domain. In an upcoming step, you will configure two special
312 <systemitem class="service">ejabberd</systemitem> users
313 to handle communications for these two domains.</para>
314 <para>As the <systemitem class="username">root</systemitem> user, edit the file
315 <filename>/etc/hosts</filename> and add the following example domains:</para>
317 <primary>Jabber</primary>
320 <prompt># as the root user:</prompt>
321 <userinput>127.0.1.2 public.localhost public</userinput>
322 <userinput>127.0.1.3 private.localhost private</userinput>
326 <title>Change File Ownerships</title>
327 <para>Finally, as the <systemitem class="username">root</systemitem>
328 user, change the ownership of all files installed in the
329 directory <filename class="directory">/openils</filename> to the
330 user <systemitem class="username">opensrf</systemitem>:</para>
332 <prompt># as the root user:</prompt>
333 <userinput>chown -R opensrf:opensrf /openils</userinput>
338 <step xml:id="stop-ejabberd-service">
339 <title>Stop the <systemitem class="service">ejabberd</systemitem> Service</title>
341 <primary>ejabberd</primary>
343 <para>Before continuing with configuration of <systemitem class="service">ejabberd</systemitem>
344 you must stop that service. As the <systemitem class="username">root</systemitem> user,
345 execute the following command to stop the service:</para>
347 <prompt># as the root user:</prompt>
348 <userinput>/etc/init.d/ejabberd stop</userinput>
350 <para>If <systemitem class="service">ejabberd</systemitem> reports that it
351 is already stopped, there may have been a problem when it started back
352 in the installation step. If there are any remaining daemon processes such as
353 <systemitem class="daemon">beam</systemitem> or
354 <systemitem class="daemon">epmd</systemitem>
355 you may need to perform the following commands to kill them:</para>
357 <prompt># as the root user:</prompt>
358 <userinput>epmd -kill</userinput>
359 <userinput>killall beam; killall beam.smp</userinput>
360 <userinput>rm /var/lib/ejabberd/*</userinput>
361 <userinput>echo 'ERLANG_NODE=ejabberd@localhost' >> /etc/default/ejabberd</userinput>
365 <title>Edit the <systemitem class="service">ejabberd</systemitem> configuration</title>
366 <para>You must make several configuration changes for the
367 <systemitem class="service">ejabberd</systemitem> service before
369 As the <systemitem class="username">root</systemitem> user, edit the file
370 <filename>/etc/ejabberd/ejabberd.cfg</filename> and make the following changes:</para>
373 <para>Change the line:</para>
375 <prompt>{hosts, ["localhost"]}.</prompt>
377 <para>to instead read:</para>
379 <userinput>{hosts, ["localhost", "private.localhost", "public.localhost"]}.</userinput>
383 <para>Change the line:</para>
385 <prompt>{max_user_sessions, 10}</prompt>
387 <para>to instead read:</para>
389 <userinput>{max_user_sessions, 10000}</userinput>
392 <para>If the line looks something like this:</para>
394 <prompt>{access, max_user_sessions, [{10, all}]}</prompt>
396 <para>then change it to instead read:</para>
398 <userinput>{access, max_user_sessions, [{10000, all}]}</userinput>
402 <para>Change all three occurrences of:</para>
404 <prompt>max_stanza_size</prompt>
406 <para>to instead read:</para>
408 <userinput>2000000</userinput>
412 <para>Change both occurrences of:</para>
414 <prompt>maxrate</prompt>
416 <para>to instead read:</para>
418 <userinput>500000</userinput>
422 <para>Comment out the line:</para>
424 <prompt>{mod_offline, []}</prompt>
426 <para>by placing two <literal>%</literal> comment signs in front
427 so it instead reads:</para>
429 <userinput>%%{mod_offline, []}</userinput>
434 <step xml:id="serversideinstallation-opensrf-continued">
435 <title>Restart the <systemitem class="service">ejabberd</systemitem> service</title>
436 <para>As the <systemitem class="username">root</systemitem> user, restart the
437 <systemitem class="service">ejabberd</systemitem> service to test the
438 configuration changes and to register your users:</para>
440 <prompt># as the root user:</prompt>
441 <userinput>/etc/init.d/ejabberd start</userinput>
445 <title>Register <systemitem class="username">router</systemitem> and
446 <systemitem class="username">opensrf</systemitem> as
447 <systemitem class="service">ejabberd</systemitem> users</title>
448 <para>The two <systemitem class="service">ejabberd</systemitem> users
449 <systemitem class="username">router</systemitem> and
450 <systemitem class="username">opensrf</systemitem> must be registered
451 and configured to manage OpenSRF router service and communications
452 for the two domains <literal>public.localhost</literal> and
453 <literal>private.localhost</literal> that you added to the file
454 <filename>/etc/hosts</filename> in a previous step
455 (see <xref linkend="serversideinstallation-definedomains"/>).
456 The users include:</para>
459 <para>the <systemitem class="username">router</systemitem> user,
460 to whom all requests to connect to an OpenSRF service will be
464 <para>the <systemitem class="username">opensrf</systemitem> user,
465 which clients use to connect to OpenSRF services (you may name
466 the user anything you like, but we use
467 <literal>opensrf</literal> in these examples)</para>
470 <para>As the <systemitem class="username">root</systemitem> user, execute the
471 <command>ejabberdctl</command> utility as shown below to register and create passwords
472 for the users <systemitem class="username">router</systemitem> and
473 <systemitem class="username">opensrf</systemitem> on each domain:</para>
475 <prompt># as the root user:</prompt>
476 <prompt># Note: the syntax for registering a user with ejabberdctl is:</prompt>
477 <prompt># ejabberdctl register USER DOMAIN PASSWORD</prompt>
478 <userinput>ejabberdctl register router private.localhost NEWPASSWORD</userinput>
479 <userinput>ejabberdctl register router public.localhost NEWPASSWORD</userinput>
480 <userinput>ejabberdctl register opensrf private.localhost NEWPASSWORD</userinput>
481 <userinput>ejabberdctl register opensrf public.localhost NEWPASSWORD</userinput>
483 <para>Note that the users <systemitem class="username">router</systemitem> and
484 <systemitem class="username">opensrf</systemitem> and their respective passwords
485 will be used again in <xref linkend="serversideinstallation-passwords"/> when
486 we modify the OpenSRF configuration file <filename>/openils/conf/opensrf_core.xml</filename> .</para>
488 <step xml:id="serversideinstallation-opensrf-createconfig">
489 <title>Create OpenSRF configuration files</title>
490 <para>As the <systemitem class="username">opensrf</systemitem> user,
491 execute the following commands to create the new configuration files
492 <filename>/openils/conf/opensrf_core.xml</filename> and
493 <filename>/openils/conf/opensrf.xml</filename> from the example templates:</para>
495 <prompt># as the opensrf user:</prompt>
496 <userinput>cd /openils/conf</userinput>
497 <userinput>cp opensrf.xml.example opensrf.xml</userinput>
498 <userinput>cp opensrf_core.xml.example opensrf_core.xml</userinput>
501 <step xml:id="serversideinstallation-passwords">
502 <title>Update usernames and passwords in the OpenSRF configuration file</title>
503 <para>As the <systemitem class="username">opensrf</systemitem> user, edit the
504 OpenSRF configuration file <filename>/openils/conf/opensrf_core.xml</filename>
505 and update the usernames and passwords to match the values shown in the
506 following table. The left-hand side of <xref linkend="serversideinstallation-xpath-table-1"/>
507 shows common XPath syntax to indicate the approximate position within the XML
508 file that needs changes. The right-hand side of the table shows the replacement
510 <table xml:id="serversideinstallation-xpath-table-1">
511 <title>Sample XPath syntax for editing "opensrf_core.xml"</title>
512 <tgroup align="left" cols="2" colsep="1" rowsep="1">
513 <colspec colname="Xpath" colnum="1" colwidth="1.6*"/>
514 <colspec colname="Value" colnum="2" colwidth="2.0*"/>
517 <entry>XPath location</entry>
523 <entry>/config/opensrf/username</entry>
525 <systemitem class="username">opensrf</systemitem>
529 <entry>/config/opensrf/passwd </entry>
530 <entry><systemitem class="domainname">private.localhost</systemitem>
532 <systemitem class="username">opensrf</systemitem> user
536 <entry>/config/gateway/username</entry>
538 <systemitem class="username">opensrf</systemitem>
542 <entry>/config/gateway/passwd</entry>
543 <entry><systemitem class="domainname">public.localhost</systemitem>
545 <systemitem class="username">opensrf</systemitem> user
549 <entry>/config/routers/router/transport/username,
550 first entry where server == public.localhost</entry>
552 <systemitem class="username">router</systemitem>
556 <entry>/config/routers/router/transport/password,
557 first entry where server == public.localhost</entry>
558 <entry><systemitem class="domainname">public.localhost</systemitem>
560 <systemitem class="username">router</systemitem> user
564 <entry>/config/routers/router/transport/username,
565 second entry where server == private.localhost</entry>
567 <systemitem class="username">router</systemitem>
571 <entry>/config/routers/router/transport/password,
572 second entry where server == private.localhost</entry>
573 <entry><systemitem class="domainname">private.localhost</systemitem>
575 <systemitem class="username">router</systemitem> user
581 <para>You may also need to modify the file to specify the domains from which
582 <systemitem class="service">OpenSRF</systemitem> will accept connections,
583 and to which it will make connections.
584 If you are installing <application>OpenSRF</application> on a single server
585 and using the <systemitem class="domainname">private.localhost</systemitem> and
586 <systemitem class="domainname">public.localhost</systemitem> domains,
587 these will already be set to the correct values. Otherwise, search and replace
588 to match values for your own systems.</para>
591 <title>Set location of the persistent database</title>
592 <para>As the <systemitem class="username">opensrf</systemitem> user, edit the
593 file <filename>/openils/conf/opensrf.xml</filename>, then find and modify the
594 element <literal>dbfile</literal> (near the end of the file) to set the
595 location of the persistent database. Change the default line:</para>
597 <prompt>/openils/var/persist.db</prompt>
599 <para>to instead read:</para>
601 <userinput>/tmp/persist.db</userinput>
603 <para>Following is a sample modification of that portion of the file:</para>
604 <programlisting language="xml"><![CDATA[
605 <!-- Example of an app-specific setting override -->
608 <dbfile>/tmp/persist.db</dbfile>
613 <step xml:id="serversideinstallation-srfsh">
614 <title>Create configuration files for users needing <command>srfsh</command></title>
615 <para>In this section you will set up a special configuration file for each user
616 who will need to run the <command>srfsh</command> (pronounced <emphasis>surf
617 shell</emphasis>) utility.</para>
619 <primary>srfsh</primary>
621 <para>The software installation will automatically create the utility
622 <command>srfsh</command> (surf shell), a command line diagnostic tool for
623 testing and interacting with <application>OpenSRF</application>. It will be used
624 in a future step to complete and test the Evergreen installation. See
625 <xref linkend="serversideinstallation-testing"/> for further information.</para>
626 <para>As the <systemitem class="username">root</systemitem> user, copy the
627 sample configuration file <filename>/openils/conf/srfsh.xml.example</filename>
628 to the home directory of each user who will use <command>srfsh</command>.
629 For instance, do the following for the
630 <systemitem class="username">opensrf</systemitem> user:</para>
632 <prompt># as the root user:</prompt>
633 <userinput>cp /openils/conf/srfsh.xml.example /home/opensrf/.srfsh.xml</userinput>
635 <para>Edit each user's file <filename>~/.srfsh.xml</filename> and make the
636 following changes:</para>
639 <para>Modify <literal>domain</literal> to be the router hostname
640 (following our domain examples,
641 <systemitem class="domainname">private.localhost</systemitem> will give
642 <command>srfsh</command> access to all OpenSRF services, while
643 <systemitem class="domainname">public.localhost</systemitem>
644 will only allow access to those OpenSRF services that are
645 publicly exposed).</para>
648 <para>Modify <literal>username</literal> and
649 <literal>password</literal> to match the
650 <literal>opensrf</literal> Jabber user for the chosen
654 <para>Modify <literal>logfile</literal> to be the full path for
655 a log file to which the user has write access</para>
658 <para>Modify <literal>loglevel</literal> as needed for testing</para>
661 <para>Change the owner of the file to match the owner of the home directory</para>
664 <para>Following is a sample of the file:</para>
665 <programlisting language="xml"><![CDATA[
666 <?xml version="1.0"?>
667 <!-- This file follows the standard bootstrap config file layout -->
668 <!-- found in opensrf_core.xml -->
670 <router_name>router</router_name>
671 <domain>private.localhost</domain>
672 <username>opensrf</username>
673 <passwd>SOMEPASSWORD</passwd>
675 <logfile>/tmp/srfsh.log</logfile>
676 <!-- 0 None, 1 Error, 2 Warning, 3 Info, 4 debug, 5 Internal (Nasty) -->
677 <loglevel>4</loglevel>
682 <title>Modify the environmental variable <envar>PATH</envar> for the
683 <systemitem class="username">opensrf</systemitem> user</title>
684 <para>As the <systemitem class="username">opensrf</systemitem> user, modify the
685 environmental variable <envar>PATH</envar> by adding a new file path to the
686 <systemitem class="username">opensrf</systemitem> user's shell configuration
687 file <filename>~/.bashrc</filename>:</para>
689 <prompt># as the opensrf user:</prompt>
690 <userinput>echo "export PATH=/openils/bin:\$PATH" >> ~/.bashrc</userinput>
694 <title>Start OpenSRF</title>
695 <para>As the <systemitem class="username">root</systemitem> user, start the
696 <systemitem class="service">ejabberd</systemitem> and
697 <systemitem class="service">memcached</systemitem> services:</para>
699 <prompt># as the root user:</prompt>
700 <userinput>/etc/init.d/ejabberd start</userinput>
701 <userinput>/etc/init.d/memcached start</userinput>
703 <para>As the <systemitem class="username">opensrf</systemitem> user,
704 start OpenSRF as follows:</para>
706 <prompt># as the opensrf user:</prompt>
707 <userinput>osrf_ctl.sh -l -a start_all</userinput>
709 <para>The flag <option>-l</option> forces Evergreen to use
710 <systemitem class="domainname">localhost</systemitem> (your current system)
711 as the hostname. The flag <option>-a start_all</option> starts the other
712 OpenSRF <systemitem class="service">router</systemitem> ,
713 <systemitem class="service">Perl</systemitem> , and
714 <systemitem class="service">C</systemitem> services.</para>
717 <para>You can also start Evergreen without the
718 <option>-l</option> flag, but the <command>osrf_ctl.sh</command>
719 utility must know the fully qualified domain name for the system
720 on which it will execute. That hostname was probably specified
721 in the configuration file <filename>opensrf.xml</filename> which
722 you configured in a previous step.</para>
725 <para>If you receive an error message similar to
726 <emphasis>osrf_ctl.sh: command not found</emphasis>, then your
727 environment variable <envar>PATH</envar> does not include the
728 directory <filename class="directory">/openils/bin</filename>.
729 As the <systemitem class="username">opensrf</systemitem> user,
730 edit the configuration file <filename>~/.bashrc</filename> and
731 add the following line:
732 <literal>export PATH=$PATH:/openils/bin</literal></para>
737 <title>Test connections to OpenSRF</title>
738 <para>Once you have installed and started OpenSRF, as the
739 <systemitem class="username">root</systemitem> user, test your connection to
740 <systemitem class="service">OpenSRF</systemitem> using the <command>srfsh</command>
741 utility and trying to call the <command>add</command> method on the OpenSRF
742 <systemitem class="service">math</systemitem> service:</para>
744 <prompt># as the root user:</prompt>
745 <userinput>/openils/bin/srfsh</userinput>
746 <computeroutput>srfsh# <userinput>request opensrf.math add 2 2</userinput></computeroutput>
747 <computeroutput>Received Data: 4</computeroutput>
748 <computeroutput>------------------------------------</computeroutput>
749 <computeroutput>Request Completed Successfully</computeroutput>
750 <computeroutput>Request Time in seconds: 0.007519</computeroutput>
751 <computeroutput>------------------------------------</computeroutput>
753 <para>For other <command>srfsh</command> commands, type in
754 <userinput>help</userinput> at the prompt.</para>
757 <title>Stop OpenSRF</title>
758 <para>After OpenSRF has started, you can stop it at any time by using the
759 <command>osrf_ctl.sh</command> again. As the
760 <systemitem class="username">opensrf</systemitem>
761 user, stop OpenSRF as follows:</para>
763 <prompt># as the opensrf user:</prompt>
764 <userinput>osrf_ctl.sh -l -a stop_all</userinput>
769 <section xml:id="serversideinstallation-ubuntudebian">
770 <title>Installing Evergreen 1.6.1.x On <systemitem class="osname">Ubuntu</systemitem> or
771 <systemitem class="osname">Debian</systemitem></title>
773 <primary>Linux</primary>
774 <secondary>Debian</secondary>
777 <primary>Linux</primary>
778 <secondary>Ubuntu</secondary>
780 <para>This section outlines the installation process for the latest stable version of
782 <para>In this section you will download, unpack, install, configure and test the Evergreen
783 system, including the Evergreen server and the PostgreSQL database system. You will make several
784 configuration changes and adjustments to the software, including updates to configure the system
785 for your own locale, and some updates needed to work around a few known issues.</para>
787 <para>The following steps have been tested on the x86 (32-bit) and x86-64 (64-bit)
788 architectures. There may be differences between the Desktop and Server editions of
789 <systemitem class="osname">Ubuntu</systemitem>. These instructions assume the Server
791 <para>In the following instructions, you are asked to perform certain steps as
792 either the <systemitem class="username">root</systemitem> user, the
793 <systemitem class="username">opensrf</systemitem> user, or the
794 <systemitem class="username">postgres</systemitem> user.</para>
797 <para><systemitem class="osname">Debian</systemitem> -- To become the
798 <systemitem class="username">root</systemitem> user, issue the command
799 <command>su -</command> and enter the password of the
800 <systemitem class="username">root</systemitem> user.</para>
803 <para><systemitem class="osname">Ubuntu</systemitem> -- To become the
804 <systemitem class="username">root</systemitem> user, issue the command
805 <command>sudo su -</command> and enter the password of the
806 <systemitem class="username">root</systemitem> user.</para>
809 <para>To switch from the <systemitem class="username">root</systemitem> user to a
810 different user, issue the command <command>su - USERNAME</command>. For example, to
811 switch from the <systemitem class="username">root</systemitem> user to the
812 <systemitem class="username">opensrf</systemitem> user, issue the command
813 <command>su - opensrf</command>. Once you have become a non-root user, to become the
814 <systemitem class="username">root</systemitem> user again, simply issue the command
815 <command>exit</command>.</para>
819 <title>Install OpenSRF</title>
820 <para>Evergreen software is integrated with and depends on the Open Service
821 Request Framework (OpenSRF) software system. For further information on
822 installing, configuring and testing OpenSRF, see
823 <xref linkend="serversideinstallation-opensrf"/>.</para>
824 <para>Follow the steps outlined in that section and run the specified tests to
825 ensure that OpenSRF is properly installed and configured. Do
826 <emphasis><emphasis role="bold">not</emphasis></emphasis> continue with
827 any further Evergreen installation steps until you have verified that OpenSRF
828 has been successfully installed and tested.</para>
831 <title>Download and Unpack Latest Evergreen Version</title>
832 <para>The latest version of Evergreen can be found here:
833 <ulink url="http://evergreen-ils.org/downloads/Evergreen-ILS-1.6.1.2.tar.gz"></ulink> .
834 As the <systemitem class="username">opensrf</systemitem> user, change to
835 the directory <filename class="directory">/home/opensrf</filename> then download
836 and extract Evergreen. The new subdirectory
837 <filename class="directory">/home/opensrf/Evergreen-ILS-1.6.1.2</filename> will be created:</para>
839 <prompt># as the opensrf user:</prompt>
840 <userinput>cd /home/opensrf</userinput>
841 <userinput>wget http://evergreen-ils.org/downloads/Evergreen-ILS-1.6.1.2.tar.gz</userinput>
842 <userinput>tar zxf Evergreen-ILS-1.6.1.2.tar.gz</userinput>
845 <step xml:id="serversideinstallation-installprereq">
846 <title>Install Prerequisites to Build Evergreen</title>
847 <para>In this section you will install and configure a set of prerequisites that will be
848 used later in <xref linkend="serversideinstallation-configure"/> and
849 <xref linkend="serversideinstallation-compile"/> to build the Evergreen software
850 using the <command>make</command> utility.</para>
851 <para>As the <systemitem class="username">root</systemitem> user, enter the commands show
852 below to build the prerequisites from the software distribution that you just downloaded
853 and unpacked. Remember to replace <emphasis>[DISTRIBUTION]</emphasis> in the following
854 example with the keyword corresponding to the name of one of the
855 <systemitem class="osname">Linux</systemitem> distributions listed in the following
856 distribution keywords table <xref linkend="serversideinstallation-keywords-evergreen"/> .
857 For example, to install the prerequisites for Ubuntu version 9.10 (Karmic Koala) you would
858 enter this command: <command>make -f Open-ILS/src/extras/Makefile.install
859 ubuntu-karmic</command>.</para>
861 <prompt># as the root user:</prompt>
862 <userinput>cd /home/opensrf/Evergreen-ILS-1.6.1.2</userinput>
863 <userinput>make -f Open-ILS/src/extras/Makefile.install [DISTRIBUTION]</userinput>
865 <table xml:id="serversideinstallation-keywords-evergreen">
866 <title>Keyword Targets for Evergreen <application>"make"</application> Command</title>
867 <tgroup align="left" cols="2" colsep="1" rowsep="1">
868 <colspec colnum="1" colwidth="1.0*"/>
869 <colspec colnum="2" colwidth="3.0*"/>
872 <entry>Keyword</entry>
873 <entry>Linux Version</entry>
878 <entry>debian-etch</entry>
879 <entry>Debian "Etch" (4.0)</entry>
882 <entry>debian-lenny</entry>
883 <entry>Debian "Lenny" (5.0)</entry>
886 <entry>ubuntu-hardy</entry>
887 <entry>Ubuntu "Hardy Heron" (8.04)</entry>
890 <entry>ubuntu-intrepid</entry>
891 <entry>Ubuntu "Intrepid Ibex" (8.10)</entry>
894 <entry>ubuntu-karmic</entry>
895 <entry>Ubuntu "Karmic Koala" (9.10)</entry>
898 <entry>ubuntu-karmic</entry>
899 <entry>Ubuntu "Lucid Lynx" (10.04)</entry>
902 <entry>centos</entry>
903 <entry>Centos</entry>
910 <entry>gentoo</entry>
911 <entry>Gentoo</entry>
917 <step performance="optional" xml:id="serversideinstallation-postgresql-default">
918 <title>(OPTIONAL) Install the PostgreSQL Server</title>
920 <primary>databases</primary>
921 <secondary>PostgreSQL</secondary>
923 <para>Since the PostgreSQL server is usually a standalone server in multi-server
924 production systems, the prerequisite installer Makefile in the previous section
925 (see <xref linkend="serversideinstallation-installprereq"/>)
926 does not automatically install PostgreSQL. You must install the PostgreSQL server
927 yourself, either on the same system as Evergreen itself or on another system.
928 If your PostgreSQL server is on a different system, just skip this step.
929 If your PostgreSQL server will be on the same system as your Evergreen
930 software, then install the required PostgreSQL server packages as follows.
931 For further information on manually installing PostgreSQL, visit the official
932 <link xl:href="http://www.postgresql.org/">PostgreSQL Site</link>.</para>
933 <para>For <systemitem class="osname">Debian Lenny</systemitem> and
934 <systemitem class="osname">Ubuntu Hardy (8.04)</systemitem>, execute these commands:</para>
936 <prompt># as the root user:</prompt>
937 <userinput>cd /home/opensrf/Evergreen-ILS-1.6.1.2</userinput>
938 <userinput>make -f Open-ILS/src/extras/Makefile.install install_pgsql_server_debs_83</userinput>
940 <para>For <systemitem class="osname">Ubuntu Karmic (9.10)</systemitem> and
941 <systemitem class="osname">Ubuntu Lucid (10.04)</systemitem>, execute these commands:</para>
943 <prompt># as the root user:</prompt>
944 <userinput>cd /home/opensrf/Evergreen-ILS-1.6.1.2</userinput>
945 <userinput>make -f Open-ILS/src/extras/Makefile.install install_pgsql_server_debs_84</userinput>
948 <para>PostgreSQL versions 8.3 or 8.4 are the recommended versions to work
949 with Evergreen 1.6.1.2 . If you have an older version of PostgreSQL, you
950 should upgrade before installing Evergreen. To find the running version of
951 PostgreSQL, as the <systemitem class="username">postgres</systemitem>
952 user execute the command <command>psql</command>, then type
953 <userinput>SELECT version();</userinput> to get detailed information
954 about your version of PostgreSQL.</para>
957 <step performance="optional">
958 <title>Install Perl Modules on PostgreSQL Server</title>
959 <para>If PostgreSQL is running on the same system as your Evergreen software,
960 then the Perl modules will automatically be available. Just skip this step.
961 Otherwise, continue if your PostgreSQL server is running on another system.</para>
962 <para>You will need to install several Perl modules on the other system. As the
963 <systemitem class="username">root</systemitem> user install the following Perl
966 <prompt># as the root user:</prompt>
967 <prompt># first, ensure the gcc compiler is installed:</prompt>
968 <userinput>apt-get install gcc</userinput>
969 <prompt># then install the Perl modules:</prompt>
970 <userinput>perl -MCPAN -e shell</userinput>
971 <computeroutput>cpan></computeroutput>
972 <userinput>install JSON::XS</userinput>
973 <computeroutput>cpan></computeroutput>
974 <userinput>install MARC::Record</userinput>
975 <computeroutput>cpan></computeroutput>
976 <userinput>install MARC::File::XML</userinput>
978 <para>For more information on installing Perl Modules vist the official
979 <link xl:href="http://www.cpan.org/">CPAN</link> site.</para>
981 <primary>Perl</primary>
982 <secondary>CPAN</secondary>
986 <title>Update the System Dynamic Library Path</title>
987 <para>You must update the system dynamic library path to force your system to recognize
988 the newly installed libraries. As the <systemitem class="username">root</systemitem> user,
989 do this by creating the new file <filename>/etc/ld.so.conf.d/osrf.conf</filename>
990 containing a new library path, then run the command <command>ldconfig</command> to
991 automatically read the file and modify the system dynamic library path:</para>
993 <prompt># as the root user:</prompt>
994 <userinput>echo "/usr/local/lib" >> /etc/ld.so.conf.d/osrf.conf</userinput>
995 <userinput>echo "/usr/local/lib/dbd" >> /etc/ld.so.conf.d/osrf.conf</userinput>
996 <userinput>ldconfig</userinput>
999 <step performance="optional">
1000 <title>Restart the PostgreSQL Server</title>
1001 <para>If PostgreSQL is running on the same system as the rest of Evergreen, as
1002 the <systemitem class="username">root</systemitem> user you must restart
1003 PostgreSQL to re-read the new library paths just configured. If PostgreSQL is
1004 running on another system, you may skip this step.
1005 As the <systemitem class="username">opensrf</systemitem> user,
1006 execute the following command, where
1007 <literal>[PGSQL_VERSION]</literal> is your installed PostgreSQL version
1008 (e.g. <literal>8.3</literal>):</para>
1010 <prompt># as the opensrf user:</prompt>
1011 <userinput>/etc/init.d/postgresql-[PGSQL_VERSION] restart</userinput>
1014 <step xml:id="serversideinstallation-configure">
1015 <title>Configure Evergreen</title>
1016 <para>In this step you will use the <command>configure</command> and
1017 <command>make</command> utilities to configure Evergreen so it can be compiled
1018 and linked later in <xref linkend="serversideinstallation-compile"/>.</para>
1019 <para>As the <systemitem class="username">opensrf</systemitem> user, return to
1020 the Evergreen build directory and execute these commands:</para>
1022 <prompt># as the opensrf user:</prompt>
1023 <userinput>cd /home/opensrf/Evergreen-ILS-1.6.1.2</userinput>
1024 <userinput>./configure --prefix=/openils --sysconfdir=/openils/conf</userinput>
1025 <userinput>make</userinput>
1028 <step xml:id="serversideinstallation-compile">
1029 <title>Compile, Link and Install Evergreen</title>
1030 <para>In this step you will actually compile, link and install Evergreen and the
1031 default Evergreen Staff Client.</para>
1032 <para>As the <systemitem class="username">root</systemitem> user, return to the
1033 Evergreen build directory and use the <command>make</command> utility as shown below:</para>
1035 <prompt># as the root user:</prompt>
1036 <userinput>cd /home/opensrf/Evergreen-ILS-1.6.1.2</userinput>
1037 <userinput>make STAFF_CLIENT_BUILD_ID=rel_1_6_1_2 install</userinput>
1039 <para>The Staff Client will also be automatically built, but you must remember
1040 to set the variable <envar>STAFF_CLIENT_BUILD_ID</envar> to match the version of the Staff
1041 Client you will use to connect to the Evergreen server. For further information on manually
1042 building the Staff Client, see
1043 <xref linkend="staffclientinstallation-building-staffclient"/>.</para>
1044 <para>The above commands will create a new subdirectory
1045 <filename class="directory">/openils/var/web/xul/rel_1_6_1_2</filename>
1046 containing the Staff Client.</para>
1047 <para>To complete the Staff Client installation, as the
1048 <systemitem class="username">root</systemitem> user execute the following commands to
1049 create a symbolic link named <emphasis>server</emphasis> in the head of the Staff Client
1050 directory <filename class="directory">/openils/var/web/xul</filename> that points to the
1051 subdirectory <filename class="directory">/server</filename> of the new Staff Client
1054 <prompt># as the root user:</prompt>
1055 <userinput>cd /openils/var/web/xul</userinput>
1056 <userinput>ln -sf rel_1_6_1_2/server server</userinput>
1060 <title>Copy the OpenSRF Configuration Files</title>
1061 <para>In this step you will replace some OpenSRF configuration files that you set up in
1062 <xref linkend="serversideinstallation-opensrf-createconfig"/> when you installed and
1063 tested OpenSRF.</para>
1064 <para>You must copy several example OpenSRF configuration files into place after first
1065 creating backup copies for troubleshooting purposes, then change all the file ownerships
1066 to <systemitem class="username">opensrf</systemitem>.
1067 As the <systemitem class="username">root</systemitem> user, execute the following
1070 <prompt># as the root user:</prompt>
1071 <userinput>cd /openils/conf</userinput>
1072 <userinput>cp opensrf.xml opensrf.xml.BAK</userinput>
1073 <userinput>cp opensrf_core.xml opensrf_core.xml.BAK</userinput>
1074 <userinput>cp opensrf.xml.example opensrf.xml</userinput>
1075 <userinput>cp opensrf_core.xml.example opensrf_core.xml</userinput>
1076 <userinput>cp oils_web.xml.example oils_web.xml</userinput>
1077 <userinput>chown -R opensrf:opensrf /openils/</userinput>
1081 <title>Create and Configure PostgreSQL Database</title>
1083 <primary>databases</primary>
1084 <secondary>PostgreSQL</secondary>
1086 <para>In this step you will create the Evergreen database. In the commands
1087 below, remember to adjust the path of the <emphasis role="bold">contrib</emphasis>
1088 repository to match your PostgreSQL server
1089 layout. For example, if you built PostgreSQL from source the path would be
1090 <filename class="directory">/usr/local/share/contrib</filename>; if you
1091 installed the PostgreSQL 8.3 server packages on <systemitem class="osname">Ubuntu 8.04</systemitem>,
1093 <systemitem class="directory">/usr/share/postgresql/8.3/contrib/</systemitem>.</para>
1097 <emphasis role="bold">Create and configure the database</emphasis>
1099 <para>As the <systemitem class="username">postgres</systemitem>
1100 user on the PostgreSQL system create the PostgreSQL database,
1101 then set some internal paths:</para>
1103 <prompt># as the postgres user:</prompt>
1104 <userinput>createdb evergreen -E UTF8 -T template0</userinput>
1105 <userinput>createlang plperl evergreen</userinput>
1106 <userinput>createlang plperlu evergreen</userinput>
1107 <userinput>createlang plpgsql evergreen</userinput>
1109 <para>Continue as the <systemitem class="username">postgres</systemitem> user
1110 and execute the SQL scripts as shown below, adjusting the paths as needed, where
1111 <literal>[PGSQL_VERSION]</literal> is your installed PostgreSQL
1112 version (e.g. <literal>8.3</literal>).</para>
1114 <prompt># as the postgres user:</prompt>
1115 <userinput>psql -f /usr/share/postgresql/[PGSQL_VERSION]/contrib/tablefunc.sql evergreen</userinput>
1116 <userinput>psql -f /usr/share/postgresql/[PGSQL_VERSION]/contrib/tsearch2.sql evergreen</userinput>
1117 <userinput>psql -f /usr/share/postgresql/[PGSQL_VERSION]/contrib/pgxml.sql evergreen</userinput>
1120 <step xml:id="serversideinstallation-postgresqlcreateuser">
1121 <title>Create <systemitem class="username">evergreen</systemitem> PostgreSQL user</title>
1122 <para>As the <systemitem class="username">postgres</systemitem>
1123 user on the PostgreSQL system, create a new PostgreSQL user
1124 named <systemitem class="username">evergreen</systemitem> and
1125 assign a password:</para>
1127 <prompt># as the postgres user:</prompt>
1128 <userinput>createuser -P -s evergreen</userinput>
1129 <computeroutput>Enter password for new role: <userinput>MYNEWPASSWORD</userinput></computeroutput>
1130 <computeroutput>Enter it again: <userinput>MYNEWPASSWORD</userinput></computeroutput>
1134 <title>Create database schema</title>
1135 <para>In this step you will create the database schema and configure your
1136 system with the corresponding database authentication details for the
1137 <emphasis>evergreen</emphasis> database user that you just created in
1138 <xref linkend="serversideinstallation-postgresqlcreateuser"/>.</para>
1139 <para>As the <systemitem class="username">root</systemitem> user, enter
1140 the following commands and replace <emphasis>HOSTNAME, PORT,
1141 PASSWORD</emphasis> and <emphasis>DATABASENAME</emphasis> with appropriate
1144 <prompt># as the root user:</prompt>
1145 <userinput>cd /home/opensrf/Evergreen-ILS-1.6.1.2</userinput>
1146 <userinput>perl Open-ILS/src/support-scripts/eg_db_config.pl --update-config \</userinput>
1147 <userinput> --service all --create-schema --create-bootstrap --create-offline \</userinput>
1148 <userinput> --hostname HOSTNAME --port PORT \</userinput>
1149 <userinput> --user evergreen --password PASSWORD --database DATABASENAME</userinput>
1151 <para>On most systems, <emphasis>HOSTNAME</emphasis> will be
1152 <emphasis role="bold">localhost</emphasis> and
1153 <emphasis>PORT</emphasis> will be <emphasis role="bold">5432</emphasis>.
1154 Of course, values for <emphasis>PASSWORD</emphasis> and
1155 <emphasis>DATABASENAME</emphasis> must match the values you used in
1156 <xref linkend="serversideinstallation-postgresqlcreateuser"/>.</para>
1157 <para>As the command executes, you may see warnings similar to:
1158 <literal>ERROR: schema SOMENAME does not exist</literal> (in fact,
1159 you may see one warning per schema) but they can be safely ignored.</para>
1161 <para>If you are entering the above command on a single line, do
1162 not include the <literal>\</literal> (backslash) characters. If
1163 you are using the <command>bash</command> shell, these should only
1164 be used at the end of a line at a <command>bash</command> prompt
1165 to indicate that the command is continued on the next line.</para>
1171 <title>Configure the Apache web server</title>
1173 <primary>web server</primary>
1174 <secondary>Apache</secondary>
1176 <para>In this step you will configure the Apache web server to support Evergreen
1178 <para>First, you must enable some built-in Apache modules and install some
1179 additional Apache configuration files. Then you will create a new Security
1180 Certificate. Finally, you must make several changes to the Apache configuration
1184 <title>Enable the required Apache Modules</title>
1185 <para>As the <systemitem class="username">root</systemitem>
1186 user, enable some modules in the Apache server, then copy the
1187 new configuration files to the Apache server directories:</para>
1189 <primary>Apache modules</primary>
1192 <prompt># as the root user:</prompt>
1193 <userinput>a2enmod ssl # enable mod_ssl</userinput>
1194 <userinput>a2enmod rewrite # enable mod_rewrite</userinput>
1195 <userinput>a2enmod expires # enable mod_expires</userinput>
1197 <para>As the commands execute, you may see warnings similar to:
1198 <literal>Module SOMEMODULE already enabled</literal> but you can
1199 safely ignore them.</para>
1202 <title>Copy Apache configuration files</title>
1203 <para>You must copy the Apache configuration files from the
1204 Evergreen installation directory to the Apache directory. As the
1205 <systemitem class="username">root</systemitem> user, perform the
1206 following commands:</para>
1208 <prompt># as the root user:</prompt>
1209 <userinput>cd /home/opensrf/Evergreen-ILS-1.6.1.2</userinput>
1210 <userinput>cp Open-ILS/examples/apache/eg.conf /etc/apache2/sites-available/</userinput>
1211 <userinput>cp Open-ILS/examples/apache/eg_vhost.conf /etc/apache2/</userinput>
1212 <userinput>cp Open-ILS/examples/apache/startup.pl /etc/apache2/</userinput>
1215 <step xml:id="serversideinstallation-createsslcertificate">
1216 <title>Create a Security Certificate</title>
1217 <para>In this step you will create a new Security Certificate (SSL Key)
1218 for the Apache server using the <command>openssl</command> command. For a
1219 public production server you must configure or purchase a signed SSL
1220 certificate, but for now you can just use a self-signed certificate and
1221 accept the warnings in the Staff Client and browser during testing and
1222 development. As the <systemitem class="username">root</systemitem> user,
1223 perform the following commands:</para>
1225 <prompt># as the root user:</prompt>
1226 <userinput>mkdir /etc/apache2/ssl</userinput>
1227 <userinput>cd /etc/apache2/ssl</userinput>
1228 <userinput>openssl req -new -x509 -days 365 -nodes -out server.crt -keyout server.key</userinput>
1230 <para>You will be prompted for several items of information; enter
1231 the appropriate information for each item. The new files
1232 <filename>server.crt</filename> and <filename>server.key</filename> will
1233 be created in the directory
1234 <filename class="directory">/etc/apache2/ssl</filename> .</para>
1236 <para>This step generates a self-signed SSL
1237 certificate. You must install a proper SSL certificate
1238 for a public production system to avoid warning messages
1239 when users login to their account through the OPAC or
1240 when staff login through the Staff Client.</para>
1241 <para>For further information on installing a proper SSL
1242 certificate, see <xref linkend="serversideinstallation-ssl"/>.</para>
1245 <step xml:id="serversideinstallation-modify-apache">
1246 <title>Update Apache configuration file</title>
1247 <para>You must make several changes to the new Apache
1249 <filename>/etc/apache2/sites-available/eg.conf</filename> .
1250 As the <systemitem class="username">root</systemitem> user,
1251 edit the file and make the following changes:</para>
1254 <para>In the section
1255 <literal><Directory "/openils/var/cgi-bin"></literal>
1257 <literal>Allow from 10.0.0.0/8</literal>
1258 with this line: <literal>Allow from all</literal>.</para>
1259 <warning>This change allows access to your configuration
1260 CGI scripts from any workstation on any network. This is
1261 only a temporary change to expedite testing and should be
1262 removed after you have finished and successfully tested
1263 the Evergreen installation. See
1264 <xref linkend="serversideinstallation-postinstallation"/>
1265 for further details on removing this change after the
1266 Evergreen installation is complete.
1270 <para>Comment out the line <literal>Listen 443</literal>,
1271 since it conflicts with the same declaration in the
1273 <filename>/etc/apache2/ports.conf</filename>. Note that
1274 <systemitem class="osname">Debian </systemitem> users
1275 should not do this since the conflict does not apply to
1276 that operating system.</para>
1279 <para>The following updates are needed to allow the logs
1280 to function properly, but it may break other Apache
1281 applications on your server:</para>
1283 <systemitem class="osname">Linux</systemitem> distributions
1284 <systemitem class="osname">Ubuntu Hardy</systemitem> or
1285 <systemitem class="osname">Debian Etch</systemitem>, as
1286 the <systemitem class="username">root</systemitem> user,
1287 edit the Apache configuration file
1288 <filename>/etc/apache2/apache2.conf</filename> and change
1289 the line <literal>User www-data</literal> to <literal>User
1290 opensrf</literal>.</para>
1292 <systemitem class="osname">Linux</systemitem> distributions
1293 <systemitem class="osname">Ubuntu Karmic</systemitem>,
1294 <systemitem class="osname">Ubuntu Lucid</systemitem> or
1295 <systemitem class="osname">Debian Lenny</systemitem>, as
1296 the <systemitem class="username">root</systemitem> user,
1297 edit the Apache configuration file and change these
1300 <prompt># as the root user:</prompt>
1301 <userinput>export APACHE_RUN_USER=www-data</userinput>
1302 <userinput>export APACHE_RUN_GROUP=www-data</userinput>
1304 <para>to instead read:</para>
1306 <prompt># as the root user:</prompt>
1307 <userinput>export APACHE_RUN_USER=opensrf</userinput>
1308 <userinput>export APACHE_RUN_GROUP=opensrf</userinput>
1313 <systemitem class="username">root</systemitem> user,
1314 edit the Apache configuration file
1315 <filename>/etc/apache2/apache2.conf</filename> and
1316 modify the values for <literal>KeepAliveTimeout</literal>
1317 and <literal>MaxKeepAliveRequests</literal> to match
1318 the following:</para>
1320 <prompt># as the root user:</prompt>
1321 <userinput>KeepAliveTimeout 1</userinput>
1322 <userinput>MaxKeepAliveRequests 100</userinput>
1326 <para>Further configuration changes to Apache may be
1327 necessary for busy systems. These changes increase the
1328 number of Apache server processes that are started to
1329 support additional browser connections.</para>
1331 <systemitem class="username">root</systemitem> user,
1332 edit the Apache configuration file
1333 <filename>/etc/apache2/apache2.conf</filename>, locate
1334 and modify the section related to <emphasis>prefork
1335 configuration</emphasis> to suit the load on your
1337 <programlisting language="xml"><![CDATA[
1338 <IfModule mpm_prefork_module>
1343 MaxRequestsPerChild 10000
1345 ]]></programlisting>
1350 <title>Enable the Evergreen web site</title>
1351 <para>Finally, you must enable the Evergreen web site. As the
1352 <systemitem class="username">root</systemitem> user, execute the
1353 following Apache configuration commands to disable the default
1354 <emphasis>It Works</emphasis> web page and enable the Evergreen
1355 web site, and then restart the Apache server:</para>
1357 <prompt># as the root user:</prompt>
1358 <prompt># disable/enable web sites</prompt>
1359 <userinput>a2dissite default</userinput>
1360 <userinput>a2ensite eg.conf</userinput>
1361 <prompt># restart the server</prompt>
1362 <userinput>/etc/init.d/apache2 reload</userinput>
1367 <step xml:id="serversideinstallation-opensrf-config">
1368 <title>Update the OpenSRF Configuration File</title>
1369 <para>As the <systemitem class="username">opensrf</systemitem> user, edit the
1370 OpenSRF configuration file <filename>/openils/conf/opensrf_core.xml</filename>
1371 to update the Jabber usernames and passwords, and to specify the domain from
1372 which we will accept and to which we will make connections.</para>
1373 <para>If you are installing Evergreen on a single server and using the
1374 <systemitem class="domainname">private.localhost</systemitem> /
1375 <systemitem class="domainname">public.localhost</systemitem> domains,
1376 these will already be set to the correct values. Otherwise, search and replace
1377 to match your customized values.</para>
1378 <para>The left-hand side of <xref linkend="serversideinstallation-xpath-table-2"/>
1379 shows common XPath syntax to indicate the approximate position within the XML
1380 file that needs changes. The right-hand side of the table shows the replacement
1382 <table xml:id="serversideinstallation-xpath-table-2">
1383 <title>Sample XPath syntax for editing "opensrf_core.xml"</title>
1384 <tgroup align="left" cols="2" colsep="1" rowsep="1">
1385 <colspec colname="Xpath" colnum="1" colwidth="1.6*"/>
1386 <colspec colname="Value" colnum="2" colwidth="2.0*"/>
1389 <entry>XPath location</entry>
1390 <entry>Value</entry>
1395 <entry>/config/opensrf/username</entry>
1397 <systemitem class="username">opensrf</systemitem>
1401 <entry>/config/opensrf/passwd </entry>
1402 <entry><systemitem class="domainname">private.localhost</systemitem>
1404 <systemitem class="username">opensrf</systemitem> user
1408 <entry>/config/gateway/username</entry>
1410 <systemitem class="username">opensrf</systemitem>
1414 <entry>/config/gateway/passwd</entry>
1415 <entry><systemitem class="domainname">public.localhost</systemitem>
1417 <systemitem class="username">opensrf</systemitem> user
1421 <entry>/config/routers/router/transport/username,
1422 first entry where server == public.localhost</entry>
1424 <systemitem class="username">router</systemitem>
1428 <entry>/config/routers/router/transport/password,
1429 first entry where server == public.localhost</entry>
1430 <entry><systemitem class="domainname">public.localhost</systemitem>
1432 <systemitem class="username">router</systemitem> user
1436 <entry>/config/routers/router/transport/username,
1437 second entry where server == private.localhost</entry>
1439 <systemitem class="username">router</systemitem>
1443 <entry>/config/routers/router/transport/password,
1444 second entry where server == private.localhost</entry>
1445 <entry><systemitem class="domainname">private.localhost</systemitem>
1447 <systemitem class="username">router</systemitem> user
1454 <step performance="optional">
1455 <title>(OPTIONAL) Create Configuration Files for Users Needing <command>srfsh</command></title>
1456 <para>When OpenSRF was installed in <xref linkend="serversideinstallation-opensrf"/>, the
1457 software installation automatically created a utility named <command>srfsh</command> (surf
1458 shell). This is a command line diagnostic tool for testing and interacting with
1459 OpenSRF. It will be used in a future step to complete and test the Evergreen installation.
1460 Earlier in <xref linkend="serversideinstallation-srfsh"/> you also created a configuration
1461 file <filename>~/.srfsh.xml</filename> for each user that might need to use the utility.
1462 See <xref linkend="serversideinstallation-testing"/> for further information.</para>
1464 <step xml:id="serversideinstallation-opensrf-env">
1465 <title>Modify the OpenSRF Environment</title>
1466 <para>As the <systemitem class="username">opensrf</systemitem> user,
1467 modify the shell configuration file <filename>~/.bashrc</filename> for
1468 user <systemitem class="username">opensrf</systemitem> by adding a Perl environmental
1469 variable, then execute the shell configuration file to load the new variables into
1470 your current environment.</para>
1473 <emphasis>In a multi-server environment, you must add any
1474 modifications to <filename>~/.bashrc</filename> to the top of
1475 the file <emphasis>before</emphasis> the line
1476 <literal>[ -z "$PS1" ] && return </literal>.
1477 This will allow headless (scripted) logins to load the correct
1478 environment.</emphasis>
1482 <prompt># as the opensrf user:</prompt>
1483 <userinput>echo "export PERL5LIB=/openils/lib/perl5:\$PERL5LIB" >> ~/.bashrc</userinput>
1484 <userinput>. ~/.bashrc</userinput>
1487 <step performance="optional">
1488 <title>(OPTIONAL) Enable and Disable Language Localizations</title>
1489 <para>You can load translations such as Armenian (hy-AM), Canadian French
1490 (fr-CA), and others into the database to complete the translations available in
1491 the OPAC and Staff Client. For further information, see
1492 <xref linkend="enabling_and_disabling_localization"/>.</para>
1496 <section xml:id="serversideinstallation-starting">
1497 <title>Starting Evergreen</title>
1500 <para>As the <systemitem class="username">root</systemitem>
1501 user, start the <systemitem class="service">ejabberd</systemitem> and
1502 <systemitem class="service">memcached</systemitem> services as follows:</para>
1504 <prompt># as the root user:</prompt>
1505 <userinput>/etc/init.d/ejabberd start</userinput>
1506 <userinput>/etc/init.d/memcached start</userinput>
1510 <para>As the <systemitem class="username">opensrf</systemitem> user,
1511 start Evergreen as follows:</para>
1513 <prompt># as the opensrf user:</prompt>
1514 <userinput>osrf_ctl.sh -l -a start_all</userinput>
1516 <para>The flag <option>-l</option> forces Evergreen to use
1517 <systemitem class="domainname">localhost</systemitem> (your current system)
1518 as the hostname. The flag <option>-a start_all</option> starts the other
1519 OpenSRF <systemitem class="service">router</systemitem> ,
1520 <systemitem class="service">Perl</systemitem> , and
1521 <systemitem class="service">C</systemitem> services.</para>
1524 <para>You can also start Evergreen without the
1525 <option>-l</option> flag, but the <command>osrf_ctl.sh</command>
1526 utility must know the fully qualified domain name for the system
1527 on which it will execute. That hostname was probably specified
1528 in the configuration file <filename>opensrf.xml</filename> which
1529 you configured in a previous step.</para>
1532 <para>If you receive an error message similar to
1533 <emphasis>osrf_ctl.sh: command not found</emphasis>, then your
1534 environment variable <envar>PATH</envar> does not include the
1535 directory <filename class="directory">/openils/bin</filename>.
1536 As the <systemitem class="username">opensrf</systemitem> user,
1537 edit the configuration file <filename>~/.bashrc</filename> and
1538 add the following line:
1539 <literal>export PATH=$PATH:/openils/bin</literal></para>
1542 <para>If you receive an error message similar to <emphasis>Can't
1543 locate OpenSRF/System.pm in @INC ... BEGIN failed--compilation
1544 aborted</emphasis>, then your environment variable
1545 <emphasis role="bold">PERL5LIB</emphasis> does not include the
1546 directory <filename class="directory">/openils/lib/perl5</filename>.
1547 As the <systemitem class="username">opensrf</systemitem> user,
1548 edit the configuration file <filename>~/.bashrc</filename> and
1549 add the following line:
1550 <literal>export PERL5LIB=$PERL5LIB:/openils/lib/perl5</literal></para>
1555 <para>In this step you will generate the Web files needed by the Staff Client
1556 and catalog, and calculate the proximity of locations in the Organizational Unit
1557 tree (which allows <emphasis>Holds</emphasis> to work properly). You must do
1558 this the first time you start Evergreen and after making any changes to the
1559 library hierarchy. As the <systemitem class="username">opensrf</systemitem>
1560 user, execute the following command and review the results:</para>
1562 <prompt># as the opensrf user:</prompt>
1563 <userinput>cd /openils/bin</userinput>
1564 <userinput>./autogen.sh -c /openils/conf/opensrf_core.xml -u</userinput>
1565 <computeroutput>Updating Evergreen organization tree and IDL using '/openils/conf/opensrf_core.xml'</computeroutput>
1566 <computeroutput>Updating fieldmapper</computeroutput>
1567 <computeroutput>Updating web_fieldmapper</computeroutput>
1568 <computeroutput>Updating OrgTree</computeroutput>
1569 <computeroutput>removing OrgTree from the cache for locale hy-AM...</computeroutput>
1570 <computeroutput>removing OrgTree from the cache for locale cs-CZ...</computeroutput>
1571 <computeroutput>removing OrgTree from the cache for locale en-CA...</computeroutput>
1572 <computeroutput>removing OrgTree from the cache for locale en-US...</computeroutput>
1573 <computeroutput>removing OrgTree from the cache for locale fr-CA...</computeroutput>
1574 <computeroutput>removing OrgTree from the cache for locale ru-RU...</computeroutput>
1575 <computeroutput>Updating OrgTree HTML</computeroutput>
1576 <computeroutput>Updating locales selection HTML</computeroutput>
1577 <computeroutput>Updating Search Groups</computeroutput>
1578 <computeroutput>Refreshing proximity of org units</computeroutput>
1579 <computeroutput>Successfully updated the organization proximity</computeroutput>
1580 <computeroutput>Done</computeroutput>
1584 <para>As the <systemitem class="username">root</systemitem> user, restart the
1585 Apache Web server:</para>
1587 <prompt># as the root user:</prompt>
1588 <userinput>/etc/init.d/apache2 restart</userinput>
1591 <para>If the Apache Web server was running when you started the OpenSRF
1592 services, you might not be able to successfully log into the OPAC or
1593 Staff Client until the Apache Web server has been restarted.</para>
1598 <section xml:id="serversideinstallation-testing">
1599 <title>Testing Your Evergreen Installation</title>
1600 <para>This section describes several simple tests you can perform to verify that the Evergreen
1601 server-side software has been installed and configured properly and is running as
1603 <simplesect xml:id="serversideinstallation-testing-connections">
1604 <title>Testing Connections to Evergreen</title>
1605 <para>Once you have installed and started Evergreen, test your connection to Evergreen. Start the
1606 <command>srfsh</command> application and try logging onto the Evergreen server using the default
1607 administrator username and password. Following is sample output generated by executing
1608 <command>srfsh</command> after a successful Evergreen installation. For help with
1609 <command>srfsh</command> commands, type <userinput>help</userinput> at the prompt.
1610 As the <systemitem class="username">opensrf</systemitem> user,
1611 execute the following commands to test your Evergreen connection:</para>
1613 <prompt># as the opensrf user:</prompt>
1614 <userinput>/openils/bin/srfsh</userinput>
1615 <computeroutput>srfsh%</computeroutput>
1616 <userinput>login admin open-ils</userinput>
1617 <computeroutput>Received Data: "250bf1518c7527a03249858687714376"</computeroutput>
1618 <computeroutput>------------------------------------</computeroutput>
1619 <computeroutput>Request Completed Successfully</computeroutput>
1620 <computeroutput>Request Time in seconds: 0.045286</computeroutput>
1621 <computeroutput>------------------------------------</computeroutput>
1622 <computeroutput>Received Data: {</computeroutput>
1623 <computeroutput> "ilsevent":0,</computeroutput>
1624 <computeroutput> "textcode":"SUCCESS",</computeroutput>
1625 <computeroutput> "desc":" ",</computeroutput>
1626 <computeroutput> "pid":21616,</computeroutput>
1627 <computeroutput> "stacktrace":"oils_auth.c:304",</computeroutput>
1628 <computeroutput> "payload":{</computeroutput>
1629 <computeroutput> "authtoken":"e5f9827cc0f93b503a1cc66bee6bdd1a",</computeroutput>
1630 <computeroutput> "authtime":420</computeroutput>
1631 <computeroutput> }</computeroutput>
1632 <computeroutput>}</computeroutput>
1633 <computeroutput>------------------------------------</computeroutput>
1634 <computeroutput>Request Completed Successfully</computeroutput>
1635 <computeroutput>Request Time in seconds: 1.336568</computeroutput>
1636 <computeroutput>------------------------------------</computeroutput>
1638 <para>If this does not work, try the following:</para>
1641 <para>As the <systemitem class="username">opensrf</systemitem> user, run the
1642 <filename>settings-tester.pl</filename> utility to review your Evergreen
1643 installation for any system configuration problems:</para>
1645 <prompt># as the opensrf user:</prompt>
1646 <userinput>cd /home/opensrf</userinput>
1647 <userinput>./Evergreen-ILS-1.6.1.2/Open-ILS/src/support-scripts/settings-tester.pl</userinput>
1649 <para>If the output of <command>settings-tester.pl</command> does not help you
1650 find the problem, please do not make any significant changes to your
1651 configuration.</para>
1654 <para>Follow the steps in the troubleshooting guide in
1655 <xref linkend="troubleshooting"/>.</para>
1658 <para>If you have followed the entire set of installation steps listed here
1659 closely, you are probably extremely close to a working system. Gather your
1660 configuration files and log files and contact the
1661 <ulink url="http://open-ils.org/listserv.php">Evergreen Development Mailing List</ulink>
1662 list for assistance before making any drastic changes to your system
1663 configuration.</para>
1667 <simplesect xml:id="serversideinstallation-running-staffclient">
1668 <title>Testing the Staff Client on Linux</title>
1669 <para>In this section you will confirm that a basic login on the Staff Client works
1671 <para>Run the Evergreen Staff Client on a Linux system by using the application
1672 <emphasis>XULRunner</emphasis> (installed automatically and by default with Firefox
1673 version 3.0 and later on Ubuntu and Debian distributions).</para>
1674 <para>As the <systemitem class="username">root</systemitem> user, start the Staff Client
1677 <prompt># as the root user:</prompt>
1678 <userinput>xulrunner /home/opensrf/Evergreen-ILS-1.6.1.2/Open-ILS/xul/staff_client/build/application.ini</userinput>
1680 <para>The login screen for the Staff Client should appear.</para>
1681 <para>Log in using the username <literal>admin</literal> and the password
1682 <literal>open-ils</literal> :</para>
1684 <alt>Logging into the Staff Client</alt>
1686 <imagedata fileref="../media/serversideinstallation-staffclient-running-1.png" format="PNG" scalefit="1" width="70%"/>
1689 <para>If the login is successful, you will see the following screen:</para>
1691 <alt>Logging into the Staff Client</alt>
1693 <imagedata fileref="../media/serversideinstallation-staffclient-running-4.png" format="PNG" scalefit="1" width="70%"/>
1696 <para>Otherwise, you may need to click <guibutton>Add SSL Exception</guibutton> in the
1697 main window. You will see a popup window labeled "Add Security Exception":</para>
1699 <alt>Logging into the Staff Client</alt>
1701 <imagedata fileref="../media/serversideinstallation-staffclient-running-2.png" format="PNG" scalefit="1" width="70%"/>
1704 <para>Click <guibutton>Get Certificate</guibutton>, then click <guibutton>Confirm
1705 Security Exception</guibutton>, then click <guibutton>Re-Test Server</guibutton> in the
1706 main window and try to log in again.</para>
1708 <simplesect xml:id="serversideinstallation-starting-apache-server">
1709 <title>Testing the Apache Web Server</title>
1710 <para>In this section you will test the Apache configuration file(s), then restart the
1711 Apache web server.</para>
1712 <para>As the <emphasis role="bold">root</emphasis> user, execute the following
1713 commands. Note the use of <emphasis>restart</emphasis> to force the new Evergreen
1714 modules to be reloaded even if the Apache server is already running. Any problems found
1715 with your configuration files should be displayed:</para>
1717 <prompt># as the root user:</prompt>
1718 <userinput>apache2ctl configtest && /etc/init.d/apache2 restart</userinput>
1722 <section xml:id="serversideinstallation-postinstallation">
1723 <title>Post-Installation Chores</title>
1724 <para>There are several additional steps you may need to complete after Evergreen has been
1725 successfully installed and tested. Some steps may not be needed (e.g., setting up support for
1728 <title>Remove temporary Apache configuration changes</title>
1729 <para>You modified the Apache configuration file
1730 <filename>/etc/apache2/sites-available/eg.conf</filename> in an earlier step as a
1731 temporary measure to expedite testing (see
1732 <xref linkend="serversideinstallation-modify-apache"/> for further information).
1733 Those changes must now be reversed in order to deny unwanted access to your
1734 CGI scripts from users on other public networks.</para>
1737 <emphasis>This temporary network update was done to expedite
1738 testing. You <emphasis role="bold"> must</emphasis> correct
1739 this for a public production system.</emphasis>
1742 <para>As the <systemitem class="username">root</systemitem> user, edit the configuration
1743 file again and comment out the line <literal>Allow from all</literal> and uncomment the
1744 line <literal>Allow from 10.0.0.0/8</literal>, then change it to match your network
1745 address scheme.</para>
1747 <section xml:id="serversideinstallation-ssl">
1748 <title>Configure a permanent SSL key</title>
1749 <para>In a previous step (see <xref linkend="serversideinstallation-createsslcertificate"/>)
1750 you used the command <command>openssl</command> to temporarily
1751 create a new SSL key for the Apache server. This self-signed security certificate was adequate
1752 during testing and development, but will continue to generate warnings in the Staff Client
1753 and browser. For a public production server you should configure or purchase a signed SSL
1755 <para>There are several open source software solutions that provide schemes to generate and
1756 maintain public key security certificates for your library system. Some popular projects are
1757 listed below; please review them for background information on why you need such a system and
1758 how you can provide it:</para>
1761 <ulink url="http://www.openca.org/projects/openca/">http://www.openca.org/projects/openca/</ulink>
1764 <ulink url="http://sourceforge.net/projects/ejbca/">http://sourceforge.net/projects/ejbca/</ulink>
1767 <ulink url="http://pki.fedoraproject.org">http://pki.fedoraproject.org</ulink>
1772 <emphasis>The temporary SSL key was only created to expedite
1773 testing. You should install a proper SSL certificate for a public
1774 production system.</emphasis>
1779 <title>Set Up Support For Reports</title>
1780 <para>Evergreen reports are extremely powerful but require some simple configuration.
1781 This section describes starting and stopping the Reporter daemon processes.</para>
1784 <para>Starting the Reporter Daemon</para>
1785 <para>Once the <systemitem class="daemon">open-ils.reporter</systemitem>
1786 process is running and enabled on the gateway, you can start the
1787 Reporter daemon. That process periodically checks for requests for new
1788 or scheduled reports, then starts them as required.</para>
1789 <para>As the <systemitem class="username">opensrf</systemitem> user,
1790 start the Reporter daemon using the following command:</para>
1792 <prompt># as the opensrf user:</prompt>
1793 <userinput>cd /home/opensrf/Evergreen-ILS-1.6.1.2/Open-ILS/src/reporter</userinput>
1794 <userinput>./clark-kent.pl --daemon</userinput>
1796 <para>You can control how the <command>clark-kent.pl</command> utility behaves
1797 by specifying any of several command-line options:</para>
1799 <listitem><option>--sleep=interval</option> : number of seconds
1800 to sleep between checks for new reports to run; defaults to
1801 <literal>10</literal></listitem>
1802 <listitem><option>--lockfile=filename</option> : where to place
1803 the lockfile for the process; defaults to
1804 <filename>/tmp/reporter-LOCK</filename></listitem>
1805 <listitem><option>--concurrency=integer</option> : number of
1806 Reporter daemon processes to run; defaults to
1807 <literal>1</literal></listitem>
1808 <listitem><option>--bootstrap=filename</option> : OpenSRF
1809 bootstrap configuration file; defaults to
1810 <filename>/openils/conf/opensrf_core.xml</filename></listitem>
1814 <para>Stopping the Reporter Daemon</para>
1815 <para>To stop the Reporter daemon, you must kill the process and remove
1816 the lockfile. The daemon may have just a single associated process or
1817 there may be several processes if the daemon was started with the optional
1818 <literal>--concurrency</literal> switch. It will also have a lockfile
1819 in the default location.</para>
1820 <para>As the <systemitem class="username">opensrf</systemitem> user,
1821 execute the following shell commands:</para>
1823 <prompt># as the root user:</prompt>
1824 <prompt># find and kill the process ID number(s)</prompt>
1825 <userinput>kill `ps wax | grep "Clark Kent" | grep -v grep | cut -b1-6`</userinput>
1826 <prompt># remove the lock file</prompt>
1827 <userinput>rm /tmp/reporter-LOCK</userinput>
1833 <section xml:id="serversideinstallation-virtual">
1834 <title>Installing In Virtualized <systemitem class="osname">Linux</systemitem> Environments</title>
1835 <para>This section describes the installation of Evergreen software in so-called "virtualized"
1836 software environments. Evergreen software runs as a native application on any of several
1837 well-known x86 (32-bit) and x86-64 (64-bit) <systemitem class="osname">Linux</systemitem>
1838 distributions including <systemitem class="osname">Ubuntu</systemitem> and
1839 <systemitem class="osname">Debian</systemitem> but it does not run as a native application
1840 on the <systemitem class="osname">Microsoft Windows</systemitem> operating system.
1841 However, it is possible to execute Evergreen on a <systemitem class="osname">Windows</systemitem>
1842 host system by running it within a virtual Linux-guest installation, which itself executes
1843 on the <systemitem class="osname">Windows</systemitem> system.
1844 The <systemitem class="osname">Linux</systemitem> environment is fully emulated and acts
1845 (within limits) just as if it were executing on a real standalone system.</para>
1846 <para>This technique of emulating a <systemitem class="osname">Linux</systemitem> environment on
1847 a <systemitem class="osname">Windows</systemitem> host is a practical way to install and run an
1848 Evergreen system if it is not possible to dedicate a physical machine solely as a
1849 <systemitem class="osname">Linux</systemitem> host for Evergreen. This architecture is not
1850 recommended for large scale systems since there are performance limitations to running Evergreen
1851 in a virtualized environment. However, it is a reasonable architecture for smaller experimental
1852 systems, as a proof of concept, or as a conference-room pilot.</para>
1854 <title>Installing Virtualization Software</title>
1855 <para>As described above, Evergreen can be installed on top of an emulated
1856 <systemitem class="osname">Linux</systemitem> environment. The
1857 <systemitem class="osname">Linux</systemitem> environment, in turn, is installed
1858 on top of a software application such as <application>"VirtualBox"</application>,
1859 <application>"VMware"</application> or <application>"VirtualPC"</application> which must
1860 first be installed on the <systemitem class="osname">Windows</systemitem> system. This
1861 section contains step-by-step examples that show installing popular virtualization
1862 applications on a <systemitem class="osname">Windows</systemitem> host system. Following
1863 this section are further descriptions of installing
1864 <systemitem class="osname">Linux</systemitem> and Evergreen systems using that
1865 virtualization software.</para>
1867 <title>Installing <application>"VirtualBox"</application> Virtualization Software</title>
1868 <para>This section reviews installation of the
1869 <application>"VirtualBox"</application> application on
1870 <systemitem class="osname">WindowsXP Professional (SP2)</systemitem>.
1871 Download the latest edition of <application>VirtualBox</application> from their official website:
1872 <link xl:href="http://virtualbox.org" xl:title="virtual box">http://virtualbox.org</link>
1873 and follow the on screen instructions to install the software.</para>
1876 <title>Installing VMware Virtualization Software</title>
1878 <primary>virtualization software</primary>
1879 <secondary>VMware</secondary>
1881 <para>This section reviews installation of the
1882 <application>"VMware"</application> application on
1883 <systemitem class="osname">WindowsXP Professional (SP2)</systemitem>.
1884 Find and Download the free virtual machine software of from the VMware
1886 <ulink url="http://downloads.vmware.com">http://downloads.vmware.com</ulink>
1887 and follow the on-screen instructions.</para>
1890 <simplesect xml:id="serversideinstallation-virtual-install-linux-ev">
1891 <title>Installing <systemitem class="osname">Linux</systemitem> /
1892 Evergreen on Virtualization Software</title>
1893 <para>After the virtualization software is installed and running, there are two ways to
1894 continue with installing <systemitem class="osname">Linux</systemitem> and Evergreen
1895 software in the new virtualized environment:</para>
1898 <para>Download and install a prebuilt software image that contains a
1899 working <systemitem class="osname">Linux</systemitem> / Evergreen system
1900 (see <xref linkend="serversideinstall-virtual-prebuilt"/> for
1904 <para>Manually install a <systemitem class="osname">Linux</systemitem>
1905 guest system, then manually install Evergreen on it.</para>
1908 <para>We review each method in the following sections.</para>
1909 <simplesect xml:id="serversideinstall-virtual-prebuilt">
1910 <title>Download and install a prebuilt software image</title>
1911 <para>You can download a prebuilt software image that, when installed with your
1912 virtualization software, emulates a
1913 <systemitem class="osname">Linux</systemitem> guest system containing a running
1914 Evergreen distribution. The image is essentially a snapshot of a hard disk from
1915 a fully configured, functional <systemitem class="osname">Linux</systemitem>
1916 system with Evergreen already installed.</para>
1917 <para>We recommend this approach if you wish to get Evergreen running quickly
1918 with minimal attention to configuration. After reviewing only a few
1919 configuration details you can have a working Evergreen system that integrates
1920 smoothly with the rest of your network. See
1921 <xref linkend="serversideinstall-virtual-versions"/> for a list of prebuilt
1922 software images that are currently available to download and install</para>
1923 <note>DISCLAIMER: The following virtual images have been contributed by members
1924 of the Evergreen community for the purposes of testing, evaluation, training,
1925 and development.</note>
1926 <table xml:id="serversideinstall-virtual-versions">
1927 <title>Linux / Evergreen Virtual Images</title>
1928 <tgroup align="left" cols="4" colsep="1" rowsep="1">
1929 <colspec colnum="1" colwidth="1.0*"/>
1930 <colspec colnum="2" colwidth="1.0*"/>
1931 <colspec colnum="3" colwidth="3.0*"/>
1932 <colspec colnum="4" colwidth="1.0*"/>
1935 <entry>Linux Version</entry>
1936 <entry>Evergreen Version</entry>
1937 <entry>Image</entry>
1938 <entry>Comments</entry>
1943 <entry>Debian lenny (5.0)</entry>
1944 <entry>1.6.0.1</entry>
1946 <ulink url="http://www.open-ils.org/~denials/Evergreen1601_DebianLenny.zip"> download </ulink>
1948 <entry>VirtualBox image</entry>
1951 <entry>Ubuntu karmic koala (9.10)</entry>
1952 <entry>1.6.0.0</entry>
1954 <ulink url="http://www.open-ils.org/~denials/Evergreen-1600-Karmic.zip"> download </ulink>
1956 <entry>VirtualBox image</entry>
1962 <title>VirtualBox Example</title>
1964 <primary>virtualization software</primary>
1965 <secondary>VirtualBox</secondary>
1968 <para>Start VirtualBox for the first time and select
1969 <menuchoice><guimenu>File</guimenu><guimenuitem>VirtualBox Media
1970 Manager</guimenuitem><guimenuitem>Add</guimenuitem></menuchoice>
1971 to locate the prebuilt software image just downloaded (the
1972 example shows it was extracted from the original
1973 <filename class="extension">zip</filename> file into a temporary directory
1974 <filename class="directory">C:\temp</filename>).</para>
1977 <para>After selecting the file, click <guibutton>Open</guibutton> to import it.</para>
1980 <para>Then click <guibutton>OK</guibutton> to save the selection
1981 and return to the VirtualBox Media Manager</para>
1984 <para>Click <guibutton>New</guibutton>, then <guibutton>Next</guibutton> to continue
1985 and create a new virtual machine (VM).</para>
1988 <para>Create a new name for the VM and set the operating system
1989 type, then click <guibutton>Next</guibutton>.</para>
1992 <para>Set the memory size (at least 512Mb),
1993 then click <guibutton>Next</guibutton>.</para>
1996 <para>Edit the Virtual Hard Disk configuration settings; click
1997 the radio boxes <guilabel>Boot Hard Disk</guilabel> and
1998 <guilabel>Use existing hard disk</guilabel>
1999 and ensure that the disk name <guilabel>Evergreen1601_DebianLenny.vmdk</guilabel>
2000 is selected. Click <guibutton>Finish</guibutton> to finish the
2004 <para>Install the <application>VirtualBox Guest
2005 Additions</application> (really a required upgrade to
2009 <para>Return to VirtualBox and see the summary of the VM just
2010 created. Click <guibutton>Start</guibutton> to boot the new VM.</para>
2013 <para>See the start of the <systemitem class="osname">Linux</systemitem>
2014 boot sequence. Choose <guimenuitem>Debian Gnu/Linux, kernel
2015 2.6.26-2-686</guimenuitem> from the startup menu and click
2016 <guibutton>Enter</guibutton> to start
2017 <systemitem class="osname">Linux</systemitem> and Evergreen.
2018 After some delay you should see the command line prompt
2019 <prompt>debian-lenny login:</prompt>. Log in with username
2020 <userinput>root</userinput> and password <userinput>evergreen</userinput>