1 <?xml version="1.0" encoding="UTF-8"?>
\r
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">
\r
4 <title>Server-side Installation of Evergreen Software</title>
\r
6 <para>This section describes installation of the Evergreen server-side software and its associated components.
\r
7 Installation, configuration, testing and verification
\r
8 of the software is straightforward if you follow some simple directions.</para>
\r
11 <para>Installing, configuring and testing the Evergreen server-side software is straightforward with the current
\r
12 stable software release. See <xref linkend="serversideinstallation-all"/> for instructions tailored to
\r
13 installing on some particular distributions of the <systemitem class="osname">Linux</systemitem> operating
\r
15 <para>The current version of the Evergreen server-side software runs as a native application on any of several
\r
16 well-known <systemitem class="osname">Linux</systemitem> distributions
\r
17 (e.g., <systemitem class="osname">Ubuntu</systemitem> and <systemitem class="osname">Debian</systemitem>).
\r
18 It does not currently run as a native application on the <systemitem class="osname">Microsoft Windows</systemitem>
\r
19 operating system (e.g., <systemitem class="osname">WindowsXP</systemitem>, <systemitem class="osname">WindowsXP
\r
20 Professional</systemitem>, <systemitem class="osname">Windows7</systemitem>), but the software can still be
\r
21 installed and run on <systemitem class="osname">Windows</systemitem> via a so-called
\r
22 <emphasis>virtualized</emphasis> Linux-guest Operating System (using, for example,
\r
23 <application>"VirtualBox"</application>, or <application>"VMware"</application>, or
\r
24 <application>"VirtualPC"</application> to emulate a <systemitem class="osname">Linux</systemitem>
\r
25 environment). It can also be installed to run on other <systemitem class="osname">Linux</systemitem>
\r
26 systems via virtualized environments (using, for example, <application>"VirtualBox"</application> or
\r
27 <application>"VMware"</application>). More information on virtualized environments can be found in
\r
28 <xref linkend="serversideinstallation-virtual"/>.</para>
\r
29 <para>Installation of the Evergreen Staff Client software is reviewed in <xref linkend="staffclientinstallation"/>. </para>
\r
30 <para>The Evergreen server-side software has dependencies on particular versions of certain major software
\r
31 sub-components. Successful installation of Evergreen software requires that software versions agree with those
\r
33 <table xml:id="serversideinstall-software-dependencies">
\r
34 <title>Evergreen Software Dependencies</title>
\r
36 <primary>Evergreen software dependencies</primary>
\r
38 <tgroup align="left" cols="3" colsep="1" rowsep="1">
\r
39 <colspec colname="Evergreen" colnum="1" colwidth="1.0*"/>
\r
40 <colspec colname="OpenSRF" colnum="2" colwidth="1.0*"/>
\r
41 <colspec colname="PostgreSQL" colnum="3" colwidth="1.0*"/>
\r
44 <entry>Evergreen</entry>
\r
45 <entry>OpenSRF</entry>
\r
46 <entry>PostgreSQL</entry>
\r
51 <entry>1.6.1.x</entry>
\r
52 <entry>1.4.0</entry>
\r
53 <entry>8.2 / 8.3</entry>
\r
56 <entry>1.6.0.x</entry>
\r
58 <entry>8.2 / 8.3</entry>
\r
61 <entry>1.4.x</entry>
\r
63 <entry>8.1 / 8.2</entry>
\r
66 <entry>1.2.x</entry>
\r
68 <entry>8.1 / 8.2</entry>
\r
73 <section xml:id="serversideinstallation-all">
\r
74 <title>Installing Server-Side Software</title>
\r
75 <para>This section describes the installation of the major components of Evergreen server-side software.</para>
\r
76 <para>As far as possible, you should perform the following steps in the exact order given since the
\r
77 success of many steps relies on the successful completion of earlier steps. You should make backup
\r
78 copies of files and environments when you are instructed to do so. In the event of installation problems
\r
79 those copies can allow you to back out of a step gracefully and resume the installation from a known
\r
80 state. See <xref linkend="backingup"/> for further information.</para>
\r
81 <para>Of course, after you successfully complete and test the entire Evergreen installation you should
\r
82 take a final snapshot backup of your system(s). This can be the first in the series of regularly
\r
83 scheduled system backups that you should probably also begin.</para>
\r
84 <section xml:id="serversideinstallation-opensrf">
\r
86 <primary>OpenSRF</primary>
\r
87 <secondary>installation</secondary>
\r
89 <title>Installing OpenSRF 1.4.x On <systemitem class="osname">Ubuntu</systemitem> or
\r
90 <systemitem class="osname">Debian</systemitem></title>
\r
92 <primary>Linux</primary>
\r
93 <secondary>Debian</secondary>
\r
96 <primary>Linux</primary>
\r
97 <secondary>Ubuntu</secondary>
\r
99 <para>This section describes the installation of the latest version of the Open Service Request
\r
100 Framework (OpenSRF), a major component of the Evergreen server-side software, on
\r
101 <systemitem class="osname">Ubuntu</systemitem> or <systemitem class="osname">Debian</systemitem>
\r
102 systems. Evergreen software is integrated with and depends on the OpenSRF software
\r
104 <para>Follow the steps outlined here and run the specified tests to ensure that OpenSRF is
\r
105 properly installed and configured. Do <emphasis><emphasis role="bold">not</emphasis></emphasis>
\r
106 continue with any further Evergreen installation steps
\r
107 until you have verified that OpenSRF has been successfully installed and tested.</para>
\r
109 <para>The following steps have been tested on the x86 (32-bit) and x86-64 (64-bit)
\r
110 platforms. OpenSRF 1.4.0 has been tested on <systemitem class="osname">Debian Etch
\r
111 (4.0)</systemitem>, <systemitem class="osname">Debian Lenny (5.0)</systemitem> and
\r
112 <systemitem class="osname">Ubuntu Lucid Lynx (10.04)</systemitem>.</para>
\r
113 <para>In the following instructions, you are asked to perform certain steps as either
\r
114 the <systemitem class="username">root</systemitem> user, the
\r
115 <systemitem class="username">opensrf</systemitem> user, or the
\r
116 <systemitem class="username">postgres</systemitem> user.</para>
\r
119 <para><systemitem class="osname">Debian</systemitem> -- To become the
\r
120 <systemitem class="username">root</systemitem> user, issue the command
\r
121 <command>su -</command> and enter the password of the
\r
122 <systemitem class="username">root</systemitem> user.</para>
\r
125 <para><systemitem class="osname">Ubuntu</systemitem> -- To become the
\r
126 <systemitem class="username">root</systemitem> user, issue the command
\r
127 <command>sudo su -</command> and enter the password of the
\r
128 <systemitem class="username">root</systemitem> user.</para>
\r
131 <para>To switch from the <systemitem class="username">root</systemitem> user to a
\r
132 different user, issue the command <command>su - USERNAME</command>. For example, to
\r
133 switch from the <systemitem class="username">root</systemitem> user to the
\r
134 <systemitem class="username">opensrf</systemitem> user, issue the command
\r
135 <command>su - opensrf</command>. Once you have become a non-root user, to become
\r
136 the <systemitem class="username">root</systemitem> user again, simply issue the command
\r
137 <command>exit</command>.</para>
\r
141 <title>Add the OpenSRF User</title>
\r
142 <para>As the <systemitem class="username">root</systemitem> user, add the
\r
143 opensrf user to the system. The default shell for the new user is automatically
\r
144 set to <command>/bin/bash</command> to inherit a reasonable environment:</para>
\r
146 <userinput>useradd -m -s /bin/bash opensrf</userinput>
\r
147 <userinput>passwd opensrf</userinput>
\r
151 <title>Download and Unpack Latest OpenSRF Version</title>
\r
153 <primary>OpenSRF</primary>
\r
154 <secondary>download</secondary>
\r
156 <para>As the <systemitem class="username">opensrf</systemitem> user, change to
\r
157 the directory <filename class="directory">/home/opensrf</filename> then download
\r
158 and extract the latest version of OpenSRF. The latest version can be found here:
\r
159 <ulink url="http://evergreen-ils.org/downloads/OpenSRF-1.4.0.tar.gz"></ulink></para>
\r
161 <userinput>cd /home/opensrf/OpenSRF-1.4.0</userinput>
\r
162 <userinput>wget http://evergreen-ils.org/downloads/OpenSRF-1.4.0.tar.gz</userinput>
\r
163 <userinput>tar zxf OpenSRF-1.4.0.tar.gz</userinput>
\r
165 <para>The new directory
\r
166 <filename class="directory">/home/opensrf/OpenSRF-1.4.0</filename> will be created.</para>
\r
169 <title>Install Prerequisites to Build OpenSRF</title>
\r
170 <para>In this section you will install and configure a set of prerequisites that will be
\r
171 used to build OpenSRF. In a following step you will actually build the OpenSRF software
\r
172 using the <command>make</command> utility.</para>
\r
173 <para>As the <systemitem class="username">root</systemitem> user, enter the commands show
\r
174 below to build the prerequisites from the software distribution that you just downloaded
\r
175 and unpacked. Remember to replace <emphasis>[DISTRIBUTION]</emphasis> in the following
\r
176 example with the keyword corresponding to the name of one of the
\r
177 <systemitem class="osname">Linux</systemitem> distributions listed in the following
\r
178 distribution keywords table <xref linkend="serversideinstallation-keywords-opensrf"/> .
\r
179 For example, to install the prerequisites for Ubuntu version 10.04 (Lucid Lynx) you would
\r
180 enter this command: <command>make -f src/extras/Makefile.install ubuntu-lucid</command> .</para>
\r
182 <userinput>cd /home/opensrf/OpenSRF-1.4.0</userinput>
\r
183 <userinput>make -f src/extras/Makefile.install [DISTRIBUTION]</userinput>
\r
185 <table xml:id="serversideinstallation-keywords-opensrf">
\r
186 <title>Keyword Targets for OpenSRF <application>"make"</application> Command</title>
\r
187 <tgroup align="left" cols="2" colsep="1" rowsep="1">
\r
188 <colspec colnum="1" colwidth="1.0*"/>
\r
189 <colspec colnum="2" colwidth="3.0*"/>
\r
192 <entry>Keyword</entry>
\r
193 <entry>Linux Version</entry>
\r
198 <entry>debian-etch</entry>
\r
199 <entry>Debian "Etch" (4.0)</entry>
\r
202 <entry>debian-lenny</entry>
\r
203 <entry>Debian "Lenny" (5.0)</entry>
\r
206 <entry>ubuntu-hardy</entry>
\r
207 <entry>Ubuntu "Hardy Heron" (8.04)</entry>
\r
210 <entry>ubuntu-karmic</entry>
\r
211 <entry>Ubuntu "Karmic Koala" (9.10)</entry>
\r
214 <entry>ubuntu-lucid</entry>
\r
215 <entry>Ubuntu "Lucid Lynx" (10.04)</entry>
\r
218 <entry>fedora13</entry>
\r
219 <entry>Fedora "Goddard" (13)</entry>
\r
222 <entry>centos</entry>
\r
223 <entry>Centos</entry>
\r
226 <entry>rhel</entry>
\r
227 <entry>RHEL</entry>
\r
230 <entry>gentoo</entry>
\r
231 <entry>Gentoo</entry>
\r
236 <para>This will install a number of packages on the system that are required by OpenSRF,
\r
237 including some Perl modules from CPAN. You can say <literal>No</literal> to the initial
\r
238 CPAN configuration prompt to allow it to automatically configure itself to download and
\r
239 install Perl modules from CPAN. The CPAN installer will ask you a number of times whether
\r
240 it should install prerequisite modules - say <literal>Yes</literal>.</para>
\r
243 <title>Build OpenSRF</title>
\r
244 <para>In this section you will configure, build and install the OpenSRF
\r
245 components that support other Evergreen services.</para>
\r
248 <title>Configure OpenSRF</title>
\r
250 <primary>OpenSRF</primary>
\r
251 <secondary>configure</secondary>
\r
253 <para>As the <systemitem class="username">opensrf</systemitem>
\r
254 user, return to the OpenSRF build directory and use the
\r
255 <command>configure</command> utility to prepare for the next
\r
256 step of compiling and linking the software. If you wish to
\r
257 include support for Python and Java, add the configuration
\r
258 options <option>--enable-python</option> and
\r
259 <option>--enable-java</option>, respectively:</para>
\r
261 <userinput>cd /home/opensrf/OpenSRF-1.4.0</userinput>
\r
262 <userinput>./configure --prefix=/openils --sysconfdir=/openils/conf</userinput>
\r
263 <userinput>make</userinput>
\r
267 <title>Compile, Link and Install OpenSRF</title>
\r
268 <para>As the <systemitem class="username">root</systemitem>
\r
269 user, return to the OpenSRF build directory and use the
\r
270 <command>make</command> utility to compile, link and install
\r
273 <userinput>cd /home/opensrf/OpenSRF-1.4.0</userinput>
\r
274 <userinput>make install</userinput>
\r
278 <title>Update the System Dynamic Library Path</title>
\r
279 <para>You must update the system dynamic library path to force
\r
280 your system to recognize the newly installed libraries. As the
\r
281 <systemitem class="username">root</systemitem> user, do this by
\r
282 creating the new file
\r
283 <filename>/etc/ld.so.conf.d/osrf.conf</filename> containing a
\r
284 new library path, then run the command
\r
285 <command>ldconfig</command> to automatically read the file and
\r
286 modify the system dynamic library path:</para>
\r
288 <userinput>echo "/openils/lib" > /etc/ld.so.conf.d/osrf.conf</userinput>
\r
289 <userinput>ldconfig</userinput>
\r
292 <step xml:id="serversideinstallation-definedomains">
\r
293 <title>Define Public and Private OpenSRF Domains</title>
\r
294 <para>For security purposes, OpenSRF uses Jabber domains to separate services
\r
295 into public and private realms. On a single-server system the easiest way to
\r
296 define public and private OpenSRF domains is to define separate host names by
\r
297 adding entries to the file <filename>/etc/hosts</filename>.</para>
\r
298 <para>In the following steps we will use the example domains
\r
299 <systemitem class="domainname">public.localhost</systemitem> for the public
\r
300 domain and <systemitem class="domainname">private.localhost</systemitem>
\r
301 for the private domain. In an upcoming step, you will configure two special
\r
302 <systemitem class="service">ejabberd</systemitem> users
\r
303 to handle communications for these two domains.</para>
\r
304 <para>As the <systemitem class="username">root</systemitem> user, edit the file
\r
305 <filename>/etc/hosts</filename> and add the following example domains:</para>
\r
307 <primary>Jabber</primary>
\r
310 <userinput>127.0.1.2 public.localhost public</userinput>
\r
311 <userinput>127.0.1.3 private.localhost private</userinput>
\r
315 <title>Change File Ownerships</title>
\r
316 <para>Finally, as the <systemitem class="username">root</systemitem>
\r
317 user, change the ownership of all files installed in the
\r
318 directory <filename class="directory">/openils</filename> to the
\r
319 user <systemitem class="username">opensrf</systemitem>:</para>
\r
321 <userinput>chown -R opensrf:opensrf /openils</userinput>
\r
327 <title>Stop the <systemitem class="service">ejabberd</systemitem> Service</title>
\r
329 <primary>ejabberd</primary>
\r
331 <para>Before continuing with configuration of <systemitem class="service">ejabberd</systemitem>
\r
332 you must stop that service. As the <systemitem class="username">root</systemitem> user,
\r
333 execute the following command to stop the service:</para>
\r
335 <userinput>/etc/init.d/ejabberd stop</userinput>
\r
337 <para>If <systemitem class="service">ejabberd</systemitem> reports that it
\r
338 is already stopped, there may have been a problem when it started back
\r
339 in the installation step. If there are any remaining daemon processes such as
\r
340 <systemitem class="daemon">beam</systemitem> or
\r
341 <systemitem class="daemon">epmd</systemitem>
\r
342 you may need to perform the following commands to kill them:</para>
\r
344 <userinput>epmd -kill</userinput>
\r
345 <userinput>killall beam; killall beam.smp</userinput>
\r
346 <userinput>rm /var/lib/ejabberd/*</userinput>
\r
347 <userinput>echo 'ERLANG_NODE=ejabberd@localhost' >> /etc/default/ejabberd</userinput>
\r
351 <title>Edit the <systemitem class="service">ejabberd</systemitem> configuration</title>
\r
352 <para>You must make several configuration changes for the
\r
353 <systemitem class="service">ejabberd</systemitem> service before
\r
354 it is started again.
\r
355 As the <systemitem class="username">root</systemitem> user, edit the file
\r
356 <filename>/etc/ejabberd/ejabberd.cfg</filename> and make the following changes:</para>
\r
359 <para>Change the line:
\r
360 <screen><userinput>{hosts, ["localhost"]}.</userinput></screen>
\r
362 <screen><userinput>{hosts, ["localhost", "private.localhost", "public.localhost"]}.</userinput></screen></para>
\r
365 <para>Change the line:
\r
366 <screen><userinput>{max_user_sessions, 10}.</userinput></screen> to:
\r
367 <screen><userinput>{max_user_sessions, 10000}.</userinput></screen></para>
\r
368 <para>If the line looks something like this:
\r
369 <screen><userinput>{access, max_user_sessions, [{10, all}]}.</userinput></screen>
\r
371 <screen><userinput>{access, max_user_sessions, [{10000, all}]}</userinput></screen></para>
\r
374 <para>Change all three occurrences of: <literal>max_stanza_size</literal>
\r
375 to: <literal>2000000</literal>.</para>
\r
378 <para>Change both occurrences of: <literal>maxrate</literal> to:
\r
379 <literal>500000</literal>.</para>
\r
382 <para>Comment out the line <literal>{mod_offline, []}</literal>
\r
383 by placing two <literal>%</literal> comment signs in front.</para>
\r
387 <step xml:id="serversideinstallation-opensrf-continued">
\r
388 <title>Restart the <systemitem class="service">ejabberd</systemitem> service</title>
\r
389 <para>As the <systemitem class="username">root</systemitem> user, restart the
\r
390 <systemitem class="service">ejabberd</systemitem> service to test the
\r
391 configuration changes and to register your users:</para>
\r
393 <userinput>/etc/init.d/ejabberd start</userinput>
\r
397 <title>Register <systemitem class="username">router</systemitem> and
\r
398 <systemitem class="username">ejabberd</systemitem> users</title>
\r
399 <para>The two <systemitem class="service">ejabberd</systemitem> users
\r
400 <systemitem class="username">router</systemitem> and
\r
401 <systemitem class="username">opensrf</systemitem> must be registered
\r
402 and configured to manage OpenSRF router service and communications
\r
403 for the two domains <literal>public.localhost</literal> and
\r
404 <literal>private.localhost</literal> that you added to the file
\r
405 <filename>/etc/hosts</filename> in a previous step
\r
406 (see <xref linkend="serversideinstallation-definedomains"/>).
\r
407 The users include:</para>
\r
410 <para>the <systemitem class="username">router</systemitem> user,
\r
411 to whom all requests to connect to an OpenSRF service will be
\r
415 <para>the <systemitem class="username">opensrf</systemitem> user,
\r
416 which clients use to connect to OpenSRF services (you may name
\r
417 the user anything you like, but we use
\r
418 <literal>opensrf</literal> in these examples)</para>
\r
421 <para>As the <systemitem class="username">root</systemitem> user, execute the
\r
422 <command>ejabberdctl</command> utility as shown below to register and create passwords
\r
423 for the users <systemitem class="username">router</systemitem> and
\r
424 <systemitem class="username">opensrf</systemitem> on each domain:</para>
\r
426 <prompt># The syntax for registering a user with ejabberdctl is:</prompt>
\r
427 <prompt># ejabberdctl register USER DOMAIN PASSWORD</prompt>
\r
428 <userinput>ejabberdctl register router private.localhost NEWPASSWORD</userinput>
\r
429 <userinput>ejabberdctl register router public.localhost NEWPASSWORD</userinput>
\r
430 <userinput>ejabberdctl register opensrf private.localhost NEWPASSWORD</userinput>
\r
431 <userinput>ejabberdctl register opensrf public.localhost NEWPASSWORD</userinput>
\r
433 <para>Note that the users <systemitem class="username">router</systemitem> and
\r
434 <systemitem class="username">opensrf</systemitem> and their respective passwords
\r
435 will be used again in the file <filename>/openils/conf/opensrf_core.xml</filename>
\r
436 in the next steps.</para>
\r
438 <step xml:id="serversideinstallation-opensrf-createconfig">
\r
439 <title>Create OpenSRF configuration files</title>
\r
440 <para>As the <systemitem class="username">opensrf</systemitem> user,
\r
441 execute the following commands to create the new configuration files
\r
442 <filename>/openils/conf/opensrf_core.xml</filename> and
\r
443 <filename>/openils/conf/opensrf.xml</filename> from the example templates:</para>
\r
445 <userinput>cd /openils/conf</userinput>
\r
446 <userinput>cp opensrf.xml.example opensrf.xml</userinput>
\r
447 <userinput>cp opensrf_core.xml.example opensrf_core.xml</userinput>
\r
451 <title>Update usernames and passwords in the OpenSRF configuration file</title>
\r
452 <para>As the <systemitem class="username">opensrf</systemitem> user, edit the
\r
453 OpenSRF configuration file <filename>/openils/conf/opensrf_core.xml</filename>
\r
454 and update the usernames and passwords to match the values shown in the
\r
455 following table. The left-hand side of <xref linkend="serversideinstallation-xpath-table-1"/>
\r
456 shows common XPath syntax to indicate the approximate position within the XML
\r
457 file that needs changes. The right-hand side of the table shows the replacement
\r
459 <table xml:id="serversideinstallation-xpath-table-1">
\r
460 <title>Sample XPath syntax for editing "opensrf_core.xml"</title>
\r
461 <tgroup align="left" cols="2" colsep="1" rowsep="1">
\r
462 <colspec colname="Xpath" colnum="1" colwidth="1.6*"/>
\r
463 <colspec colname="Value" colnum="2" colwidth="2.0*"/>
\r
466 <entry>XPath location</entry>
\r
467 <entry>Value</entry>
\r
472 <entry>/config/opensrf/username</entry>
\r
474 <systemitem class="username">opensrf</systemitem>
\r
478 <entry>/config/opensrf/passwd </entry>
\r
479 <entry><systemitem class="domainname">private.localhost</systemitem>
\r
481 <systemitem class="username">opensrf</systemitem> user
\r
485 <entry>/config/gateway/username</entry>
\r
487 <systemitem class="username">opensrf</systemitem>
\r
491 <entry>/config/gateway/passwd</entry>
\r
492 <entry><systemitem class="domainname">public.localhost</systemitem>
\r
494 <systemitem class="username">opensrf</systemitem> user
\r
498 <entry>/config/routers/router/transport/username,
\r
499 first entry where server == public.localhost</entry>
\r
501 <systemitem class="username">router</systemitem>
\r
505 <entry>/config/routers/router/transport/password,
\r
506 first entry where server == public.localhost</entry>
\r
507 <entry><systemitem class="domainname">public.localhost</systemitem>
\r
509 <systemitem class="username">router</systemitem> user
\r
513 <entry>/config/routers/router/transport/username,
\r
514 second entry where server == private.localhost</entry>
\r
516 <systemitem class="username">router</systemitem>
\r
520 <entry>/config/routers/router/transport/password,
\r
521 second entry where server == private.localhost</entry>
\r
522 <entry><systemitem class="domainname">private.localhost</systemitem>
\r
524 <systemitem class="username">router</systemitem> user
\r
530 <para>You may also need to modify the file to specify the domains from which
\r
531 <systemitem class="service">OpenSRF</systemitem> will accept connections,
\r
532 and to which it will make connections.
\r
533 If you are installing <application>OpenSRF</application> on a single server
\r
534 and using the <systemitem class="domainname">private.localhost</systemitem> and
\r
535 <systemitem class="domainname">public.localhost</systemitem> domains,
\r
536 these will already be set to the correct values. Otherwise, search and replace
\r
537 to match values for your own systems.</para>
\r
540 <title>Set location of the persistent database</title>
\r
541 <para>As the <systemitem class="username">opensrf</systemitem> user, edit the
\r
542 file <filename>/openils/conf/opensrf.xml</filename>, then find and modify the
\r
543 element <literal>dbfile</literal> (near the end of the file) to set the
\r
544 location of the persistent database:</para>
\r
545 <programlisting language="xml"><![CDATA[
\r
546 <!-- Example of an app-specific setting override -->
\r
549 <dbfile>/tmp/persist.db</dbfile>
\r
552 ]]></programlisting>
\r
554 <step xml:id="serversideinstallation-srfsh">
\r
555 <title>Create configuration files for users needing <command>srfsh</command></title>
\r
556 <para>In this section you will set up a special configuration file for each user
\r
557 who will need to run the <command>srfsh</command> (pronounced <emphasis>surf
\r
558 shell</emphasis>) utility.</para>
\r
560 <primary>srfsh</primary>
\r
562 <para>The software installation will automatically create a utility named
\r
563 <command>srfsh</command> (surf shell). This is a command line diagnostic tool for testing
\r
564 and interacting with <application>OpenSRF</application>. It will be used in a future
\r
565 step to complete and test the Evergreen installation.
\r
566 See <xref linkend="serversideinstallation-testing"/> for further information.</para>
\r
567 <para>As the <systemitem class="username">root</systemitem> user, copy the short
\r
568 sample configuration file <filename>/openils/conf/srfsh.xml.example</filename>
\r
569 to <filename>~/.srfsh.xml</filename> (note the leading dot!), the home
\r
570 directory of each user who will use <command>srfsh</command>. Finally, edit each
\r
571 file <filename>~/.srfsh.xml</filename> and make the following changes; when you
\r
572 finish, remember to change the owner of the file to match the owner of the home
\r
576 <para>Modify <literal>domain</literal> to be the router hostname
\r
577 (following our domain examples,
\r
578 <systemitem class="domainname">private.localhost</systemitem> will give
\r
579 <command>srfsh</command> access to all OpenSRF services, while
\r
580 <systemitem class="domainname">public.localhost</systemitem>
\r
581 will only allow access to those OpenSRF services that are
\r
582 publicly exposed).</para>
\r
585 <para>Modify <literal>username</literal> and
\r
586 <literal>password</literal> to match the
\r
587 <literal>opensrf</literal> Jabber user for the chosen
\r
591 <para>Modify <literal>logfile</literal> to be the full path for
\r
592 a log file to which the user has write access</para>
\r
595 <para>Modify <literal>loglevel</literal> as needed for testing</para>
\r
598 <programlisting language="xml"><![CDATA[
\r
599 <?xml version="1.0"?>
\r
600 <!-- This file follows the standard bootstrap config file layout -->
\r
601 <!-- found in opensrf_core.xml -->
\r
603 <router_name>router</router_name>
\r
604 <domain>private.localhost</domain>
\r
605 <username>opensrf</username>
\r
606 <passwd>SOMEPASSWORD</passwd>
\r
608 <logfile>/tmp/srfsh.log</logfile>
\r
609 <!-- 0 None, 1 Error, 2 Warning, 3 Info, 4 debug, 5 Internal (Nasty) -->
\r
610 <loglevel>4</loglevel>
\r
612 ]]></programlisting>
\r
615 <title>Modify the environmental variable <envar>PATH</envar> for the
\r
616 <systemitem class="username">opensrf</systemitem> user</title>
\r
617 <para>As the <systemitem class="username">opensrf</systemitem> user, modify the
\r
618 environmental variable <envar>PATH</envar> by adding a new file path to the
\r
619 <systemitem class="username">opensrf</systemitem> user's shell configuration
\r
620 file <filename>~/.bashrc</filename>:</para>
\r
622 <userinput>echo "export PATH=/openils/bin:\$PATH" >> ~/.bashrc</userinput>
\r
626 <title>Start OpenSRF</title>
\r
627 <para>As the <systemitem class="username">root</systemitem> user, start the
\r
628 <systemitem class="service">ejabberd</systemitem> and
\r
629 <systemitem class="service">memcached</systemitem> services:</para>
\r
631 <userinput>/etc/init.d/ejabberd start</userinput>
\r
632 <userinput>/etc/init.d/memcached start</userinput>
\r
634 <para>As the <systemitem class="username">opensrf</systemitem> user,
\r
635 start OpenSRF as follows:</para>
\r
637 <userinput>osrf_ctl.sh -l -a start_all</userinput>
\r
639 <para>The flag <option>-l</option> forces Evergreen to use
\r
640 <systemitem class="domainname">localhost</systemitem> (your current system)
\r
641 as the hostname. The flag <option>-a start_all</option> starts the other
\r
642 OpenSRF <systemitem class="service">router</systemitem> ,
\r
643 <systemitem class="service">Perl</systemitem> , and
\r
644 <systemitem class="service">C</systemitem> services.</para>
\r
647 <para>You can also start Evergreen without the
\r
648 <option>-l</option> flag, but the <command>osrf_ctl.sh</command>
\r
649 utility must know the fully qualified domain name for the system
\r
650 on which it will execute. That hostname was probably specified
\r
651 in the configuration file <filename>opensrf.xml</filename> which
\r
652 you configured in a previous step.</para>
\r
655 <para>If you receive an error message similar to
\r
656 <emphasis>osrf_ctl.sh: command not found</emphasis>, then your
\r
657 environment variable <envar>PATH</envar> does not include the
\r
658 directory <filename class="directory">/openils/bin</filename>.
\r
659 As the <systemitem class="username">opensrf</systemitem> user,
\r
660 edit the configuration file <filename>~/.bashrc</filename> and
\r
661 add the following line:
\r
662 <literal>export PATH=$PATH:/openils/bin</literal></para>
\r
667 <title>Test connections to OpenSRF</title>
\r
668 <para>Once you have installed and started OpenSRF, as the
\r
669 <systemitem class="username">root</systemitem> user, test your connection to
\r
670 <systemitem class="service">OpenSRF</systemitem> using the <command>srfsh</command>
\r
671 utility and trying to call the <command>add</command> method on the OpenSRF
\r
672 <systemitem class="service">math</systemitem> service:</para>
\r
674 <userinput>/openils/bin/srfsh</userinput>
\r
675 <computeroutput>srfsh# <userinput>request opensrf.math add 2 2</userinput></computeroutput>
\r
676 <computeroutput>Received Data: 4</computeroutput>
\r
677 <computeroutput>------------------------------------</computeroutput>
\r
678 <computeroutput>Request Completed Successfully</computeroutput>
\r
679 <computeroutput>Request Time in seconds: 0.007519</computeroutput>
\r
680 <computeroutput>------------------------------------</computeroutput>
\r
682 <para>For other <command>srfsh</command> commands, type in
\r
683 <userinput>help</userinput> at the prompt.</para>
\r
686 <title>Stop OpenSRF</title>
\r
687 <para>After OpenSRF has started, you can stop it at any time by using the
\r
688 <command>osrf_ctl.sh</command> again. As the
\r
689 <systemitem class="username">opensrf</systemitem>
\r
690 user, stop OpenSRF as follows:</para>
\r
692 <userinput>osrf_ctl.sh -l -a stop_all</userinput>
\r
697 <section xml:id="serversideinstallation-ubuntudebian">
\r
698 <title>Installing Evergreen 1.6.1.x On <systemitem class="osname">Ubuntu</systemitem> or
\r
699 <systemitem class="osname">Debian</systemitem></title>
\r
701 <primary>Linux</primary>
\r
702 <secondary>Debian</secondary>
\r
705 <primary>Linux</primary>
\r
706 <secondary>Ubuntu</secondary>
\r
708 <para>This section outlines the installation process for the latest stable version of
\r
710 <para>In this section you will download, unpack, install, configure and test the Evergreen
\r
711 system, including the Evergreen server and the PostgreSQL database system. You will make several
\r
712 configuration changes and adjustments to the software, including updates to configure the system
\r
713 for your own locale, and some updates needed to work around a few known issues.</para>
\r
715 <para>The following steps have been tested on the x86 (32-bit) and x86-64 (64-bit)
\r
716 architectures. There may be differences between the Desktop and Server editions of
\r
717 <systemitem class="osname">Ubuntu</systemitem>. These instructions assume the Server
\r
719 <para>In the following instructions, you are asked to perform certain steps as
\r
720 either the <systemitem class="username">root</systemitem> user, the
\r
721 <systemitem class="username">opensrf</systemitem> user, or the
\r
722 <systemitem class="username">postgres</systemitem> user.</para>
\r
725 <para><systemitem class="osname">Debian</systemitem> -- To become the
\r
726 <systemitem class="username">root</systemitem> user, issue the command
\r
727 <command>su -</command> and enter the password of the
\r
728 <systemitem class="username">root</systemitem> user.</para>
\r
731 <para><systemitem class="osname">Ubuntu</systemitem> -- To become the
\r
732 <systemitem class="username">root</systemitem> user, issue the command
\r
733 <command>sudo su -</command> and enter the password of the
\r
734 <systemitem class="username">root</systemitem> user.</para>
\r
737 <para>To switch from the <systemitem class="username">root</systemitem> user to a
\r
738 different user, issue the command <command>su - USERNAME</command>. For example, to
\r
739 switch from the <systemitem class="username">root</systemitem> user to the
\r
740 <systemitem class="username">opensrf</systemitem> user, issue the command
\r
741 <command>su - opensrf</command>. Once you have become a non-root user, to become the
\r
742 <systemitem class="username">root</systemitem> user again, simply issue the command
\r
743 <command>exit</command>.</para>
\r
747 <title>Install OpenSRF</title>
\r
748 <para>Evergreen software is integrated with and depends on the Open Service
\r
749 Request Framework (OpenSRF) software system. For further information on
\r
750 installing, configuring and testing OpenSRF, see
\r
751 <xref linkend="serversideinstallation-opensrf"/>.</para>
\r
752 <para>Follow the steps outlined in that section and run the specified tests to
\r
753 ensure that OpenSRF is properly installed and configured. Do
\r
754 <emphasis><emphasis role="bold">not</emphasis></emphasis> continue with
\r
755 any further Evergreen installation steps until you have verified that OpenSRF
\r
756 has been successfully installed and tested.</para>
\r
759 <title>Download and Unpack Latest Evergreen Version</title>
\r
760 <para>As the <systemitem class="username">opensrf</systemitem> user, download
\r
761 and extract the latest version of Evergreen. The latest version can be found here:
\r
762 <ulink url="http://evergreen-ils.org/downloads/Evergreen-ILS-1.6.1.2.tar.gz"></ulink></para>
\r
764 <userinput>wget http://evergreen-ils.org/downloads/Evergreen-ILS-1.6.1.2.tar.gz</userinput>
\r
765 <userinput>tar zxf Evergreen-ILS-1.6.1.2.tar.gz</userinput>
\r
767 <para>The new directory
\r
768 <filename class="directory">/home/opensrf/Evergreen-ILS-1.6.1.2</filename>
\r
769 will be created.</para>
\r
771 <step xml:id="serversideinstallation-installprereq">
\r
772 <title>Install Prerequisites to Build Evergreen</title>
\r
773 <para>In this section you will install and configure a set of prerequisites that
\r
774 will be used to build Evergreen. In a following step you will actually build the
\r
775 Evergreen software using the <command>make</command> utility.</para>
\r
776 <para>As the <systemitem class="username">root</systemitem> user, enter the commands show
\r
777 below to build the prerequisites from the software distribution that you just downloaded
\r
778 and unpacked. Remember to replace <emphasis>[DISTRIBUTION]</emphasis> in the following
\r
779 example with the keyword corresponding to the name of one of the
\r
780 <systemitem class="osname">Linux</systemitem> distributions listed in the following distribution
\r
781 keywords table <xref linkend="serversideinstallation-keywords-evergreen"/> . For example,
\r
782 to install the prerequisites for Ubuntu version 9.10 (Karmic Koala) you would enter this
\r
783 command: <command>make -f Open-ILS/src/extras/Makefile.install ubuntu-karmic</command>.</para>
\r
785 <userinput>cd /home/opensrf/Evergreen-ILS-1.6.1.2</userinput>
\r
786 <userinput>make -f Open-ILS/src/extras/Makefile.install [DISTRIBUTION]</userinput>
\r
788 <table xml:id="serversideinstallation-keywords-evergreen">
\r
789 <title>Keyword Targets for Evergreen <application>"make"</application> Command</title>
\r
790 <tgroup align="left" cols="2" colsep="1" rowsep="1">
\r
791 <colspec colnum="1" colwidth="1.0*"/>
\r
792 <colspec colnum="2" colwidth="3.0*"/>
\r
795 <entry>Keyword</entry>
\r
796 <entry>Linux Version</entry>
\r
801 <entry>debian-etch</entry>
\r
802 <entry>Debian "Etch" (4.0)</entry>
\r
805 <entry>debian-lenny</entry>
\r
806 <entry>Debian "Lenny" (5.0)</entry>
\r
809 <entry>ubuntu-hardy</entry>
\r
810 <entry>Ubuntu "Hardy Heron" (8.04)</entry>
\r
813 <entry>ubuntu-intrepid</entry>
\r
814 <entry>Ubuntu "Intrepid Ibex" (8.10)</entry>
\r
817 <entry>ubuntu-karmic</entry>
\r
818 <entry>Ubuntu "Karmic Koala" (9.10)</entry>
\r
821 <entry>ubuntu-karmic</entry>
\r
822 <entry>Ubuntu "Lucid Lynx" (10.04)</entry>
\r
825 <entry>centos</entry>
\r
826 <entry>Centos</entry>
\r
829 <entry>rhel</entry>
\r
830 <entry>RHEL</entry>
\r
833 <entry>gentoo</entry>
\r
834 <entry>Gentoo</entry>
\r
840 <step performance="optional" xml:id="serversideinstallation-postgresql-default">
\r
841 <title>(OPTIONAL) Install the PostgreSQL Server</title>
\r
843 <primary>databases</primary>
\r
844 <secondary>PostgreSQL</secondary>
\r
846 <para>Since the PostgreSQL server is usually a standalone server in multi-server
\r
847 production systems, the prerequisite installer Makefile in the previous section
\r
848 (see <xref linkend="serversideinstallation-installprereq"/>)
\r
849 does not automatically install PostgreSQL. You must install the PostgreSQL server
\r
850 yourself, either on the same system as Evergreen itself or on another system.
\r
851 If your PostgreSQL server is on a different system, just skip this step.</para>
\r
852 <para>For further information on manually installing PostgreSQL, visit the official
\r
853 <link xl:href="http://www.postgresql.org/">PostgreSQL Site</link>.</para>
\r
854 <para>If your PostgreSQL server will be on the same system as your Evergreen
\r
855 software, then as the <systemitem class="username">root</systemitem> user
\r
856 install the required PostgreSQL server packages:</para>
\r
857 <para>For <systemitem class="osname">Debian Lenny</systemitem> and
\r
858 <systemitem class="osname">Ubuntu Hardy (8.04)</systemitem>:</para>
\r
860 <userinput>make -f Open-ILS/src/extras/Makefile.install install_pgsql_server_debs_83</userinput>
\r
862 <para>For <systemitem class="osname">Ubuntu Karmic (9.10)</systemitem> and
\r
863 <systemitem class="osname">Ubuntu Lucid (10.04)</systemitem>:</para>
\r
865 <userinput>make -f Open-ILS/src/extras/Makefile.install install_pgsql_server_debs_84</userinput>
\r
868 <para>PostgreSQL versions 8.3 or 8.4 are the recommended versions to work
\r
869 with Evergreen 1.6. If you have an older version of PostgreSQL, you should
\r
870 upgrade before installing Evergreen. To find the running version of
\r
871 PostgreSQL, as the <systemitem class="username">postgres</systemitem>
\r
872 user, run the <command>psql</command>. Then type <userinput>SELECT
\r
873 version();</userinput> to get detailed information about your version
\r
874 of PostgreSQL.</para>
\r
877 <step performance="optional">
\r
878 <title>Install Perl Modules on PostgreSQL Server</title>
\r
879 <para>If PostgreSQL is running on the same system as your Evergreen software,
\r
880 then the Perl modules will automatically be available. Just skip this step.
\r
881 Otherwise, continue if your PostgreSQL server is running on another system.</para>
\r
882 <para>You will need to install several Perl modules on the other system. As the
\r
883 <systemitem class="username">root</systemitem> user install the following Perl
\r
886 <prompt># first, ensure the gcc compiler is installed:</prompt>
\r
887 <userinput>apt-get install gcc</userinput>
\r
888 <prompt># then install the Perl modules:</prompt>
\r
889 <userinput>perl -MCPAN -e shell</userinput>
\r
890 <computeroutput>cpan></computeroutput>
\r
891 <userinput>install JSON::XS</userinput>
\r
892 <computeroutput>cpan></computeroutput>
\r
893 <userinput>install MARC::Record</userinput>
\r
894 <computeroutput>cpan></computeroutput>
\r
895 <userinput>install MARC::File::XML</userinput>
\r
897 <para>For more information on installing Perl Modules vist the official
\r
898 <link xl:href="http://www.cpan.org/">CPAN</link> site.</para>
\r
900 <primary>Perl</primary>
\r
901 <secondary>CPAN</secondary>
\r
905 <title>Update the System Dynamic Library Path</title>
\r
906 <para>You must update the system dynamic library path to force your system to recognize
\r
907 the newly installed libraries. As the <systemitem class="username">root</systemitem> user,
\r
908 do this by creating the new file <filename>/etc/ld.so.conf.d/osrf.conf</filename>
\r
909 containing a new library path, then run the command <command>ldconfig</command> to
\r
910 automatically read the file and modify the system dynamic library path:</para>
\r
912 <userinput>echo "/usr/local/lib" >> /etc/ld.so.conf.d/osrf.conf</userinput>
\r
913 <userinput>echo "/usr/local/lib/dbd" >> /etc/ld.so.conf.d/osrf.conf</userinput>
\r
914 <userinput>ldconfig</userinput>
\r
917 <step performance="optional">
\r
918 <title>Restart the PostgreSQL Server</title>
\r
919 <para>If PostgreSQL is running on the same system as the rest of Evergreen, as
\r
920 the <systemitem class="username">root</systemitem> user you must restart
\r
921 PostgreSQL to re-read the new library paths just configured. If PostgreSQL is
\r
922 running on another system, you may skip this step.
\r
923 As the <systemitem class="username">opensrf</systemitem> user,
\r
924 execute the following command, where
\r
925 <literal>[PGSQL_VERSION]</literal> is your installed PostgreSQL version
\r
926 (e.g. <literal>8.3</literal>):</para>
\r
928 <userinput>/etc/init.d/postgresql-[PGSQL_VERSION] restart</userinput>
\r
931 <step xml:id="serversideinstallation-configure">
\r
932 <title>Configure Evergreen</title>
\r
933 <para>As the <systemitem class="username">opensrf</systemitem> user, return to
\r
934 the Evergreen build directory and use the <command>configure</command> and
\r
935 <command>make</command> utilities to configure Evergreen so it can be compiled
\r
936 and linked in the next step:</para>
\r
938 <userinput>cd /home/opensrf/Evergreen-ILS-1.6.1.2</userinput>
\r
939 <userinput>./configure --prefix=/openils --sysconfdir=/openils/conf</userinput>
\r
940 <userinput>make</userinput>
\r
944 <title>Compile, Link and Install Evergreen</title>
\r
945 <para>In this step you will actually compile, link and install Evergreen and the
\r
946 default Evergreen Staff Client.</para>
\r
947 <para>As the <systemitem class="username">root</systemitem> user, return to the
\r
948 Evergreen build directory and use the <command>make</command> utility as shown below:</para>
\r
950 <userinput>cd /home/opensrf/Evergreen-ILS-1.6.1.2</userinput>
\r
951 <userinput>make STAFF_CLIENT_BUILD_ID=rel_1_6_1_2 install</userinput>
\r
953 <para>The Staff Client will also be automatically built, but you must remember
\r
954 to set the variable <envar>STAFF_CLIENT_BUILD_ID</envar> to match the version of the Staff
\r
955 Client you will use to connect to the Evergreen server. For further information on manually
\r
956 building the Staff Client, see
\r
957 <xref linkend="staffclientinstallation-building-staffclient"/>.</para>
\r
958 <para>The above commands will create a new subdirectory
\r
959 <filename class="directory">/openils/var/web/xul/rel_1_6_1_2</filename>
\r
960 containing the Staff Client.</para>
\r
961 <para>To complete the Staff Client installation,
\r
962 as the <systemitem class="username">root</systemitem> user create a symbolic link
\r
963 named <emphasis>server</emphasis> in the head of the Staff Client directory
\r
964 <filename class="directory">/openils/var/web/xul</filename> that points to the
\r
965 subdirectory <filename class="directory">/server</filename> of the new Staff
\r
966 Client build:</para>
\r
968 <userinput>cd /openils/var/web/xul</userinput>
\r
969 <userinput>ln -sf rel_1_6_1_2/server server</userinput>
\r
973 <title>Copy the OpenSRF Configuration Files</title>
\r
974 <para>You must copy several example OpenSRF configuration files into place after first
\r
975 creating backup copies for troubleshooting purposes, then change all the file ownerships
\r
976 to <systemitem class="username">opensrf</systemitem>. These files replace the
\r
977 configuration files that you set up in a previous step
\r
978 (see <xref linkend="serversideinstallation-opensrf-createconfig"/>)
\r
979 when you installed and tested OpenSRF.
\r
980 As the <systemitem class="username">root</systemitem> user, execute the
\r
981 following commands:</para>
\r
983 <userinput>cd /openils/conf</userinput>
\r
984 <userinput>cp opensrf.xml opensrf.xml.BAK</userinput>
\r
985 <userinput>cp opensrf_core.xml opensrf_core.xml.BAK</userinput>
\r
986 <userinput>cp opensrf.xml.example opensrf.xml</userinput>
\r
987 <userinput>cp opensrf_core.xml.example opensrf_core.xml</userinput>
\r
988 <userinput>cp oils_web.xml.example oils_web.xml</userinput>
\r
989 <userinput>chown -R opensrf:opensrf /openils/</userinput>
\r
993 <title>Create and Configure PostgreSQL Database</title>
\r
995 <primary>databases</primary>
\r
996 <secondary>PostgreSQL</secondary>
\r
998 <para>In this step you will create the Evergreen database. In the commands
\r
999 below, remember to adjust the path of the <emphasis role="bold">contrib</emphasis>
\r
1000 repository to match your PostgreSQL server
\r
1001 layout. For example, if you built PostgreSQL from source the path would be
\r
1002 <filename class="directory">/usr/local/share/contrib</filename>; if you
\r
1003 installed the PostgreSQL 8.3 server packages on <systemitem class="osname">Ubuntu 8.04</systemitem>,
\r
1004 the path would be
\r
1005 <systemitem class="directory">/usr/share/postgresql/8.3/contrib/</systemitem>.</para>
\r
1009 <emphasis role="bold">Create and configure the database</emphasis>
\r
1011 <para>As the <systemitem class="username">postgres</systemitem>
\r
1012 user on the PostgreSQL system create the PostgreSQL database,
\r
1013 then set some internal paths:</para>
\r
1015 <userinput>createdb evergreen -E UTF8 -T template0</userinput>
\r
1016 <userinput>createlang plperl evergreen</userinput>
\r
1017 <userinput>createlang plperlu evergreen</userinput>
\r
1018 <userinput>createlang plpgsql evergreen</userinput>
\r
1020 <para>Continue as user <systemitem class="username">postgres</systemitem>
\r
1021 and execute the SQL scripts as shown below, adjusting the paths as needed, where
\r
1022 <literal>[PGSQL_VERSION]</literal> is your installed PostgreSQL
\r
1023 version (e.g. <literal>8.3</literal>).</para>
\r
1025 <userinput>psql -f /usr/share/postgresql/[PGSQL_VERSION]/contrib/tablefunc.sql evergreen</userinput>
\r
1026 <userinput>psql -f /usr/share/postgresql/[PGSQL_VERSION]/contrib/tsearch2.sql evergreen</userinput>
\r
1027 <userinput>psql -f /usr/share/postgresql/[PGSQL_VERSION]/contrib/pgxml.sql evergreen</userinput>
\r
1030 <step xml:id="serversideinstallation-postgresqlcreateuser">
\r
1031 <title>Create <systemitem class="username">evergreen</systemitem> PostgreSQL user</title>
\r
1032 <para>As the <systemitem class="username">postgres</systemitem>
\r
1033 user on the PostgreSQL system, create a new PostgreSQL user
\r
1034 named <systemitem class="username">evergreen</systemitem> and
\r
1035 assign a password:</para>
\r
1037 <userinput>createuser -P -s evergreen</userinput>
\r
1038 <computeroutput>Enter password for new role: <userinput>MYNEWPASSWORD</userinput></computeroutput>
\r
1039 <computeroutput>Enter it again: <userinput>MYNEWPASSWORD</userinput></computeroutput>
\r
1043 <title>Create database schema</title>
\r
1044 <para>As the <systemitem class="username">root</systemitem>
\r
1045 user, create the database schema and configure your system with
\r
1046 the corresponding database authentication details for the
\r
1047 <emphasis>evergreen</emphasis> database user that you just created
\r
1048 in the previous step
\r
1049 (see <xref linkend="serversideinstallation-postgresqlcreateuser"/>).</para>
\r
1050 <para>Enter the following commands and replace
\r
1051 <emphasis>HOSTNAME, PORT, PASSWORD</emphasis> and
\r
1052 <emphasis>DATABASENAME</emphasis> with appropriate
\r
1055 <userinput>cd /home/opensrf/Evergreen-ILS-1.6.1.2</userinput>
\r
1056 <userinput>perl Open-ILS/src/support-scripts/eg_db_config.pl --update-config \</userinput>
\r
1057 <userinput> --service all --create-schema --create-bootstrap --create-offline \</userinput>
\r
1058 <userinput> --hostname HOSTNAME --port PORT \</userinput>
\r
1059 <userinput> --user evergreen --password PASSWORD --database DATABASENAME</userinput>
\r
1061 <para>On most systems, <emphasis>HOSTNAME</emphasis> will be
\r
1062 <emphasis role="bold">localhost</emphasis> and
\r
1063 <emphasis>PORT</emphasis> will be <emphasis role="bold">5432</emphasis>.
\r
1064 Of course, values for <emphasis>PASSWORD</emphasis> and
\r
1065 <emphasis>DATABASENAME</emphasis> must match the values you used in the
\r
1067 (see <xref linkend="serversideinstallation-postgresqlcreateuser"/>)
\r
1068 when you created the database and and set a password for the
\r
1069 <systemitem class="username">evergreen</systemitem> user.</para>
\r
1070 <para>As the command executes, you may see warnings similar to:
\r
1071 <literal>ERROR: schema SOMENAME does not exist</literal> (in fact,
\r
1072 you may see one warning per schema) but they can be safely ignored.</para>
\r
1074 <para>If you are entering the above command on a single
\r
1075 line, do not include the <literal>\</literal>
\r
1076 (backslash) characters. If you are using the
\r
1077 <command>bash</command> shell, these should only be used
\r
1078 at the end of a line at a bash prompt to indicate that
\r
1079 the command is continued on the next line.</para>
\r
1083 <title>Configure the Apache web server</title>
\r
1085 <primary>web server</primary>
\r
1086 <secondary>Apache</secondary>
\r
1088 <para>In this step you will configure the Apache web server to
\r
1089 support Evergreen software.</para>
\r
1090 <para>First, you must enable some built-in Apache modules and install
\r
1091 some additional Apache configuration files. Then you will create a new
\r
1092 Security Certificate. Finally, you must make several changes to the Apache
\r
1093 configuration file.</para>
\r
1096 <title>Enable the required Apache Modules</title>
\r
1097 <para>As the <systemitem class="username">root</systemitem>
\r
1098 user, enable some modules in the Apache server, then
\r
1099 copy the new configuration files to the Apache server
\r
1100 directories:</para>
\r
1102 <userinput>a2enmod ssl # enable mod_ssl</userinput>
\r
1103 <userinput>a2enmod rewrite # enable mod_rewrite</userinput>
\r
1104 <userinput>a2enmod expires # enable mod_expires</userinput>
\r
1106 <para>As the commands execute, you may see warnings similar to:
\r
1107 <literal>Module SOMEMODULE already enabled</literal>
\r
1108 but you can safely ignore them.</para>
\r
1111 <title>Copy Apache configuration files</title>
\r
1112 <para>You must copy the Apache configuration
\r
1113 files from the Evergreen installation directory
\r
1114 to the Apache directory. As the
\r
1115 <systemitem class="username">root</systemitem>
\r
1116 user, perform the following commands:</para>
\r
1118 <userinput>cd /home/opensrf/Evergreen-ILS-1.6.1.2</userinput>
\r
1119 <userinput>cp Open-ILS/examples/apache/eg.conf /etc/apache2/sites-available/</userinput>
\r
1120 <userinput>cp Open-ILS/examples/apache/eg_vhost.conf /etc/apache2/</userinput>
\r
1121 <userinput>cp Open-ILS/examples/apache/startup.pl /etc/apache2/</userinput>
\r
1124 <step xml:id="serversideinstallation-createcertificate">
\r
1125 <title>Create a Security Certificate</title>
\r
1126 <para>You must create a new Security Certificate (SSL Key)
\r
1127 for the Apache server using the <command>openssl</command>
\r
1128 command. For a public production server you must configure
\r
1129 or purchase a signed SSL certificate, but for now you can
\r
1130 just use a self-signed certificate and accept the warnings
\r
1131 in the Staff Client and browser during testing and
\r
1132 development. As the
\r
1133 <systemitem class="username">root</systemitem> user,
\r
1134 perform the following commands:</para>
\r
1136 <userinput>mkdir /etc/apache2/ssl</userinput>
\r
1137 <userinput>cd /etc/apache2/ssl</userinput>
\r
1138 <userinput>openssl req -new -x509 -days 365 -nodes -out server.crt -keyout server.key</userinput>
\r
1141 <para>This step generates a self-signed SSL
\r
1142 certificate. You must install a proper SSL
\r
1143 certificate for a public production system to
\r
1144 avoid warning messages when users login to their
\r
1145 account through the OPAC or when staff login
\r
1146 through the Staff Client.</para>
\r
1147 <para>For further information on getting a proper
\r
1148 SSL certificate, see
\r
1149 <xref linkend="serversideinstallation-ssl"/>.</para>
\r
1152 <step xml:id="serversideinstallation-modify-apache">
\r
1153 <title>Update Apache configuration file</title>
\r
1154 <para>You must make several changes to the new Apache
\r
1155 configuration file
\r
1156 <filename>/etc/apache2/sites-available/eg.conf</filename> .
\r
1157 As the <systemitem class="username">root</systemitem> user,
\r
1158 edit the file and make the following changes:</para>
\r
1161 <para>In the section
\r
1162 <literal><Directory "/openils/var/cgi-bin"></literal>
\r
1163 replace this line:
\r
1164 <literal>Allow from 10.0.0.0/8</literal>
\r
1165 with this line: <literal>Allow from all</literal>.</para>
\r
1166 <warning>This change allows access to your
\r
1167 configuration CGI scripts from any workstation on
\r
1168 any network. This is only a temporary change to
\r
1169 expedite testing and should be removed after you
\r
1170 have finished and successfully tested the Evergreen
\r
1171 installation. See
\r
1172 <xref linkend="serversideinstallation-postinstallation"/>
\r
1173 for further details on removing this change after
\r
1174 the Evergreen installation is complete.
\r
1178 <para>Comment out the line <literal>Listen
\r
1179 443</literal>, since it conflicts with the
\r
1180 same declaration in the configuration file:
\r
1181 <filename>/etc/apache2/ports.conf</filename>.
\r
1182 Note that <systemitem class="osname">Debian
\r
1183 </systemitem> users should not do this
\r
1184 since the conflict does not apply to that
\r
1185 operating system.</para>
\r
1188 <para>The following updates are needed to allow
\r
1189 the logs to function properly, but it may break
\r
1190 other Apache applications on your server:</para>
\r
1191 <para>For the <systemitem class="osname">Linux</systemitem>
\r
1192 distributions <systemitem class="osname">Ubuntu
\r
1193 Hardy</systemitem> or
\r
1194 <systemitem class="osname">Debian Etch</systemitem>,
\r
1195 as the <systemitem class="username">root</systemitem>
\r
1196 user, edit the Apache configuration file
\r
1197 <filename>/etc/apache2/apache2.conf</filename> and
\r
1198 change the line <literal>User www-data</literal>
\r
1199 to <literal>User opensrf</literal>.</para>
\r
1200 <para>For the <systemitem class="osname">Linux</systemitem>
\r
1201 distributions <systemitem class="osname">Ubuntu
\r
1202 Karmic</systemitem>,
\r
1203 <systemitem class="osname">Ubuntu Lucid</systemitem>
\r
1204 or <systemitem class="osname">Debian Lenny</systemitem>,
\r
1205 as the <systemitem class="username">root</systemitem>
\r
1206 user, edit the Apache configuration file
\r
1207 and change these lines:</para>
\r
1209 <userinput>export APACHE_RUN_USER=www-data</userinput>
\r
1210 <userinput>export APACHE_RUN_GROUP=www-data</userinput>
\r
1212 <para>to instead read:</para>
\r
1214 <userinput>export APACHE_RUN_USER=opensrf</userinput>
\r
1215 <userinput>export APACHE_RUN_GROUP=opensrf</userinput>
\r
1220 <systemitem class="username">root</systemitem> user,
\r
1221 edit the Apache configuration file
\r
1222 <filename>/etc/apache2/apache2.conf</filename> and
\r
1223 modify the values for <literal>KeepAliveTimeout</literal>
\r
1224 and <literal>MaxKeepAliveRequests</literal> to match
\r
1225 the following:</para>
\r
1227 <userinput>KeepAliveTimeout 1</userinput>
\r
1228 <userinput>MaxKeepAliveRequests 100</userinput>
\r
1232 <para>Further configuration changes to
\r
1233 Apache may be necessary for busy systems. These
\r
1234 changes increase the number of Apache server
\r
1235 processes that are started to support additional
\r
1236 browser connections.</para>
\r
1237 <para>As the <systemitem
\r
1238 class="username">root</systemitem> user, edit the
\r
1239 Apache configuration file
\r
1240 <filename>/etc/apache2/apache2.conf</filename>,
\r
1241 locate and modify the section related to
\r
1242 <emphasis>prefork configuration</emphasis> to suit
\r
1243 the load on your system:</para>
\r
1244 <programlisting language="xml"><![CDATA[
\r
1245 <IfModule mpm_prefork_module>
\r
1248 MaxSpareServers 15
\r
1250 MaxRequestsPerChild 10000
\r
1252 ]]></programlisting>
\r
1257 <title>Enable the Evergreen web site</title>
\r
1258 <para>Finally, you must enable the Evergreen web site. As the
\r
1259 <systemitem class="username">root</systemitem> user, execute
\r
1260 the following Apache configuration commands to disable the default
\r
1261 <emphasis>It Works</emphasis> web page and enable the
\r
1262 Evergreen web site, and then restart the Apache server:</para>
\r
1264 <prompt># disable/enable web sites</prompt>
\r
1265 <userinput>a2dissite default</userinput>
\r
1266 <userinput>a2ensite eg.conf</userinput>
\r
1267 <prompt># restart the server</prompt>
\r
1268 <userinput>/etc/init.d/apache2 reload</userinput>
\r
1275 <step xml:id="serversideinstallation-opensrf-config">
\r
1276 <title>Update the OpenSRF Configuration File</title>
\r
1277 <para>As the <systemitem class="username">opensrf</systemitem> user, edit the
\r
1278 OpenSRF configuration file <filename>/openils/conf/opensrf_core.xml</filename>
\r
1279 to update the Jabber usernames and passwords, and to specify the domain from
\r
1280 which we will accept and to which we will make connections.</para>
\r
1281 <para>If you are installing Evergreen on a single server and using the
\r
1282 <systemitem class="domainname">private.localhost</systemitem> /
\r
1283 <systemitem class="domainname">public.localhost</systemitem> domains,
\r
1284 these will already be set to the correct values. Otherwise, search and replace
\r
1285 to match your customized values.</para>
\r
1286 <para>The left-hand side of <xref linkend="serversideinstallation-xpath-table-2"/>
\r
1287 shows common XPath syntax to indicate the approximate position within the XML
\r
1288 file that needs changes. The right-hand side of the table shows the replacement
\r
1290 <table xml:id="serversideinstallation-xpath-table-2">
\r
1291 <title>Sample XPath syntax for editing "opensrf_core.xml"</title>
\r
1292 <tgroup align="left" cols="2" colsep="1" rowsep="1">
\r
1293 <colspec colname="Xpath" colnum="1" colwidth="1.6*"/>
\r
1294 <colspec colname="Value" colnum="2" colwidth="2.0*"/>
\r
1297 <entry>XPath location</entry>
\r
1298 <entry>Value</entry>
\r
1303 <entry>/config/opensrf/username</entry>
\r
1305 <systemitem class="username">opensrf</systemitem>
\r
1309 <entry>/config/opensrf/passwd </entry>
\r
1310 <entry><systemitem class="domainname">private.localhost</systemitem>
\r
1312 <systemitem class="username">opensrf</systemitem> user
\r
1316 <entry>/config/gateway/username</entry>
\r
1318 <systemitem class="username">opensrf</systemitem>
\r
1322 <entry>/config/gateway/passwd</entry>
\r
1323 <entry><systemitem class="domainname">public.localhost</systemitem>
\r
1325 <systemitem class="username">opensrf</systemitem> user
\r
1329 <entry>/config/routers/router/transport/username,
\r
1330 first entry where server == public.localhost</entry>
\r
1332 <systemitem class="username">router</systemitem>
\r
1336 <entry>/config/routers/router/transport/password,
\r
1337 first entry where server == public.localhost</entry>
\r
1338 <entry><systemitem class="domainname">public.localhost</systemitem>
\r
1340 <systemitem class="username">router</systemitem> user
\r
1344 <entry>/config/routers/router/transport/username,
\r
1345 second entry where server == private.localhost</entry>
\r
1347 <systemitem class="username">router</systemitem>
\r
1351 <entry>/config/routers/router/transport/password,
\r
1352 second entry where server == private.localhost</entry>
\r
1353 <entry><systemitem class="domainname">private.localhost</systemitem>
\r
1355 <systemitem class="username">router</systemitem> user
\r
1363 <title>Create Configuration Files for Users Needing <command>srfsh</command></title>
\r
1364 <para>When OpenSRF was installed in a previous step (see
\r
1365 <xref linkend="serversideinstallation-opensrf"/> for further information),
\r
1366 the software installation automatically created a utility named
\r
1367 <command>srfsh</command> (surf shell). This is a command line diagnostic tool
\r
1368 for testing and interacting with <application>OpenSRF</application> It will be used
\r
1369 in a future step to complete and test the Evergreen installation. See
\r
1370 <xref linkend="serversideinstallation-testing"/> for further information.</para>
\r
1372 <step xml:id="serversideinstallation-opensrf-env">
\r
1373 <title>Modify the OpenSRF Environment</title>
\r
1374 <para>Modify the shell configuration file <filename>~/.bashrc</filename> for
\r
1375 user <systemitem class="username">opensrf</systemitem> by adding a Perl environmental
\r
1376 variable, then execute the shell configuration file to load the new variables into
\r
1377 your current environment.</para>
\r
1380 <emphasis>In a multi-server environment, you must add any
\r
1381 modifications to <filename>~/.bashrc</filename> to the top of
\r
1382 the file <emphasis>before</emphasis> the line
\r
1383 <literal>[ -z "$PS1" ] && return </literal>.
\r
1384 This will allow headless (scripted) logins to load the correct
\r
1385 environment.</emphasis>
\r
1389 <userinput>echo "export PERL5LIB=/openils/lib/perl5:\$PERL5LIB" >> ~/.bashrc</userinput>
\r
1390 <userinput>. ~/.bashrc</userinput>
\r
1394 <title>(OPTIONAL) Enable and Disable Language Localizations</title>
\r
1395 <para>You can load translations such as Armenian (hy-AM), Canadian French
\r
1396 (fr-CA), and others into the database to complete the translations available in
\r
1397 the OPAC and Staff Client. For further information, see <xref linkend="enabling_and_disabling_localization"/>.</para>
\r
1401 <section xml:id="serversideinstallation-starting">
\r
1402 <title>Starting Evergreen</title>
\r
1405 <para>As the <systemitem class="username">root</systemitem>
\r
1406 user, start the <systemitem class="service">ejabberd</systemitem> and
\r
1407 <systemitem class="service">memcached</systemitem> services as follows:</para>
\r
1409 <userinput>/etc/init.d/ejabberd start</userinput>
\r
1410 <userinput>/etc/init.d/memcached start</userinput>
\r
1414 <para>As the <systemitem class="username">opensrf</systemitem> user,
\r
1415 start Evergreen as follows:</para>
\r
1417 <userinput>osrf_ctl.sh -l -a start_all</userinput>
\r
1419 <para>The flag <option>-l</option> forces Evergreen to use
\r
1420 <systemitem class="domainname">localhost</systemitem> (your current system)
\r
1421 as the hostname. The flag <option>-a start_all</option> starts the other
\r
1422 OpenSRF <systemitem class="service">router</systemitem> ,
\r
1423 <systemitem class="service">Perl</systemitem> , and
\r
1424 <systemitem class="service">C</systemitem> services.</para>
\r
1427 <para>You can also start Evergreen without the
\r
1428 <option>-l</option> flag, but the <command>osrf_ctl.sh</command>
\r
1429 utility must know the fully qualified domain name for the system
\r
1430 on which it will execute. That hostname was probably specified
\r
1431 in the configuration file <filename>opensrf.xml</filename> which
\r
1432 you configured in a previous step.</para>
\r
1435 <para>If you receive an error message similar to
\r
1436 <emphasis>osrf_ctl.sh: command not found</emphasis>, then your
\r
1437 environment variable <envar>PATH</envar> does not include the
\r
1438 directory <filename class="directory">/openils/bin</filename>.
\r
1439 As the <systemitem class="username">opensrf</systemitem> user,
\r
1440 edit the configuration file <filename>~/.bashrc</filename> and
\r
1441 add the following line:
\r
1442 <literal>export PATH=$PATH:/openils/bin</literal></para>
\r
1445 <para>If you receive an error message similar to <emphasis>Can't
\r
1446 locate OpenSRF/System.pm in @INC ... BEGIN failed--compilation
\r
1447 aborted</emphasis>, then your environment variable
\r
1448 <emphasis role="bold">PERL5LIB</emphasis> does not include the
\r
1449 directory <filename class="directory">/openils/lib/perl5</filename>.
\r
1450 As the <systemitem class="username">opensrf</systemitem> user,
\r
1451 edit the configuration file <filename>~/.bashrc</filename> and
\r
1452 add the following line:
\r
1453 <literal>export PERL5LIB=$PERL5LIB:/openils/lib/perl5</literal></para>
\r
1458 <para>In this step you will generate the Web files needed by the Staff Client
\r
1459 and catalog, and calculate the proximity of locations in the Organizational Unit
\r
1460 tree (which allows <emphasis>Holds</emphasis> to work properly). You must do
\r
1461 this the first time you start Evergreen and after making any changes to the
\r
1462 library hierarchy. As the <systemitem class="username">opensrf</systemitem>
\r
1463 user, execute the following commands:</para>
\r
1465 <userinput>cd /openils/bin</userinput>
\r
1466 <userinput>./autogen.sh -c /openils/conf/opensrf_core.xml -u</userinput>
\r
1467 <computeroutput>Updating Evergreen organization tree and IDL using '/openils/conf/opensrf_core.xml'</computeroutput>
\r
1468 <computeroutput>Updating fieldmapper</computeroutput>
\r
1472 <para>As the <systemitem class="username">root</systemitem> user, restart the
\r
1473 Apache Web server:</para>
\r
1475 <userinput>/etc/init.d/apache2 restart</userinput>
\r
1478 <para>If the Apache Web server was running when you started the OpenSRF
\r
1479 services, you might not be able to successfully log into the OPAC or
\r
1480 Staff Client until the Apache Web server has been restarted.</para>
\r
1485 <section xml:id="serversideinstallation-testing">
\r
1486 <title>Testing Your Evergreen Installation</title>
\r
1487 <para>This section describes several simple tests you can perform to verify that the Evergreen
\r
1488 server-side software has been installed and configured properly and is running as
\r
1490 <simplesect xml:id="serversideinstallation-testing-connections">
\r
1491 <title>Testing Connections to Evergreen</title>
\r
1493 <para>Once you have installed and started Evergreen, test your connection to Evergreen. Start the
\r
1494 <command>srfsh</command> application and try logging onto the Evergreen server using the default
\r
1495 administrator username and password. Following is sample output generated by executing
\r
1496 <command>srfsh</command> after a successful Evergreen installation. For help with
\r
1497 <command>srfsh</command> commands, type <userinput>help</userinput> at the prompt.
\r
1498 Execute the following commands to test your Evergreen connection:</para>
\r
1500 <userinput>/openils/bin/srfsh</userinput>
\r
1501 <computeroutput>srfsh%</computeroutput>
\r
1502 <userinput>login admin open-ils</userinput>
\r
1503 <computeroutput>Received Data: "250bf1518c7527a03249858687714376"</computeroutput>
\r
1504 <computeroutput>------------------------------------</computeroutput>
\r
1505 <computeroutput>Request Completed Successfully</computeroutput>
\r
1506 <computeroutput>Request Time in seconds: 0.045286</computeroutput>
\r
1507 <computeroutput>------------------------------------</computeroutput>
\r
1508 <computeroutput>Received Data: {</computeroutput>
\r
1509 <computeroutput> "ilsevent":0,</computeroutput>
\r
1510 <computeroutput> "textcode":"SUCCESS",</computeroutput>
\r
1511 <computeroutput> "desc":" ",</computeroutput>
\r
1512 <computeroutput> "pid":21616,</computeroutput>
\r
1513 <computeroutput> "stacktrace":"oils_auth.c:304",</computeroutput>
\r
1514 <computeroutput> "payload":{</computeroutput>
\r
1515 <computeroutput> "authtoken":"e5f9827cc0f93b503a1cc66bee6bdd1a",</computeroutput>
\r
1516 <computeroutput> "authtime":420</computeroutput>
\r
1517 <computeroutput> }</computeroutput>
\r
1518 <computeroutput>}</computeroutput>
\r
1519 <computeroutput>------------------------------------</computeroutput>
\r
1520 <computeroutput>Request Completed Successfully</computeroutput>
\r
1521 <computeroutput>Request Time in seconds: 1.336568</computeroutput>
\r
1522 <computeroutput>------------------------------------</computeroutput>
\r
1524 <para>If this does not work, try the following:</para>
\r
1527 <para>As the <systemitem class="username">opensrf</systemitem> user, run the
\r
1528 <filename>settings-tester.pl</filename> utility to review your Evergreen
\r
1529 installation for any system configuration problems:</para>
\r
1531 <userinput>cd /home/opensrf</userinput>
\r
1532 <userinput>./Evergreen-ILS-1.6.1.2/Open-ILS/src/support-scripts/settings-tester.pl</userinput>
\r
1534 <para>If the output of <command>settings-tester.pl</command> does not help you
\r
1535 find the problem, please do not make any significant changes to your
\r
1536 configuration.</para>
\r
1539 <para>Follow the steps in the troubleshooting guide in
\r
1540 <xref linkend="troubleshooting"/>.</para>
\r
1543 <para>If you have followed the entire set of installation steps listed here
\r
1544 closely, you are probably extremely close to a working system. Gather your
\r
1545 configuration files and log files and contact the
\r
1546 <ulink url="http://open-ils.org/listserv.php">Evergreen Development Mailing List</ulink>
\r
1547 list for assistance before making any drastic changes to your system
\r
1548 configuration.</para>
\r
1553 <section xml:id="serversideinstallation-postinstallation">
\r
1554 <title>Post-Installation Chores</title>
\r
1555 <para>There are several additional steps you may need to complete after Evergreen has been
\r
1556 successfully installed and tested. Some steps may not be needed (e.g., setting up support for
\r
1559 <title>Remove temporary Apache configuration changes</title>
\r
1560 <para>You modified the Apache configuration file
\r
1561 <filename>/etc/apache2/sites-available/eg.conf</filename> in an earlier step as a
\r
1562 temporary measure to expedite testing (see
\r
1563 <xref linkend="serversideinstallation-modify-apache"/> for further information).
\r
1564 Those changes must now be reversed in order to deny unwanted access to your
\r
1565 CGI scripts from users on other public networks.</para>
\r
1568 <emphasis>This temporary network update was done to expedite
\r
1569 testing. You <emphasis role="bold"> must</emphasis> correct
\r
1570 this for a public production system.</emphasis>
\r
1573 <para>As the <systemitem class="username">root</systemitem> user, edit the configuration
\r
1574 file again and comment out the line <literal>Allow from all</literal> and uncomment the
\r
1575 line <literal>Allow from 10.0.0.0/8</literal>, then change it to match your network
\r
1576 address scheme.</para>
\r
1579 <title>Configure a permanent SSL key</title>
\r
1580 <para>In a previous step (see <xref linkend="serversideinstallation-createcertificate"/>)
\r
1581 you used the command <command>openssl</command> to temporarily
\r
1582 create a new SSL key for the Apache server. This self-signed certificate was adequate
\r
1583 during testing and development, but will continue to generate warnings in the Staff Client
\r
1584 and browser. For a public production server you should configure or purchase a signed SSL
\r
1585 certificate.</para>
\r
1588 <emphasis>The temporary SSL key was only created to expedite
\r
1589 testing. You should install a proper SSL certificate for a public
\r
1590 production system.</emphasis>
\r
1595 <title>Set Up Support For Reports</title>
\r
1596 <para>Evergreen reports are extremely powerful but require some simple configuration.
\r
1597 This section describes starting and stopping the Reporter daemon processes.</para>
\r
1600 <para>Starting the Reporter Daemon</para>
\r
1601 <para>Once the <systemitem class="daemon">open-ils.reporter</systemitem>
\r
1602 process is running and enabled on the gateway, you can start the
\r
1603 Reporter daemon. That process periodically checks for requests for new
\r
1604 or scheduled reports, then starts them as required.</para>
\r
1605 <para>As the <systemitem class="username">opensrf</systemitem> user,
\r
1606 start the Reporter daemon using the following command:</para>
\r
1608 <userinput>cd /home/opensrf/Evergreen-ILS-1.6.1.2/Open-ILS/src/reporter</userinput>
\r
1609 <userinput>./clark-kent.pl --daemon</userinput>
\r
1611 <para>You can control how the <command>clark-kent.pl</command> utility behaves
\r
1612 by specifying any of several command-line options:</para>
\r
1614 <listitem><option>--sleep=interval</option> : number of seconds
\r
1615 to sleep between checks for new reports to run; defaults to
\r
1616 <literal>10</literal></listitem>
\r
1617 <listitem><option>--lockfile=filename</option> : where to place
\r
1618 the lockfile for the process; defaults to
\r
1619 <filename>/tmp/reporter-LOCK</filename></listitem>
\r
1620 <listitem><option>--concurrency=integer</option> : number of
\r
1621 Reporter daemon processes to run; defaults to
\r
1622 <literal>1</literal></listitem>
\r
1623 <listitem><option>--bootstrap=filename</option> : OpenSRF
\r
1624 bootstrap configuration file; defaults to
\r
1625 <filename>/openils/conf/opensrf_core.xml</filename></listitem>
\r
1629 <para>Stopping the Reporter Daemon</para>
\r
1630 <para>To stop the Reporter daemon, you must kill the process and remove
\r
1631 the lockfile. The daemon may have just a single associated process or
\r
1632 there may be several processes if the daemon was started with the optional
\r
1633 <literal>--concurrency</literal> switch. It will also have a lockfile
\r
1634 in the default location.</para>
\r
1635 <para>As the <systemitem class="username">opensrf</systemitem> user,
\r
1636 execute the following shell commands:</para>
\r
1638 <prompt># find and kill the process ID number(s)</prompt>
\r
1639 <userinput>kill `ps wax | grep "Clark Kent" | grep -v grep | cut -b1-6`</userinput>
\r
1640 <prompt># remove the lock file</prompt>
\r
1641 <userinput>rm /tmp/reporter-LOCK</userinput>
\r
1647 <section xml:id="serversideinstallation-virtual">
\r
1648 <title>Installing In Virtualized <systemitem class="osname">Linux</systemitem> Environments</title>
\r
1649 <para>This section describes the installation of Evergreen software in so-called "virtualized"
\r
1650 software environments. Evergreen software runs as a native application on any of several
\r
1651 well-known x86 (32-bit) and x86-64 (64-bit) <systemitem class="osname">Linux</systemitem>
\r
1652 distributions including <systemitem class="osname">Ubuntu</systemitem> and
\r
1653 <systemitem class="osname">Debian</systemitem> but it does not run as a native application
\r
1654 on the <systemitem class="osname">Microsoft Windows</systemitem> operating system.
\r
1655 However, it is possible to execute Evergreen on a <systemitem class="osname">Windows</systemitem>
\r
1656 host system by running it within a virtual Linux-guest installation, which itself executes
\r
1657 on the <systemitem class="osname">Windows</systemitem> system.
\r
1658 The <systemitem class="osname">Linux</systemitem> environment is fully emulated and acts
\r
1659 (within limits) just as if it were executing on a real standalone system.</para>
\r
1660 <para>This technique of emulating a <systemitem class="osname">Linux</systemitem> environment on
\r
1661 a <systemitem class="osname">Windows</systemitem> host is a practical way to install and run an
\r
1662 Evergreen system if it is not possible to dedicate a physical machine solely as a
\r
1663 <systemitem class="osname">Linux</systemitem> host for Evergreen. This architecture is not
\r
1664 recommended for large scale systems since there are performance limitations to running Evergreen
\r
1665 in a virtualized environment. However, it is a reasonable architecture for smaller experimental
\r
1666 systems, as a proof of concept, or as a conference-room pilot.</para>
\r
1668 <title>Installing Virtualization Software</title>
\r
1669 <para>As described above, Evergreen can be installed on top of an emulated
\r
1670 <systemitem class="osname">Linux</systemitem> environment. The
\r
1671 <systemitem class="osname">Linux</systemitem> environment, in turn, is installed
\r
1672 on top of a software application such as <application>"VirtualBox"</application>,
\r
1673 <application>"VMware"</application> or <application>"VirtualPC"</application> which must
\r
1674 first be installed on the <systemitem class="osname">Windows</systemitem> system. This
\r
1675 section contains step-by-step examples that show installing popular virtualization
\r
1676 applications on a <systemitem class="osname">Windows</systemitem> host system. Following
\r
1677 this section are further descriptions of installing
\r
1678 <systemitem class="osname">Linux</systemitem> and Evergreen systems using that
\r
1679 virtualization software.</para>
\r
1681 <title>Installing <application>"VirtualBox"</application> Virtualization Software</title>
\r
1682 <para>This section reviews installation of the
\r
1683 <application>"VirtualBox"</application> application on
\r
1684 <systemitem class="osname">WindowsXP Professional (SP2)</systemitem>.
\r
1685 Download the latest edition of <application>VirtualBox</application> from their official website:
\r
1686 <link xl:href="http://virtualbox.org" xl:title="virtual box">http://virtualbox.org</link>
\r
1687 and follow the on screen instructions to install the software.</para>
\r
1690 <title>Installing VMware Virtualization Software</title>
\r
1692 <primary>virtualization software</primary>
\r
1693 <secondary>VMware</secondary>
\r
1695 <para>This section reviews installation of the
\r
1696 <application>"VMware"</application> application on
\r
1697 <systemitem class="osname">WindowsXP Professional (SP2)</systemitem>.
\r
1698 Find and Download the free virtual machine software of from the VMware
\r
1700 <ulink url="http://downloads.vmware.com">http://downloads.vmware.com</ulink>
\r
1701 and follow the on-screen instructions.</para>
\r
1704 <simplesect xml:id="serversideinstallation-virtual-install-linux-ev">
\r
1705 <title>Installing <systemitem class="osname">Linux</systemitem> /
\r
1706 Evergreen on Virtualization Software</title>
\r
1707 <para>After the virtualization software is installed and running, there are two ways to
\r
1708 continue with installing <systemitem class="osname">Linux</systemitem> and Evergreen
\r
1709 software in the new virtualized environment:</para>
\r
1712 <para>Download and install a prebuilt software image that contains a
\r
1713 working <systemitem class="osname">Linux</systemitem> / Evergreen system
\r
1714 (see <xref linkend="serversideinstall-virtual-prebuilt"/> for
\r
1718 <para>Manually install a <systemitem class="osname">Linux</systemitem>
\r
1719 guest system, then manually install Evergreen on it.</para>
\r
1722 <para>We review each method in the following sections.</para>
\r
1723 <simplesect xml:id="serversideinstall-virtual-prebuilt">
\r
1724 <title>Download and install a prebuilt software image</title>
\r
1725 <para>You can download a prebuilt software image that, when installed with your
\r
1726 virtualization software, emulates a
\r
1727 <systemitem class="osname">Linux</systemitem> guest system containing a running
\r
1728 Evergreen distribution. The image is essentially a snapshot of a hard disk from
\r
1729 a fully configured, functional <systemitem class="osname">Linux</systemitem>
\r
1730 system with Evergreen already installed.</para>
\r
1731 <para>We recommend this approach if you wish to get Evergreen running quickly
\r
1732 with minimal attention to configuration. After reviewing only a few
\r
1733 configuration details you can have a working Evergreen system that integrates
\r
1734 smoothly with the rest of your network. See
\r
1735 <xref linkend="serversideinstall-virtual-versions"/> for a list of prebuilt
\r
1736 software images that are currently available to download and install</para>
\r
1737 <note>DISCLAIMER: The following virtual images have been contributed by members
\r
1738 of the Evergreen community for the purposes of testing, evaluation, training,
\r
1739 and development.</note>
\r
1740 <table xml:id="serversideinstall-virtual-versions">
\r
1741 <title>Linux / Evergreen Virtual Images</title>
\r
1742 <tgroup align="left" cols="4" colsep="1" rowsep="1">
\r
1743 <colspec colnum="1" colwidth="1.0*"/>
\r
1744 <colspec colnum="2" colwidth="1.0*"/>
\r
1745 <colspec colnum="3" colwidth="3.0*"/>
\r
1746 <colspec colnum="4" colwidth="1.0*"/>
\r
1749 <entry>Linux Version</entry>
\r
1750 <entry>Evergreen Version</entry>
\r
1751 <entry>Image</entry>
\r
1752 <entry>Comments</entry>
\r
1757 <entry>Debian lenny (5.0)</entry>
\r
1758 <entry>1.6.0.1</entry>
\r
1760 <ulink url="http://www.open-ils.org/~denials/Evergreen1601_DebianLenny.zip"> download </ulink>
\r
1762 <entry>VirtualBox image</entry>
\r
1765 <entry>Ubuntu karmic koala (9.10)</entry>
\r
1766 <entry>1.6.0.0</entry>
\r
1768 <ulink url="http://www.open-ils.org/~denials/Evergreen-1600-Karmic.zip"> download </ulink>
\r
1770 <entry>VirtualBox image</entry>
\r
1776 <title>VirtualBox Example</title>
\r
1778 <primary>virtualization software</primary>
\r
1779 <secondary>VirtualBox</secondary>
\r
1782 <para>Start VirtualBox for the first time and select
\r
1783 <menuchoice><guimenu>File</guimenu><guimenuitem>VirtualBox Media
\r
1784 Manager</guimenuitem><guimenuitem>Add</guimenuitem></menuchoice>
\r
1785 to locate the prebuilt software image just downloaded (the
\r
1786 example shows it was extracted from the original
\r
1787 <filename class="extension">zip</filename> file into a temporary directory
\r
1788 <filename class="directory">C:\temp</filename>).</para>
\r
1791 <para>After selecting the file, click <guibutton>Open</guibutton> to import it.</para>
\r
1794 <para>Then click <guibutton>OK</guibutton> to save the selection
\r
1795 and return to the VirtualBox Media Manager</para>
\r
1798 <para>Click <guibutton>New</guibutton>, then <guibutton>Next</guibutton> to continue
\r
1799 and create a new virtual machine (VM).</para>
\r
1802 <para>Create a new name for the VM and set the operating system
\r
1803 type, then click <guibutton>Next</guibutton>.</para>
\r
1806 <para>Set the memory size (at least 512Mb),
\r
1807 then click <guibutton>Next</guibutton>.</para>
\r
1810 <para>Edit the Virtual Hard Disk configuration settings; click
\r
1811 the radio boxes <guilabel>Boot Hard Disk</guilabel> and
\r
1812 <guilabel>Use existing hard disk</guilabel>
\r
1813 and ensure that the disk name <guilabel>Evergreen1601_DebianLenny.vmdk</guilabel>
\r
1814 is selected. Click <guibutton>Finish</guibutton> to finish the
\r
1818 <para>Install the <application>VirtualBox Guest
\r
1819 Additions</application> (really a required upgrade to
\r
1820 VirtualBox)</para>
\r
1823 <para>Return to VirtualBox and see the summary of the VM just
\r
1824 created. Click <guibutton>Start</guibutton> to boot the new VM.</para>
\r
1827 <para>See the start of the <systemitem class="osname">Linux</systemitem>
\r
1828 boot sequence. Choose <guimenuitem>Debian Gnu/Linux, kernel
\r
1829 2.6.26-2-686</guimenuitem> from the startup menu and click
\r
1830 <guibutton>Enter</guibutton> to start
\r
1831 <systemitem class="osname">Linux</systemitem> and Evergreen.
\r
1832 After some delay you should see the command line prompt
\r
1833 <prompt>debian-lenny login:</prompt>. Log in with username
\r
1834 <userinput>root</userinput> and password <userinput>evergreen</userinput>
\r
1835 to continue.</para>
\r