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 not continue with any further Evergreen installation steps
\r
106 until you have verified that OpenSRF has been successfully installed.</para>
\r
108 <para>The following steps have been tested on the x86 (32-bit) and x86-64 (64-bit)
\r
109 platforms. OpenSRF 1.4.0 has been tested on <systemitem class="osname">Debian Etch
\r
110 (4.0)</systemitem>, <systemitem class="osname">Debian Lenny (5.0)</systemitem> and
\r
111 <systemitem class="osname">Ubuntu Lucid Lynx (10.04)</systemitem>.</para>
\r
112 <para>In the following instructions, you are asked to perform certain steps as either
\r
113 the <systemitem class="username">root</systemitem> user, the
\r
114 <systemitem class="username">opensrf</systemitem> user, or the
\r
115 <systemitem class="username">postgres</systemitem> user.</para>
\r
118 <para><systemitem class="osname">Debian</systemitem> -- To become the
\r
119 <systemitem class="username">root</systemitem> user, issue the command
\r
120 <command>su -</command> and enter the password of the
\r
121 <systemitem class="username">root</systemitem> user.</para>
\r
124 <para><systemitem class="osname">Ubuntu</systemitem> -- To become the
\r
125 <systemitem class="username">root</systemitem> user, issue the command
\r
126 <command>sudo su -</command> and enter the password of the
\r
127 <systemitem class="username">root</systemitem> user.</para>
\r
130 <para>To switch from the <systemitem class="username">root</systemitem> user to a
\r
131 different user, issue the command <command>su - USERNAME</command>. For example, to
\r
132 switch from the <systemitem class="username">root</systemitem> user to the
\r
133 <systemitem class="username">opensrf</systemitem> user, issue the command
\r
134 <command>su - opensrf</command>. Once you have become a non-root user, to become
\r
135 the <systemitem class="username">root</systemitem> user again, simply issue the command
\r
136 <command>exit</command>.</para>
\r
140 <title>Add the OpenSRF User</title>
\r
141 <para>As the <systemitem class="username">root</systemitem> user, add the
\r
142 opensrf user to the system. The default shell for the new user is automatically
\r
143 set to <command>/bin/bash</command> to inherit a reasonable environment:</para>
\r
145 <userinput>useradd -m -s /bin/bash opensrf</userinput>
\r
146 <userinput>passwd opensrf</userinput>
\r
150 <title>Download and Unpack Latest OpenSRF Version</title>
\r
152 <primary>OpenSRF</primary>
\r
153 <secondary>download</secondary>
\r
155 <para>As the <systemitem class="username">opensrf</systemitem> user, change to
\r
156 the directory <filename class="directory">/home/opensrf</filename> then download
\r
157 and extract the latest version of OpenSRF. The latest version can be found here:
\r
158 <ulink url="http://evergreen-ils.org/downloads/OpenSRF-1.4.0.tar.gz"></ulink></para>
\r
160 <userinput>cd /home/opensrf/OpenSRF-1.4.0</userinput>
\r
161 <userinput>wget http://evergreen-ils.org/downloads/OpenSRF-1.4.0.tar.gz</userinput>
\r
162 <userinput>tar zxf OpenSRF-1.4.0.tar.gz</userinput>
\r
164 <para>The new directory
\r
165 <filename class="directory">/home/opensrf/OpenSRF-1.4.0</filename> will be created.</para>
\r
168 <title>Install Prerequisites to Build OpenSRF</title>
\r
169 <para>In this section you will install and configure a set of prerequisites that will be
\r
170 used to build OpenSRF. In a following step you will actually build the OpenSRF software
\r
171 using the <command>make</command> utility.</para>
\r
172 <para>As the <systemitem class="username">root</systemitem> user, enter the commands show
\r
173 below to build the prerequisites from the software distribution that you just downloaded
\r
174 and unpacked. Remember to replace <emphasis>[DISTRIBUTION]</emphasis> in the following
\r
175 example with the keyword corresponding to the name of one of the
\r
176 <systemitem class="osname">Linux</systemitem> distributions listed in the following
\r
177 distribution keywords table <xref linkend="serversideinstallation-keywords-opensrf"/> .
\r
178 For example, to install the prerequisites for Ubuntu version 10.04 (Lucid Lynx) you would
\r
179 enter this command: <command>make -f src/extras/Makefile.install ubuntu-lucid</command> .</para>
\r
181 <userinput>cd /home/opensrf/OpenSRF-1.4.0</userinput>
\r
182 <userinput>make -f src/extras/Makefile.install [DISTRIBUTION]</userinput>
\r
184 <table xml:id="serversideinstallation-keywords-opensrf">
\r
185 <title>Keyword Targets for OpenSRF <application>"make"</application> Command</title>
\r
186 <tgroup align="left" cols="2" colsep="1" rowsep="1">
\r
187 <colspec colnum="1" colwidth="1.0*"/>
\r
188 <colspec colnum="2" colwidth="3.0*"/>
\r
191 <entry>Keyword</entry>
\r
192 <entry>Description</entry>
\r
197 <entry>debian-etch</entry>
\r
198 <entry>for Debian "Etch" (4.0)</entry>
\r
201 <entry>debian-lenny</entry>
\r
202 <entry>for Debian "Lenny" (5.0)</entry>
\r
205 <entry>ubuntu-hardy</entry>
\r
206 <entry>for Ubuntu "Hardy Heron" (8.04)</entry>
\r
209 <entry>ubuntu-karmic</entry>
\r
210 <entry>for Ubuntu "Karmic Koala" (9.10)</entry>
\r
213 <entry>ubuntu-lucid</entry>
\r
214 <entry>for Ubuntu "Lucid Lynx" (10.04)</entry>
\r
217 <entry>fedora13</entry>
\r
218 <entry>for Fedora "Goddard" (13)</entry>
\r
221 <entry>centos</entry>
\r
222 <entry>for Centos</entry>
\r
225 <entry>rhel</entry>
\r
226 <entry>for RHEL</entry>
\r
229 <entry>gentoo</entry>
\r
230 <entry>for Gentoo</entry>
\r
235 <para>This will install a number of packages on the system that are required by OpenSRF,
\r
236 including some Perl modules from CPAN. You can say <literal>No</literal> to the initial
\r
237 CPAN configuration prompt to allow it to automatically configure itself to download and
\r
238 install Perl modules from CPAN. The CPAN installer will ask you a number of times whether
\r
239 it should install prerequisite modules - say <literal>Yes</literal>.</para>
\r
242 <title>Build OpenSRF</title>
\r
243 <para>In this section you will configure and build the OpenSRF
\r
244 components that support other Evergreen services.</para>
\r
247 <title>Configure OpenSRF</title>
\r
249 <primary>OpenSRF</primary>
\r
250 <secondary>configure</secondary>
\r
252 <para>As the <systemitem class="username">opensrf</systemitem>
\r
253 user, return to the OpenSRF build directory and use the
\r
254 <command>configure</command> utility to prepare for the next
\r
255 step of compiling and linking the software. If you wish to
\r
256 include support for Python and Java, add the configuration
\r
257 options <option>--enable-python</option> and
\r
258 <option>--enable-java</option>, respectively:</para>
\r
260 <userinput>cd /home/opensrf/OpenSRF-1.4.0</userinput>
\r
261 <userinput>./configure --prefix=/openils --sysconfdir=/openils/conf</userinput>
\r
262 <userinput>make</userinput>
\r
266 <title>Compile, Link and Install OpenSRF</title>
\r
267 <para>As the <systemitem class="username">root</systemitem>
\r
268 user, return to the OpenSRF build directory and use the
\r
269 <command>make</command> utility to compile, link and install
\r
272 <userinput>cd /home/opensrf/OpenSRF-1.4.0</userinput>
\r
273 <userinput>make install</userinput>
\r
277 <title>Update the System Dynamic Library Path</title>
\r
278 <para>You must update the system dynamic library path to force
\r
279 your system to recognize the newly installed libraries. As the
\r
280 <systemitem class="username">root</systemitem> user, do this by
\r
281 creating the new file
\r
282 <filename>/etc/ld.so.conf.d/osrf.conf</filename> containing a
\r
283 new library path, then run the command
\r
284 <command>ldconfig</command> to automatically read the file and
\r
285 modify the system dynamic library path:</para>
\r
287 <userinput>echo "/openils/lib" > /etc/ld.so.conf.d/osrf.conf</userinput>
\r
288 <userinput>ldconfig</userinput>
\r
292 <title>Define Public and Private OpenSRF Domains</title>
\r
293 <para>For security purposes, OpenSRF uses Jabber domains to separate services
\r
294 into public and private realms. On a single-server system the easiest way to
\r
295 define public and private OpenSRF domains is to define separate host names by
\r
296 adding entries to the file <filename>/etc/hosts</filename>.</para>
\r
297 <para>In the following steps we will use the example domains
\r
298 <systemitem class="domainname">public.localhost</systemitem> for the public
\r
299 domain and <systemitem class="domainname">private.localhost</systemitem>
\r
300 for the private domain. In an upcoming step, you will configure two special
\r
301 <systemitem class="service">ejabberd</systemitem> users
\r
302 to handle communications for these two domains.</para>
\r
303 <para>As the <systemitem class="username">root</systemitem> user, edit the file
\r
304 <filename>/etc/hosts</filename> and add the following example domains:</para>
\r
306 <primary>Jabber</primary>
\r
309 <userinput>127.0.1.2 public.localhost public</userinput>
\r
310 <userinput>127.0.1.3 private.localhost private</userinput>
\r
314 <title>Change File Ownerships</title>
\r
315 <para>Finally, as the <systemitem class="username">root</systemitem>
\r
316 user, change the ownership of all files installed in the
\r
317 directory <filename class="directory">/openils</filename> to the
\r
318 user <systemitem class="username">opensrf</systemitem>:</para>
\r
320 <userinput>chown -R opensrf:opensrf /openils</userinput>
\r
326 <title>Stop the <systemitem class="service">ejabberd</systemitem> Service</title>
\r
328 <primary>ejabberd</primary>
\r
330 <para>Before continuing with configuration of <systemitem class="service">ejabberd</systemitem>
\r
331 you must stop that service. As the <systemitem class="username">root</systemitem> user,
\r
332 execute the following command to stop the service:</para>
\r
334 <userinput>/etc/init.d/ejabberd stop</userinput>
\r
336 <para>If <systemitem class="service">ejabberd</systemitem> reports that it
\r
337 is already stopped, there may have been a problem when it started back
\r
338 in the installation step. If there are any remaining daemon processes such as
\r
339 <systemitem class="daemon">beam</systemitem> or
\r
340 <systemitem class="daemon">epmd</systemitem>
\r
341 you may need to perform the following commands to kill them:</para>
\r
343 <userinput>epmd -kill</userinput>
\r
344 <userinput>killall beam; killall beam.smp</userinput>
\r
345 <userinput>rm /var/lib/ejabberd/*</userinput>
\r
346 <userinput>echo 'ERLANG_NODE=ejabberd@localhost' >> /etc/default/ejabberd</userinput>
\r
350 <title>Edit the <systemitem class="service">ejabberd</systemitem> configuration</title>
\r
351 <para>You must make several configuration changes for the
\r
352 <systemitem class="service">ejabberd</systemitem> service before
\r
353 it is started again.
\r
354 As the <systemitem class="username">root</systemitem> user, edit the file
\r
355 <filename>/etc/ejabberd/ejabberd.cfg</filename> and make the following changes:</para>
\r
358 <para>Change the line:
\r
359 <screen><userinput>{hosts, ["localhost"]}.</userinput></screen>
\r
361 <screen><userinput>{hosts, ["localhost", "private.localhost", "public.localhost"]}.</userinput></screen></para>
\r
364 <para>Change the line:
\r
365 <screen><userinput>{max_user_sessions, 10}.</userinput></screen> to:
\r
366 <screen><userinput>{max_user_sessions, 10000}.</userinput></screen></para>
\r
367 <para>If the line looks something like this:
\r
368 <screen><userinput>{access, max_user_sessions, [{10, all}]}.</userinput></screen>
\r
370 <screen><userinput>{access, max_user_sessions, [{10000, all}]}</userinput></screen></para>
\r
373 <para>Change all three occurrences of: <literal>max_stanza_size</literal>
\r
374 to: <literal>2000000</literal>.</para>
\r
377 <para>Change both occurrences of: <literal>maxrate</literal> to:
\r
378 <literal>500000</literal>.</para>
\r
381 <para>Comment out the line <literal>{mod_offline, []}</literal>
\r
382 by placing two <literal>%</literal> comment signs in front.</para>
\r
386 <step xml:id="serversideinstallation-opensrf-continued">
\r
387 <title>Restart the <systemitem class="service">ejabberd</systemitem> service</title>
\r
388 <para>As the <systemitem class="username">root</systemitem> user, restart the
\r
389 <systemitem class="service">ejabberd</systemitem> service to test the
\r
390 configuration changes and to register your users:</para>
\r
392 <userinput>/etc/init.d/ejabberd start</userinput>
\r
396 <title>Register <systemitem class="username">router</systemitem> and
\r
397 <systemitem class="username">ejabberd</systemitem> users</title>
\r
398 <para>The two <systemitem class="service">ejabberd</systemitem> users
\r
399 <systemitem class="username">router</systemitem> and
\r
400 <systemitem class="username">opensrf</systemitem> must be registered
\r
401 and configured to manage OpenSRF router service and communications
\r
402 for the two domains <literal>public.localhost</literal> and
\r
403 <literal>private.localhost</literal>
\r
404 that you added to the file <filename>/etc/hosts</filename>
\r
405 in a previous step:</para>
\r
408 <para>the <systemitem class="username">router</systemitem> user,
\r
409 to whom all requests to connect to an OpenSRF service will be
\r
413 <para>the <systemitem class="username">opensrf</systemitem> user,
\r
414 which clients use to connect to OpenSRF services (you may name
\r
415 the user anything you like, but we use
\r
416 <literal>opensrf</literal> in these examples)</para>
\r
419 <para>As the <systemitem class="username">root</systemitem> user, execute the
\r
420 <command>ejabberdctl</command> utility as shown below to register and create passwords
\r
421 for the two users on each domain. Note that the users correspond to those configured
\r
422 in the file <filename>/openils/conf/opensrf_core.xml</filename> in the next steps.</para>
\r
423 <programlisting language="xml"><![CDATA[
\r
424 # The syntax for registering a user with ejabberdctl is:
\r
425 # ejabberdctl register <user> <domain> <password>
\r
427 ejabberdctl register router private.localhost <password #1>
\r
428 ejabberdctl register router public.localhost <password #1>
\r
429 ejabberdctl register opensrf private.localhost <password #2>
\r
430 ejabberdctl register opensrf public.localhost <password #2>
\r
431 ]]></programlisting>
\r
434 <title>Create configuration files</title>
\r
435 <para>As the <systemitem class="username">opensrf</systemitem> user, execute
\r
436 the following commands to create the new configuration files
\r
437 <filename>/openils/conf/opensrf_core.xml</filename> and
\r
438 <filename>/openils/conf/opensrf.xml</filename> from the example templates:</para>
\r
440 <userinput>cd /openils/conf</userinput>
\r
441 <userinput>cp opensrf.xml.example opensrf.xml</userinput>
\r
442 <userinput>cp opensrf_core.xml.example opensrf_core.xml</userinput>
\r
446 <title>Change Jabber usernames and passwords</title>
\r
447 <para>As the <systemitem class="username">opensrf</systemitem> user, edit the
\r
448 OpenSRF configuration file <filename>/openils/conf/opensrf_core.xml</filename>
\r
449 and update the Jabber usernames and passwords to match the values shown in the
\r
450 following table. The left-hand side of <xref linkend="serversideinstallation-xpath-table-1"/>
\r
451 shows common XPath syntax to indicate the approximate position within the XML
\r
452 file that needs changes. The right-hand side of the table shows the replacement
\r
454 <table xml:id="serversideinstallation-xpath-table-1">
\r
455 <title>Sample XPath syntax for editing "opensrf_core.xml"</title>
\r
456 <tgroup align="left" cols="2" colsep="1" rowsep="1">
\r
457 <colspec colname="Xpath" colnum="1" colwidth="1.5*"/>
\r
458 <colspec colname="Value" colnum="2" colwidth="2.0*"/>
\r
461 <entry>XPath location</entry>
\r
462 <entry>Value</entry>
\r
467 <entry>/config/opensrf/username</entry>
\r
469 <systemitem class="username">opensrf</systemitem>
\r
473 <entry>/config/opensrf/passwd </entry>
\r
474 <entry>password for
\r
475 <systemitem class="domainname">private.localhost</systemitem><systemitem class="username">opensrf</systemitem> user
\r
479 <entry>/config/gateway/username</entry>
\r
481 <systemitem class="username">opensrf</systemitem>
\r
485 <entry>/config/gateway/passwd</entry>
\r
486 <entry>password for
\r
487 <systemitem class="domainname">public.localhost</systemitem><systemitem class="username">opensrf</systemitem> user
\r
491 <entry>/config/routers/router/transport,
\r
492 first entry where transport/server == public.localhost:
\r
495 <systemitem class="username">router</systemitem>
\r
499 <entry>/config/routers/router/transport,
\r
500 first entry where transport/server == public.localhost:
\r
502 <entry>password for
\r
503 <systemitem class="domainname">public.localhost</systemitem><systemitem class="username">router</systemitem> user
\r
507 <entry>/config/routers/router/transport,
\r
508 second entry where transport/server == private.localhost:
\r
511 <systemitem class="username">router</systemitem>
\r
515 <entry>/config/routers/router/transport,
\r
516 second entry where transport/server == private.localhost:
\r
518 <entry>password for
\r
519 <systemitem class="domainname">private.localhost</systemitem><systemitem class="username">router</systemitem> user
\r
525 <para>You may also need to modify the file to specify the domains from which
\r
526 <systemitem class="service">OpenSRF</systemitem> will accept connections,
\r
527 and to which it will make connections.
\r
528 If you are installing <application>OpenSRF</application> on a single server
\r
529 and using the <systemitem class="domainname">private.localhost</systemitem> and
\r
530 <systemitem class="domainname">public.localhost</systemitem> domains,
\r
531 these will already be set to the correct values. Otherwise, search and replace
\r
532 to match values for your own systems.</para>
\r
535 <title>Set location of persistent database</title>
\r
536 <para>As the <systemitem class="username">opensrf</systemitem> user, edit the
\r
537 file <filename>/openils/conf/opensrf.xml</filename>, then find and modify the
\r
538 element <literal>dbfile</literal> (near the end of the file) to set the
\r
539 location of the persistent database:</para>
\r
540 <programlisting language="xml"><![CDATA[
\r
541 <!-- Example of an app-specific setting override -->
\r
544 <dbfile>/tmp/persist.db</dbfile>
\r
547 ]]></programlisting>
\r
550 <title>Create Configuration Files for Users Needing <command>srfsh</command></title>
\r
551 <para>In this section you will set up a special configuration file for each user
\r
552 who will need to run the <command>srfsh</command> (pronounced <emphasis>surf
\r
553 shell</emphasis>) utility.</para>
\r
555 <primary>srfsh</primary>
\r
557 <para>The software installation will automatically create
\r
558 <command>srfsh</command>. This is a command line diagnostic tool for testing and
\r
559 interacting with <application>OpenSRF</application>. It will be used in a future
\r
560 step to complete and test the Evergreen installation. See
\r
561 <xref linkend="serversideinstallation-testing"/> for further information.</para>
\r
562 <para>As the <systemitem class="username">root</systemitem> user, copy the short
\r
563 sample configuration file <filename>/openils/conf/srfsh.xml.example</filename>
\r
564 to the file <filename>.srfsh.xml</filename> (note the leading dot!) in the home
\r
565 directory of each user who will use <command>srfsh</command>. Finally, edit each
\r
566 file <filename>.srfsh.xml</filename> and make the following changes. When you
\r
567 finish, remember to change the owner of the file to match the owner of the home
\r
570 <listitem>Modify <literal>domain</literal> to be the router hostname
\r
571 (following our domain examples,
\r
572 <systemitem class="domainname">private.localhost</systemitem> will give
\r
573 <command>srfsh</command> access to all OpenSRF services, while
\r
574 <systemitem class="domainname">public.localhost</systemitem> will only
\r
575 allow access to those OpenSRF services that are publicly
\r
576 exposed).</listitem>
\r
577 <listitem>Modify <literal>username</literal> and
\r
578 <literal>password</literal> to match the <literal>opensrf</literal>
\r
579 Jabber user for the chosen domain</listitem>
\r
580 <listitem>Modify <literal>logfile</literal> to be the full path for a
\r
581 log file to which the user has write access</listitem>
\r
582 <listitem>Modify <literal>loglevel</literal> as needed for testing</listitem>
\r
584 <programlisting language="xml"><![CDATA[
\r
585 <?xml version="1.0"?>
\r
586 <!-- This file follows the standard bootstrap config file layout -->
\r
587 <!-- found in opensrf_core.xml -->
\r
589 <router_name>router</router_name>
\r
590 <domain>private.localhost</domain>
\r
591 <username>opensrf</username>
\r
592 <passwd>privsrf</passwd>
\r
594 <logfile>/tmp/srfsh.log</logfile>
\r
595 <!-- 0 None, 1 Error, 2 Warning, 3 Info, 4 debug, 5 Internal (Nasty) -->
\r
596 <loglevel>4</loglevel>
\r
598 ]]></programlisting>
\r
601 <title>Modify Environmental Variable PATH for
\r
602 <systemitem class="username">opensrf</systemitem> User</title>
\r
603 <para>As the <systemitem class="username">opensrf</systemitem> user, modify the
\r
604 environmental variable <envar>PATH</envar> by adding a new file path to the
\r
605 <systemitem class="username">opensrf</systemitem> user's shell configuration
\r
606 file <filename>.bashrc</filename>:</para>
\r
608 <userinput>echo "export PATH=/openils/bin:\$PATH" >> ~/.bashrc</userinput>
\r
612 <title>Start OpenSRF</title>
\r
613 <para>As the <systemitem class="username">root</systemitem> user, start the
\r
614 <systemitem class="service">ejabberd</systemitem> and
\r
615 <systemitem class="service">memcached</systemitem> services:</para>
\r
617 <userinput>/etc/init.d/ejabberd start</userinput>
\r
618 <userinput>/etc/init.d/memcached start</userinput>
\r
620 <para>Finally, as the <systemitem class="username">opensrf</systemitem> user,
\r
621 start OpenSRF. Use "-l" to force hostname to be "localhost":</para>
\r
623 <userinput>osrf_ctl.sh -l -a start_all</userinput>
\r
626 <para>If you receive the error message <errortext>bash: osrf_ctl.sh:
\r
627 command not found</errortext>, then your environment variable
\r
628 <envar>PATH</envar> does not include the
\r
629 <filename class="directory">/openils/bin</filename> directory;
\r
630 this should have been set by <filename>.bashrc</filename> when you
\r
631 logged in as the <systemitem class="username">opensrf</systemitem> user,
\r
632 but you can manually set it using the following command:</para>
\r
634 <userinput>export PATH=$PATH:/openils/bin</userinput>
\r
637 <para>You can also start Evergreen <emphasis role="bold">without</emphasis> the
\r
638 <option>-l</option> flag, but <command>osrf_ctl.sh</command> must know the fully
\r
639 qualified domain name for the system on which it will execute. That hostname may
\r
640 have been specified in the configuration file <filename>opensrf.xml</filename>,
\r
641 which you configured in a previous step.</para>
\r
644 <title>Test connections to OpenSRF</title>
\r
645 <para>Once you have installed and started OpenSRF, as the
\r
646 <systemitem class="username">root</systemitem> user, test your connection to
\r
647 <systemitem class="service">OpenSRF</systemitem> using the <command>srfsh</command>
\r
648 utility and trying to call the <command>add</command> method on the OpenSRF
\r
649 <systemitem class="service">math</systemitem> service:</para>
\r
651 <userinput>/openils/bin/srfsh</userinput>
\r
654 request opensrf.math add 2 2
\r
656 ------------------------------------
\r
657 Request Completed Successfully
\r
658 Request Time in seconds: 0.007519
\r
659 ------------------------------------
\r
664 <para>For other <command>srfsh</command> commands, type in
\r
665 <userinput>help</userinput> at the prompt.</para>
\r
668 <title>Stopping OpenSRF</title>
\r
669 <para>As the <systemitem class="username">opensrf</systemitem> user, stop OpenSRF:</para>
\r
671 <userinput>osrf_ctl.sh -l -a stop_all</userinput>
\r
676 <section xml:id="serversideinstallation-ubuntudebian">
\r
677 <title>Installing Evergreen 1.6.1.x On <systemitem class="osname">Ubuntu</systemitem> or
\r
678 <systemitem class="osname">Debian</systemitem></title>
\r
680 <primary>Linux</primary>
\r
681 <secondary>Debian</secondary>
\r
684 <primary>Linux</primary>
\r
685 <secondary>Ubuntu</secondary>
\r
687 <para>This section outlines the installation process for the latest stable version of
\r
689 <para>In this section you will download, unpack, install, configure and test the Evergreen
\r
690 system, including the Evergreen server and the PostgreSQL database system. You will make several
\r
691 configuration changes and adjustments to the software, including updates to configure the system
\r
692 for your own locale, and some updates needed to work around a few known issues.</para>
\r
694 <para>The following steps have been tested on the x86 (32-bit) and x86-64 (64-bit)
\r
695 architectures. There may be differences between the Desktop and Server editions of
\r
696 <systemitem class="osname">Ubuntu</systemitem>. These instructions assume the Server
\r
698 <para>In the following instructions, you are asked to perform certain steps as
\r
699 either the <systemitem class="username">root</systemitem> user, the
\r
700 <systemitem class="username">opensrf</systemitem> user, or the
\r
701 <systemitem class="username">postgres</systemitem> user.</para>
\r
704 <para><systemitem class="osname">Debian</systemitem> -- To become the
\r
705 <systemitem class="username">root</systemitem> user, issue the command
\r
706 <command>su -</command> and enter the password of the
\r
707 <systemitem class="username">root</systemitem> user.</para>
\r
710 <para><systemitem class="osname">Ubuntu</systemitem> -- To become the
\r
711 <systemitem class="username">root</systemitem> user, issue the command
\r
712 <command>sudo su -</command> and enter the password of the
\r
713 <systemitem class="username">root</systemitem> user.</para>
\r
716 <para>To switch from the <systemitem class="username">root</systemitem> user to a
\r
717 different user, issue the command <command>su - USERNAME</command>. For example, to
\r
718 switch from the <systemitem class="username">root</systemitem> user to the
\r
719 <systemitem class="username">opensrf</systemitem> user, issue the command
\r
720 <command>su - opensrf</command>. Once you have become a non-root user, to become the
\r
721 <systemitem class="username">root</systemitem> user again, simply issue the command
\r
722 <command>exit</command>.</para>
\r
726 <title>Install OpenSRF</title>
\r
727 <para>Evergreen software is integrated with and depends on the Open Service
\r
728 Request Framework (OpenSRF) software system. For further information on
\r
729 installing, configuring and testing OpenSRF, see
\r
730 <xref linkend="serversideinstallation-opensrf"/>.</para>
\r
731 <para>Follow the steps outlined in that section and run the specified tests to
\r
732 ensure that OpenSRF is properly installed and configured. Do not continue with
\r
733 any further Evergreen installation steps until you have verified that OpenSRF
\r
734 has been successfully installed.</para>
\r
737 <title>Download and Unpack Latest Evergreen Version</title>
\r
738 <para>As the <systemitem class="username">opensrf</systemitem> user, download
\r
739 and extract the latest version of Evergreen. The latest version can be found here:
\r
740 <ulink url="http://evergreen-ils.org/downloads/Evergreen-ILS-1.6.1.2.tar.gz"></ulink></para>
\r
742 <userinput>wget http://evergreen-ils.org/downloads/Evergreen-ILS-1.6.1.2.tar.gz</userinput>
\r
743 <userinput>tar zxf Evergreen-ILS-1.6.1.2.tar.gz</userinput>
\r
745 <para>The new directory
\r
746 <filename class="directory">/home/opensrf/Evergreen-ILS-1.6.1.2</filename>
\r
747 will be created.</para>
\r
750 <title>Install Prerequisites to Build Evergreen</title>
\r
751 <para>In this section you will install and configure a set of prerequisites that
\r
752 will be used to build Evergreen. In a following step you will actually build the
\r
753 Evergreen software using the <command>make</command> utility.</para>
\r
754 <para>As the <systemitem class="username">root</systemitem> user, enter the
\r
755 commands show below to build the prerequisites from the software distribution
\r
756 that you just downloaded and unpacked. Remember to replace
\r
757 <emphasis>[DISTRIBUTION]</emphasis> in the following example with the keyword
\r
758 corresponding to the name of one of the <systemitem class="osname">Linux</systemitem>
\r
759 distributions listed in the following distribution keywords table
\r
760 <xref linkend="serversideinstallation-keywords-evergreen"/> .
\r
761 For example, to install the prerequisites for Ubuntu version 9.10 (Karmic Koala) you would
\r
762 enter this command: <command>make -f Open-ILS/src/extras/Makefile.install ubuntu-karmic</command> .</para>
\r
764 <userinput>cd /home/opensrf/Evergreen-ILS-1.6.1.2</userinput>
\r
765 <userinput>make -f Open-ILS/src/extras/Makefile.install [DISTRIBUTION]</userinput>
\r
767 <table xml:id="serversideinstallation-keywords-evergreen">
\r
768 <title>Keyword Targets for Evergreen <application>"make"</application> Command</title>
\r
769 <tgroup align="left" cols="2" colsep="1" rowsep="1">
\r
770 <colspec colnum="1" colwidth="1.0*"/>
\r
771 <colspec colnum="2" colwidth="3.0*"/>
\r
774 <entry>Keyword</entry>
\r
775 <entry>Description</entry>
\r
780 <entry>debian-etch</entry>
\r
781 <entry>for Debian "Etch" (4.0)</entry>
\r
784 <entry>debian-lenny</entry>
\r
785 <entry>for Debian "Lenny" (5.0)</entry>
\r
788 <entry>ubuntu-hardy</entry>
\r
789 <entry>for Ubuntu "Hardy Heron" (8.04)</entry>
\r
792 <entry>ubuntu-intrepid</entry>
\r
793 <entry>for Ubuntu "Intrepid Ibex" (8.10)</entry>
\r
796 <entry>ubuntu-karmic</entry>
\r
797 <entry>for Ubuntu "Karmic Koala" (9.10)</entry>
\r
800 <entry>ubuntu-karmic</entry>
\r
801 <entry>for Ubuntu "Lucid Lynx" (10.04)</entry>
\r
804 <entry>centos</entry>
\r
805 <entry>for Centos</entry>
\r
808 <entry>rhel</entry>
\r
809 <entry>for RHEL</entry>
\r
812 <entry>gentoo</entry>
\r
813 <entry>for Gentoo</entry>
\r
819 <step performance="optional" xml:id="serversideinstallation-postgresql-default">
\r
820 <title>(OPTIONAL) Install the PostgreSQL Server</title>
\r
822 <primary>databases</primary>
\r
823 <secondary>PostgreSQL</secondary>
\r
825 <para>Since the PostgreSQL server is usually a standalone server in multi-server
\r
826 production systems, the prerequisite installer Makefile in the previous step
\r
827 does not automatically install PostgreSQL. You must install the PostgreSQL server
\r
828 yourself, either on the same system as Evergreen itself or on another system.
\r
829 If your PostgreSQL server is on a different system, just skip this step.</para>
\r
830 <para>For further information on manually installing PostgreSQL, visit the official
\r
831 <link xl:href="http://www.postgresql.org/">PostgreSQL Site</link>.</para>
\r
832 <para>If your PostgreSQL server will be on the same system as your Evergreen
\r
833 software, then as the <systemitem class="username">root</systemitem> user
\r
834 install the required PostgreSQL server packages:</para>
\r
835 <para>For <systemitem class="osname">Debian Lenny</systemitem> and
\r
836 <systemitem class="osname">Ubuntu Hardy (8.04)</systemitem>:</para>
\r
838 <userinput>make -f Open-ILS/src/extras/Makefile.install install_pgsql_server_debs_83</userinput>
\r
840 <para>For <systemitem class="osname">Ubuntu Karmic (9.10)</systemitem> and
\r
841 <systemitem class="osname">Ubuntu Lucid (10.04)</systemitem>:</para>
\r
843 <userinput>make -f Open-ILS/src/extras/Makefile.install install_pgsql_server_debs_84</userinput>
\r
846 <para>PostgreSQL versions 8.3 or 8.4 are the recommended versions to work
\r
847 with Evergreen 1.6. If you have an older version of PostgreSQL, you should
\r
848 upgrade before installing Evergreen. To find the running version of
\r
849 PostgreSQL, as the <systemitem class="username">postgres</systemitem>
\r
850 user, run the <command>psql</command>. Then type <userinput>SELECT
\r
851 version();</userinput> to get detailed information about your version
\r
852 of PostgreSQL.</para>
\r
855 <step performance="optional">
\r
856 <title>Install Perl Modules on PostgreSQL Server</title>
\r
857 <para>If PostgreSQL is running on the same system as your Evergreen software,
\r
858 then the Perl modules will automatically be available. Just skip this step.
\r
859 Otherwise, continue if your PostgreSQL server is running on another system.</para>
\r
860 <para>You will need to install several Perl modules on the other system. As the
\r
861 <systemitem class="username">root</systemitem> user install the following Perl
\r
864 <userinput># first, ensure the gcc compiler is installed:</userinput>
\r
865 <userinput>apt-get install gcc</userinput>
\r
866 <userinput># then install the Perl modules:</userinput>
\r
867 <userinput>perl -MCPAN -e shell</userinput>
\r
868 <prompt>cpan></prompt>
\r
869 <userinput>install JSON::XS</userinput>
\r
870 <prompt>cpan></prompt>
\r
871 <userinput>install MARC::Record</userinput>
\r
872 <prompt>cpan></prompt>
\r
873 <userinput>install MARC::File::XML</userinput>
\r
875 <para>For more information on installing Perl Modules vist the official
\r
876 <link xl:href="http://www.cpan.org/">CPAN</link> site.</para>
\r
878 <primary>Perl</primary>
\r
879 <secondary>CPAN</secondary>
\r
883 <title>Update the System Dynamic Library Path</title>
\r
884 <para>You must update the system dynamic library path to force your system to
\r
885 recognize the newly installed libraries. As the <systemitem class="username">root</systemitem>
\r
886 user, create a file named <filename>/etc/ld.so.conf.d/eg.conf</filename>
\r
887 containing these new library paths:</para>
\r
892 <para>Then run the command <command>ldconfig</command> to automatically read the
\r
893 file and modify the system dynamic library path:</para>
\r
895 <userinput>ldconfig</userinput>
\r
898 <step performance="optional">
\r
899 <title>Restart the PostgreSQL Server</title>
\r
900 <para>If PostgreSQL is running on the same system as the rest of Evergreen, as
\r
901 the <systemitem class="username">root</systemitem> user you must restart
\r
902 PostgreSQL to re-read the new library paths just configured. If PostgreSQL is
\r
903 running on another system, you may skip this step. As the <systemitem class="username">opensrf</systemitem>
\r
904 user, execute the following command, where
\r
905 <literal>[PGSQL_VERSION]</literal> is your installed PostgreSQL version
\r
906 (e.g. <literal>8.3</literal>):</para>
\r
908 <userinput>/etc/init.d/postgresql-[PGSQL_VERSION] restart</userinput>
\r
911 <step xml:id="serversideinstallation-configure">
\r
912 <title>Configure Evergreen</title>
\r
913 <para>As the <systemitem class="username">opensrf</systemitem> user, return to
\r
914 the Evergreen build directory and use the <command>configure</command> and
\r
915 <command>make</command> utilities to configure Evergreen so it can be compiled
\r
916 and linked in the next step:</para>
\r
918 <userinput>cd /home/opensrf/Evergreen-ILS-1.6.1.2</userinput>
\r
919 <userinput>./configure --prefix=/openils --sysconfdir=/openils/conf</userinput>
\r
920 <userinput>make</userinput>
\r
924 <title>Compile, Link and Install Evergreen</title>
\r
925 <para>In this step you will actually compile, link and install Evergreen and the
\r
926 default Evergreen Staff Client.</para>
\r
927 <para>As the <systemitem class="username">root</systemitem> user, return to the
\r
928 Evergreen build directory and use the <command>make</command> utility as shown below:</para>
\r
930 <userinput>cd /home/opensrf/Evergreen-ILS-1.6.1.2</userinput>
\r
931 <userinput>make STAFF_CLIENT_BUILD_ID=rel_1_6_1_2 install</userinput>
\r
933 <para>The Staff Client will also be automatically built, but you must remember
\r
934 to set the variable <envar>STAFF_CLIENT_BUILD_ID</envar> to match the version of the Staff
\r
935 Client you will use to connect to the Evergreen server. For further information on manually
\r
936 building the Staff Client, see
\r
937 <xref linkend="staffclientinstallation-building-staffclient"/>.</para>
\r
938 <para>The above commands will create a new subdirectory
\r
939 <filename class="directory">/openils/var/web/xul/rel_1_6_1_2</filename>
\r
940 containing the Staff Client.</para>
\r
941 <para>To complete the Staff Client installation,
\r
942 as the <systemitem class="username">root</systemitem> user create a symbolic link
\r
943 named <emphasis>server</emphasis> in the head of the Staff Client directory
\r
944 <filename class="directory">/openils/var/web/xul</filename> that points to the
\r
945 subdirectory <filename class="directory">/server</filename> of the new Staff
\r
946 Client build:</para>
\r
948 <userinput>cd /openils/var/web/xul</userinput>
\r
949 <userinput>ln -sf rel_1_6_1_2/server server</userinput>
\r
953 <title>Copy the OpenSRF Configuration Files</title>
\r
954 <para>As the <systemitem class="username">root</systemitem> user, execute the
\r
955 following commands to copy the example OpenSRF configuration files into place
\r
956 after first creating backup copies of the old files for troubleshooting purposes.
\r
957 These files replace the configuration files that you set up in a previous step
\r
958 when you installed and tested OpenSRF. Finally, change the ownership on
\r
959 the installed files to the <systemitem class="username">opensrf</systemitem> user:</para>
\r
961 <userinput>cd /openils/conf</userinput>
\r
962 <userinput>cp opensrf.xml opensrf.xml.BAK</userinput>
\r
963 <userinput>cp opensrf_core.xml opensrf_core.xml.BAK</userinput>
\r
964 <userinput>cp opensrf.xml.example opensrf.xml</userinput>
\r
965 <userinput>cp opensrf_core.xml.example opensrf_core.xml</userinput>
\r
966 <userinput>cp oils_web.xml.example oils_web.xml</userinput>
\r
967 <userinput>chown -R opensrf:opensrf /openils/</userinput>
\r
971 <title>Create and Configure PostgreSQL Database</title>
\r
973 <primary>databases</primary>
\r
974 <secondary>PostgreSQL</secondary>
\r
976 <para>In this step you will create the Evergreen database. In the commands
\r
977 below, remember to adjust the path of the <emphasis role="bold">contrib</emphasis>
\r
978 repository to match your PostgreSQL server
\r
979 layout. For example, if you built PostgreSQL from source the path would be
\r
980 <filename class="directory">/usr/local/share/contrib</filename>; if you
\r
981 installed the PostgreSQL 8.3 server packages on <systemitem class="osname">Ubuntu 8.04</systemitem>,
\r
983 <systemitem class="directory">/usr/share/postgresql/8.3/contrib/</systemitem>.</para>
\r
987 <emphasis role="bold">Create and configure the database</emphasis>
\r
989 <para>As the <systemitem class="username">postgres</systemitem>
\r
990 user on the PostgreSQL system create the PostgreSQL database,
\r
991 then set some internal paths:</para>
\r
993 <userinput>createdb evergreen -E UTF8 -T template0</userinput>
\r
994 <userinput>createlang plperl evergreen</userinput>
\r
995 <userinput>createlang plperlu evergreen</userinput>
\r
996 <userinput>createlang plpgsql evergreen</userinput>
\r
998 <para>Continue as user <systemitem class="username">postgres</systemitem>
\r
999 and execute the SQL scripts as shown below, adjusting the paths as needed, where
\r
1000 <literal>[PGSQL_VERSION]</literal> is your installed PostgreSQL
\r
1001 version (e.g. <literal>8.3</literal>).</para>
\r
1003 <userinput>psql -f /usr/share/postgresql/[PGSQL_VERSION]/contrib/tablefunc.sql evergreen</userinput>
\r
1004 <userinput>psql -f /usr/share/postgresql/[PGSQL_VERSION]/contrib/tsearch2.sql evergreen</userinput>
\r
1005 <userinput>psql -f /usr/share/postgresql/[PGSQL_VERSION]/contrib/pgxml.sql evergreen</userinput>
\r
1009 <title>Create <systemitem class="username">evergreen</systemitem> PostgreSQL user</title>
\r
1010 <para>As the <systemitem class="username">postgres</systemitem>
\r
1011 user on the PostgreSQL system, create a new PostgreSQL user
\r
1012 named <systemitem class="username">evergreen</systemitem> and
\r
1013 assign a password:</para>
\r
1015 <userinput>createuser -P -s evergreen</userinput>
\r
1016 <prompt>Enter password for new role: <userinput>MYNEWPASSWORD</userinput></prompt>
\r
1017 <prompt>Enter it again: <userinput>MYNEWPASSWORD</userinput></prompt>
\r
1021 <title>Create Database Schema</title>
\r
1022 <para>As the <systemitem class="username">root</systemitem>
\r
1023 user, create the database schema and configure your system with
\r
1024 the corresponding database authentication details for the
\r
1025 <emphasis>evergreen</emphasis> database user that you created in
\r
1026 the previous step.</para>
\r
1027 <para>Enter the following commands and replace
\r
1028 <emphasis>HOSTNAME, PORT, PASSWORD</emphasis> and
\r
1029 <emphasis>DATABASENAME</emphasis> with appropriate
\r
1032 <userinput>cd /home/opensrf/Evergreen-ILS-1.6.1.2</userinput>
\r
1033 <userinput>perl Open-ILS/src/support-scripts/eg_db_config.pl --update-config \</userinput>
\r
1034 <userinput> --service all --create-schema --create-bootstrap --create-offline \</userinput>
\r
1035 <userinput> --hostname HOSTNAME --port PORT \</userinput>
\r
1036 <userinput> --user evergreen --password PASSWORD --database DATABASENAME</userinput>
\r
1038 <para>On most systems, <emphasis>HOSTNAME</emphasis> will be
\r
1039 <emphasis role="bold">localhost</emphasis>,
\r
1040 <emphasis>PORT</emphasis> will be <emphasis role="bold">5432</emphasis>.
\r
1041 Values for <emphasis>PASSWORD</emphasis> and <emphasis>DATABASENAME</emphasis>
\r
1042 will match the values you used in the previous step when you created the
\r
1043 database and and set a password for the
\r
1044 <systemitem class="username">evergreen</systemitem> user.
\r
1045 Adjust the values to match your own systems.</para>
\r
1046 <para>As the command executes, you may see warnings similar to:
\r
1047 <literal>ERROR: schema SOMENAME does not exist</literal> (in fact,
\r
1048 you may see one warning per schema) but they can be safely ignored.</para>
\r
1050 <para>If you are entering the above command on a single
\r
1051 line, do not include the <literal>\</literal>
\r
1052 (backslash) characters. If you are using the
\r
1053 <command>bash</command> shell, these should only be used
\r
1054 at the end of a line at a bash prompt to indicate that
\r
1055 the command is continued on the next line.</para>
\r
1059 <title>Configure the Apache web server</title>
\r
1061 <primary>web server</primary>
\r
1062 <secondary>Apache</secondary>
\r
1064 <para>In this step you will configure the Apache web server to
\r
1065 support Evergreen software.</para>
\r
1066 <para>First, you must enable some built-in Apache modules and install
\r
1067 some additional Apache configuration files. Then you will create a new
\r
1068 Security Certificate. Finally, you must make several changes to the Apache
\r
1069 configuration file.</para>
\r
1072 <title>Enable the required Apache Modules</title>
\r
1073 <para>As the <systemitem class="username">root</systemitem> user, enable
\r
1074 some modules in the Apache server, then copy the
\r
1075 new configuration files to the Apache server
\r
1076 directories:</para>
\r
1078 <userinput>a2enmod ssl # enable mod_ssl</userinput>
\r
1079 <userinput>a2enmod rewrite # enable mod_rewrite</userinput>
\r
1080 <userinput>a2enmod expires # enable mod_expires</userinput>
\r
1082 <para>As the commands execute, you may see warnings similar to:
\r
1083 <literal>Module SOMEMODULE already enabled</literal> but you can safely ignore them.</para>
\r
1086 <title>Copy Apache configuration files</title>
\r
1087 <para>You must copy the Apache configuration
\r
1088 files from the Evergreen installation directory
\r
1089 to the Apache directory. As the
\r
1090 <systemitem class="username">root</systemitem>
\r
1091 user, perform the following commands:</para>
\r
1093 <userinput>cd /home/opensrf/Evergreen-ILS-1.6.1.2</userinput>
\r
1094 <userinput>cp Open-ILS/examples/apache/eg.conf /etc/apache2/sites-available/</userinput>
\r
1095 <userinput>cp Open-ILS/examples/apache/eg_vhost.conf /etc/apache2/</userinput>
\r
1096 <userinput>cp Open-ILS/examples/apache/startup.pl /etc/apache2/</userinput>
\r
1100 <title>Create a Security Certificate</title>
\r
1101 <para>You must create a new Security Certificate (SSL Key)
\r
1102 for the Apache server using the <command>openssl</command>
\r
1103 command. For a public production server you must configure
\r
1104 or purchase a signed SSL certificate, but for now you can
\r
1105 just use a self-signed certificate and accept the warnings
\r
1106 in the Staff Client and browser during testing and
\r
1107 development. As the
\r
1108 <systemitem class="username">root</systemitem> user,
\r
1109 perform the following commands:</para>
\r
1111 <userinput>mkdir /etc/apache2/ssl</userinput>
\r
1112 <userinput>cd /etc/apache2/ssl</userinput>
\r
1113 <userinput>openssl req -new -x509 -days 365 -nodes -out server.crt -keyout server.key</userinput>
\r
1116 <para>This step generates a self-signed SSL
\r
1117 certificate. You must install a proper SSL
\r
1118 certificate for a public production system to
\r
1119 avoid warning messages when users login to their
\r
1120 account through the OPAC or when staff login
\r
1121 through the staff client.</para>
\r
1124 <step xml:id="serversideinstallation-modify-apache">
\r
1125 <title>Update Apache configuration file</title>
\r
1126 <para>You must make several changes to the new Apache
\r
1127 configuration file
\r
1128 <filename>/etc/apache2/sites-available/eg.conf</filename>. As
\r
1129 the <systemitem class="username">root</systemitem> user,
\r
1130 edit the file and make the following changes:</para>
\r
1133 <para>Comment out the line <literal>Allow
\r
1134 from 10.0.0.0/8</literal> and uncomment
\r
1135 the line <literal>Allow from all</literal>.</para>
\r
1136 <warning>This change allows access to your
\r
1137 configuration CGI scripts from any workstation on
\r
1138 any network. This is only a temporary change to
\r
1139 expedite testing and should be removed after you
\r
1140 have finished and successfully tested the Evergreen
\r
1141 installation. See
\r
1142 <xref linkend="serversideinstallation-postinstallation"/>
\r
1143 for further details on removing this change after
\r
1144 the Evergreen installation is complete.
\r
1148 <para>Comment out the line <literal>Listen
\r
1149 443</literal>, since it conflicts with the
\r
1150 same declaration in the configuration file:
\r
1151 <filename>/etc/apache2/ports.conf</filename>.
\r
1152 Note that <systemitem class="osname">Debian
\r
1153 </systemitem> users should not do this
\r
1154 since the conflict does not apply to that
\r
1155 operating system.</para>
\r
1158 <para>The following updates are needed to allow
\r
1159 the logs to function properly, but it may break
\r
1160 other Apache applications on your server:</para>
\r
1161 <para>For the <systemitem class="osname">Linux</systemitem>
\r
1162 distributions <systemitem class="osname">Ubuntu
\r
1163 Hardy</systemitem> or
\r
1164 <systemitem class="osname">Debian Etch</systemitem>,
\r
1165 as the <systemitem class="username">root</systemitem>
\r
1166 user, edit the Apache configuration file
\r
1167 <filename>/etc/apache2/apache2.conf</filename> and
\r
1168 change the line <literal>User www-data</literal>
\r
1169 to <literal>User opensrf</literal>.</para>
\r
1170 <para>For the <systemitem class="osname">Linux</systemitem>
\r
1171 distributions <systemitem class="osname">Ubuntu
\r
1172 Karmic</systemitem> or
\r
1173 <systemitem class="osname">Ubuntu Lucid</systemitem>
\r
1174 or <systemitem class="osname">Debian
\r
1175 Lenny</systemitem>, as the
\r
1176 <systemitem class="username">root</systemitem>
\r
1177 user, edit the Apache configuration file
\r
1178 <filename>/etc/apache2/envvars</filename> and
\r
1179 change the line <literal>export
\r
1180 APACHE_RUN_USER=www-data</literal> to
\r
1182 APACHE_RUN_USER=opensrf</literal>.</para>
\r
1187 <title>Enable the Evergreen web site</title>
\r
1188 <para>Finally, you must enable the Evergreen web site. As the
\r
1189 <systemitem class="username">root</systemitem> user, execute
\r
1190 the following Apache configuration commands to disable the default
\r
1191 <emphasis>It Works</emphasis> web page and enable the
\r
1192 Evergreen web site:</para>
\r
1194 <userinput>a2dissite default</userinput>
\r
1195 <userinput>a2ensite eg.conf</userinput>
\r
1202 <step xml:id="serversideinstallation-opensrf-config">
\r
1203 <title>Modify the OpenSRF Configuration File</title>
\r
1204 <para>As the <systemitem class="username">opensrf</systemitem> user, edit the
\r
1205 OpenSRF configuration file <filename>/openils/conf/opensrf_core.xml</filename>
\r
1206 to update the Jabber usernames and passwords, and to specify the domain from
\r
1207 which we will accept and to which we will make connections.</para>
\r
1208 <para>If you are installing Evergreen on a single server and using the
\r
1209 <systemitem class="domainname">private.localhost</systemitem> /
\r
1210 <systemitem class="domainname">public.localhost</systemitem> domains,
\r
1211 these will already be set to the correct values. Otherwise, search and replace
\r
1212 to match your customized values.</para>
\r
1213 <para>The left-hand side of <xref linkend="serversideinstallation-xpath-table-2"/>
\r
1214 shows common XPath syntax to indicate the approximate position within the XML
\r
1215 file that needs changes. The right-hand side of the table shows the replacement
\r
1217 <table xml:id="serversideinstallation-xpath-table-2">
\r
1218 <title>Sample XPath syntax for editing "opensrf_core.xml"</title>
\r
1219 <tgroup align="left" cols="2" colsep="1" rowsep="1">
\r
1220 <colspec colname="Xpath" colnum="1" colwidth="1.5*"/>
\r
1221 <colspec colname="Value" colnum="2" colwidth="2.0*"/>
\r
1224 <entry>XPath location</entry>
\r
1225 <entry>Value</entry>
\r
1230 <entry>/config/opensrf/username</entry>
\r
1232 <systemitem class="username">opensrf</systemitem>
\r
1236 <entry>/config/opensrf/passwd </entry>
\r
1237 <entry>password for
\r
1238 <systemitem class="domainname">private.localhost</systemitem><systemitem class="username">opensrf</systemitem> user
\r
1242 <entry>/config/gateway/username</entry>
\r
1244 <systemitem class="username">opensrf</systemitem>
\r
1248 <entry>/config/gateway/passwd</entry>
\r
1249 <entry>password for
\r
1250 <systemitem class="domainname">public.localhost</systemitem><systemitem class="username">opensrf</systemitem> user
\r
1254 <entry>/config/routers/router/transport,
\r
1255 first entry where transport/server == public.localhost:
\r
1258 <systemitem class="username">router</systemitem>
\r
1262 <entry>/config/routers/router/transport,
\r
1263 first entry where transport/server == public.localhost:
\r
1265 <entry>password for
\r
1266 <systemitem class="domainname">public.localhost</systemitem><systemitem class="username">router</systemitem> user
\r
1270 <entry>/config/routers/router/transport,
\r
1271 second entry where transport/server == private.localhost:
\r
1274 <systemitem class="username">router</systemitem>
\r
1278 <entry>/config/routers/router/transport,
\r
1279 second entry where transport/server == private.localhost:
\r
1281 <entry>password for
\r
1282 <systemitem class="domainname">private.localhost</systemitem><systemitem class="username">router</systemitem> user
\r
1289 <step xml:id="serversideinstallation-srfsh">
\r
1290 <title>Create Configuration Files for Users Needing <command>srfsh</command></title>
\r
1291 <para>The software installation will automatically create a utility named
\r
1292 <command>srfsh</command> (surf shell). This is a command line diagnostic tool
\r
1293 for testing and interacting with the OpenSRF network software. It will be used
\r
1294 in a future step to complete and test the Evergreen installation. See
\r
1295 <xref linkend="serversideinstallation-testing"/> for further information.</para>
\r
1296 <para>In this section you will set up a special configuration file for each user
\r
1297 who will need to run the utility. Copy the short sample configuration file
\r
1298 <filename>/openils/conf/srfsh.xml.example</filename> to the file
\r
1299 <filename>.srfsh.xml</filename> (note the leading dot!) in the home directory of
\r
1300 each user who will use <command>srfsh</command>. Finally, edit each user's
\r
1301 <filename>.srfsh.xml</filename> file and make the following changes:</para>
\r
1304 <para>Modify <emphasis role="bold">domain</emphasis> to be the
\r
1305 router hostname (following our domain examples,
\r
1306 <systemitem class="domainname">private.localhost</systemitem>>
\r
1307 will give <command>srfsh</command> access to all OpenSRF services,
\r
1308 while <systemitem class="domainname">public.localhost</systemitem>
\r
1309 will only allow access to those OpenSRF services that are
\r
1310 publicly exposed).</para>
\r
1313 <para>Modify <emphasis role="bold">username</emphasis> and
\r
1314 <emphasis role="bold">password</emphasis> to match the
\r
1315 <systemitem class="username">opensrf</systemitem> Jabber user
\r
1316 for the chosen domain.</para>
\r
1319 <para>Modify <emphasis role="bold">logfile</emphasis> to be the
\r
1320 full path for a log file to which the user has write
\r
1324 <para>Modify <emphasis role="bold">loglevel</emphasis> as needed
\r
1325 for testing.</para>
\r
1328 <programlisting language="xml"><![CDATA[
\r
1329 <?xml version="1.0"?>
\r
1330 <!-- This file follows the standard bootstrap config file layout -->
\r
1331 <!-- found in opensrf_core.xml -->
\r
1333 <router_name>router</router_name>
\r
1334 <domain>private.localhost</domain>
\r
1335 <username>opensrf</username>
\r
1336 <passwd>evergreen</passwd>
\r
1338 <logfile>/tmp/srfsh.log</logfile>
\r
1339 <!-- 0 None, 1 Error, 2 Warning, 3 Info, 4 debug, 5 Internal (Nasty) -->
\r
1340 <loglevel>4</loglevel>
\r
1342 ]]></programlisting>
\r
1344 <step xml:id="serversideinstallation-opensrf-env">
\r
1345 <title>Modify the OpenSRF Environment</title>
\r
1346 <para>Modify the shell configuration file <filename>~/.bashrc</filename> for
\r
1347 user <systemitem class="username">opensrf</systemitem> by adding a Perl environmental
\r
1348 variable, then execute the shell configuration file to load the new variables into
\r
1349 your current environment.</para>
\r
1352 <emphasis>In a multi-server environment, you must add any
\r
1353 modifications to <filename>~/.bashrc</filename> to the top of
\r
1354 the file <emphasis>before</emphasis> the line
\r
1355 <literal>[ -z "$PS1" ] && return </literal>.
\r
1356 This will allow headless (scripted) logins to load the correct
\r
1357 environment.</emphasis>
\r
1361 <userinput>echo "export PERL5LIB=/openils/lib/perl5:\$PERL5LIB" >> ~/.bashrc</userinput>
\r
1362 <userinput>. ~/.bashrc</userinput>
\r
1366 <title>(OPTIONAL) Enable and Disable Language Localizations</title>
\r
1367 <para>You can load translations such as Armenian (hy-AM), Canadian French
\r
1368 (fr-CA), and others into the database to complete the translations available in
\r
1369 the OPAC and staff client. For further information, see <xref linkend="enabling_and_disabling_localization"/>.</para>
\r
1373 <section xml:id="serversideinstallation-starting">
\r
1374 <title>Starting Evergreen</title>
\r
1377 <para>As the <systemitem class="username">root</systemitem>
\r
1378 user, start the <systemitem class="service">ejabberd</systemitem> and
\r
1379 <systemitem class="service">memcached</systemitem> services
\r
1380 (if they are not already running):</para>
\r
1382 <userinput>/etc/init.d/ejabberd start</userinput>
\r
1383 <userinput>/etc/init.d/memcached start</userinput>
\r
1387 <para>As the <systemitem class="username">opensrf</systemitem>
\r
1388 user, start Evergreen.</para>
\r
1389 <para>Use the flag <option>-l</option> to force Evergreen to use
\r
1390 <systemitem class="domainname">localhost</systemitem> (your
\r
1391 current system) as the hostname. Using the
\r
1392 <option>start_all</option> option will start the OpenSRF
\r
1393 <systemitem class="service">router</systemitem> ,
\r
1394 <systemitem class="service">Perl</systemitem> , and
\r
1395 <systemitem class="service">C</systemitem> services:</para>
\r
1397 <userinput>osrf_ctl.sh -l -a start_all</userinput>
\r
1401 <emphasis>You can also start Evergreen
\r
1402 <emphasis role="bold">without</emphasis>
\r
1403 the <option>-l</option> flag, but the
\r
1404 <command>osrf_ctl.sh</command> utility must know
\r
1405 the fully qualified domain name for the system
\r
1406 on which it will execute. That hostname may have
\r
1407 been specified in the configuration file
\r
1408 <filename>opensrf.xml</filename>, which you
\r
1409 configured in a previous step.</emphasis>
\r
1411 <para>Use the <command>hostname</command> command to
\r
1412 determine the fully qualified domain name of your
\r
1417 <para>If you receive an error message similar to
\r
1418 <emphasis>osrf_ctl.sh: command not found</emphasis>,
\r
1419 then your environment variable
\r
1420 <envar>PATH</envar> does not include the directory
\r
1421 <filename class="directory">/openils/bin</filename>.
\r
1423 <systemitem class="username">opensrf</systemitem>
\r
1424 user, edit the configuration file
\r
1425 <filename>/home/opensrf/.bashrc</filename> and
\r
1426 add the following line:
\r
1427 <literal>export PATH=$PATH:/openils/bin</literal></para>
\r
1430 <para>If you receive an error message similar to
\r
1431 <emphasis>Can't locate OpenSRF/System.pm in
\r
1432 @INC ... BEGIN failed--compilation
\r
1433 aborted</emphasis>, then your environment variable
\r
1434 <emphasis role="bold">PERL5LIB</emphasis> does not
\r
1435 include the directory
\r
1436 <filename class="directory">/openils/lib/perl5</filename>.
\r
1438 <systemitem class="username">opensrf</systemitem>
\r
1439 user, edit the configuration file
\r
1440 <filename>/home/opensrf/.bashrc</filename> and
\r
1441 add the following line:
\r
1442 <literal>export PERL5LIB=$PERL5LIB:/openils/lib/perl5</literal></para>
\r
1447 <para>As the <systemitem class="username">opensrf</systemitem>
\r
1448 user, generate the Web files needed by the Staff Client and
\r
1449 catalog, and calculate the proximity of locations in the
\r
1450 Organizational Unit tree (which allows
\r
1451 <emphasis>Holds</emphasis> to work properly):</para>
\r
1453 <userinput>cd /openils/bin</userinput>
\r
1454 <userinput>./autogen.sh -c /openils/conf/opensrf_core.xml -u</userinput>
\r
1456 Updating Evergreen organization tree and IDL using '/openils/conf/opensrf_core.xml'
\r
1457 Updating fieldmapper
\r
1460 <para>You must do this the first time you start Evergreen, and
\r
1461 after making any changes to the library hierarchy.</para>
\r
1464 <para>As the <systemitem class="username">root</systemitem>
\r
1465 user, restart the Apache Web server:</para>
\r
1467 <userinput>/etc/init.d/apache2 restart</userinput>
\r
1470 <para>If the Apache Web server was running when you
\r
1471 started the OpenSRF services, you might not be able to
\r
1472 successfully log in to the OPAC or Staff Client until
\r
1473 the Apache Web server is restarted.</para>
\r
1478 <section xml:id="serversideinstallation-testing">
\r
1479 <title>Testing the Installation</title>
\r
1480 <para>This section describes several simple tests you can perform to verify that the Evergreen
\r
1481 server-side software has been installed and configured properly and is running as
\r
1483 <simplesect xml:id="serversideinstallation-testing-connections">
\r
1484 <title>Testing Connections to Evergreen</title>
\r
1485 <para>Once you have installed and started Evergreen, test your connection to
\r
1486 Evergreen. As the <systemitem class="username">opensrf</systemitem> user start the
\r
1487 <command>srfsh</command> application and try logging onto the Evergreen server using the
\r
1488 default administrator username and password. Following is sample output generated by
\r
1489 executing <command>srfsh</command> after a successful Evergreen installation.
\r
1490 For help with <command>srfsh</command> commands, type <userinput>help</userinput>
\r
1491 at the prompt:</para>
\r
1493 <userinput>/openils/bin/srfsh</userinput>
\r
1494 <prompt>srfsh%</prompt>
\r
1495 <userinput>login admin open-ils</userinput>
\r
1496 <prompt>Received Data: "250bf1518c7527a03249858687714376"</prompt>
\r
1497 <prompt>------------------------------------</prompt>
\r
1498 <prompt>Request Completed Successfully</prompt>
\r
1499 <prompt>Request Time in seconds: 0.045286</prompt>
\r
1500 <prompt>------------------------------------</prompt>
\r
1501 <prompt>Received Data: {</prompt>
\r
1502 <prompt> "ilsevent":0,</prompt>
\r
1503 <prompt> "textcode":"SUCCESS",</prompt>
\r
1504 <prompt> "desc":" ",</prompt>
\r
1505 <prompt> "pid":21616,</prompt>
\r
1506 <prompt> "stacktrace":"oils_auth.c:304",</prompt>
\r
1507 <prompt> "payload":{</prompt>
\r
1508 <prompt> "authtoken":"e5f9827cc0f93b503a1cc66bee6bdd1a",</prompt>
\r
1509 <prompt> "authtime":420</prompt>
\r
1510 <prompt> }</prompt>
\r
1511 <prompt>}</prompt>
\r
1512 <prompt>------------------------------------</prompt>
\r
1513 <prompt>Request Completed Successfully</prompt>
\r
1514 <prompt>Request Time in seconds: 1.336568</prompt>
\r
1515 <prompt>------------------------------------</prompt>
\r
1517 <para>If this does not work, try the following:</para>
\r
1519 <listitem>As the <systemitem class="username">opensrf</systemitem> user, run the
\r
1520 script <filename>Open-ILS/src/support-scripts/settings-tester.pl</filename> to
\r
1521 see if it finds any system configuration problems. If the output of
\r
1522 <command>settings-tester.pl</command> does not help you find the problem, please
\r
1523 do not make any significant changes to your configuration.</listitem>
\r
1524 <listitem>Follow the steps in the troubleshooting guide in
\r
1525 <xref linkend="troubleshooting"/>.</listitem>
\r
1526 <listitem>If you have followed the entire set of installation steps listed here
\r
1527 closely, you are probably extremely close to a working system. Gather your
\r
1528 configuration files and log files and contact the
\r
1529 <ulink url="http://open-ils.org/listserv.php">Evergreen Development Mailing List</ulink>
\r
1530 list for assistance before making any drastic changes to your
\r
1531 system configuration.</listitem>
\r
1535 <section xml:id="serversideinstallation-postinstallation">
\r
1536 <title>Post-Installation Chores</title>
\r
1537 <para>There are several additional steps you may need to complete after Evergreen has been
\r
1538 successfully installed and tested. Some steps may not be needed (e.g., setting up support for
\r
1541 <title>Remove temporary Apache configuration changes</title>
\r
1542 <para>You modified the Apache configuration file
\r
1543 <filename>/etc/apache2/sites-available/eg.conf</filename> in an earlier step as a
\r
1544 temporary measure to expedite testing (see
\r
1545 <xref linkend="serversideinstallation-modify-apache"/> for further information).
\r
1546 Those changes must now be reversed in order to deny unwanted access to your CGI
\r
1547 scripts from users on other public networks.</para>
\r
1550 <emphasis>This temporary network update was done to expedite
\r
1551 testing. You <emphasis role="bold"> must</emphasis> correct
\r
1552 this for a public production system.</emphasis>
\r
1555 <para>As the <systemitem class="username">root</systemitem> user, edit the configuration
\r
1556 file again and comment out the line <literal>Allow from all</literal> and uncomment the
\r
1557 line <literal>Allow from 10.0.0.0/8</literal>, then change it to match your network
\r
1558 address scheme.</para>
\r
1561 <title>Configure a permanent SSL key</title>
\r
1562 <para>In a previous step, you used the command <command>openssl</command> to temporarily
\r
1563 create a new SSL key for the Apache server. This self-signed certificate was adequate
\r
1564 during testing and development, but will continue to generate warnings in the Staff Client
\r
1565 and browser. For a public production server you should configure or purchase a signed SSL
\r
1566 certificate.</para>
\r
1569 <emphasis>The temporary SSL key was only created to expedite
\r
1570 testing. You should install a proper SSL certificate for a public
\r
1571 production system.</emphasis>
\r
1576 <title>Set Up Support For Reports</title>
\r
1577 <para>Evergreen reports are extremely powerful but require some simple configuration.
\r
1578 This section describes starting and stopping the Reporter daemon processes.</para>
\r
1581 <para>Starting the Reporter Daemon</para>
\r
1582 <para>Once the <systemitem class="daemon">open-ils.reporter</systemitem>
\r
1583 process is running and enabled on the gateway, you can start the
\r
1584 Reporter daemon. That process periodically checks for requests for new
\r
1585 or scheduled reports, then starts them as required.</para>
\r
1586 <para>As the <systemitem class="username">opensrf</systemitem> user,
\r
1587 start the Reporter daemon using the following command:</para>
\r
1589 <userinput>cd /home/opensrf/Evergreen-ILS-1.6.1.2/Open-ILS/src/reporter</userinput>
\r
1590 <userinput>./clark-kent.pl --daemon</userinput>
\r
1592 <para>You can control how the <command>clark-kent.pl</command> utility behaves
\r
1593 by specifying any of several command-line options:</para>
\r
1595 <listitem><option>--sleep=interval</option> : number of seconds
\r
1596 to sleep between checks for new reports to run; defaults to
\r
1597 <literal>10</literal></listitem>
\r
1598 <listitem><option>--lockfile=filename</option> : where to place
\r
1599 the lockfile for the process; defaults to
\r
1600 <filename>/tmp/reporter-LOCK</filename></listitem>
\r
1601 <listitem><option>--concurrency=integer</option> : number of
\r
1602 Reporter daemon processes to run; defaults to
\r
1603 <literal>1</literal></listitem>
\r
1604 <listitem><option>--bootstrap=filename</option> : OpenSRF
\r
1605 bootstrap configuration file; defaults to
\r
1606 <filename>/openils/conf/opensrf_core.xml</filename></listitem>
\r
1610 <para>Stopping the Reporter Daemon</para>
\r
1611 <para>To stop the Reporter daemon, you must kill the process and remove
\r
1612 the lockfile. The daemon may have just a single associated process or
\r
1613 there may be several processes if the daemon was started with the optional
\r
1614 <literal>--concurrency</literal> switch. It will also have a lockfile
\r
1615 in the default location.</para>
\r
1616 <para>As the <systemitem class="username">opensrf</systemitem> user,
\r
1617 execute the following shell commands:</para>
\r
1619 <userinput># find and kill the process ID number(s)</userinput>
\r
1620 <userinput>kill `ps wax | grep "Clark Kent" | grep -v grep | cut -b1-6`</userinput>
\r
1621 <userinput># remove the lock file</userinput>
\r
1622 <userinput>rm /tmp/reporter-LOCK</userinput>
\r
1628 <section xml:id="serversideinstallation-virtual">
\r
1629 <title>Installing In Virtualized <systemitem class="osname">Linux</systemitem> Environments</title>
\r
1630 <para>This section describes the installation of Evergreen software in so-called "virtualized"
\r
1631 software environments. Evergreen software runs as a native application on any of several
\r
1632 well-known x86 (32-bit) and x86-64 (64-bit) <systemitem class="osname">Linux</systemitem>
\r
1633 distributions including <systemitem class="osname">Ubuntu</systemitem> and
\r
1634 <systemitem class="osname">Debian</systemitem> but it does not run as a native application
\r
1635 on the <systemitem class="osname">Microsoft Windows</systemitem> operating system.
\r
1636 However, it is possible to execute Evergreen on a <systemitem class="osname">Windows</systemitem>
\r
1637 host system by running it within a virtual Linux-guest installation, which itself executes
\r
1638 on the <systemitem class="osname">Windows</systemitem> system.
\r
1639 The <systemitem class="osname">Linux</systemitem> environment is fully emulated and acts
\r
1640 (within limits) just as if it were executing on a real standalone system.</para>
\r
1641 <para>This technique of emulating a <systemitem class="osname">Linux</systemitem> environment on
\r
1642 a <systemitem class="osname">Windows</systemitem> host is a practical way to install and run an
\r
1643 Evergreen system if it is not possible to dedicate a physical machine solely as a
\r
1644 <systemitem class="osname">Linux</systemitem> host for Evergreen. This architecture is not
\r
1645 recommended for large scale systems since there are performance limitations to running Evergreen
\r
1646 in a virtualized environment. However, it is a reasonable architecture for smaller experimental
\r
1647 systems, as a proof of concept, or as a conference-room pilot.</para>
\r
1649 <title>Installing Virtualization Software</title>
\r
1650 <para>As described above, Evergreen can be installed on top of an emulated
\r
1651 <systemitem class="osname">Linux</systemitem> environment. The
\r
1652 <systemitem class="osname">Linux</systemitem> environment, in turn, is installed
\r
1653 on top of a software application such as <application>"VirtualBox"</application>,
\r
1654 <application>"VMware"</application> or <application>"VirtualPC"</application> which must
\r
1655 first be installed on the <systemitem class="osname">Windows</systemitem> system. This
\r
1656 section contains step-by-step examples that show installing popular virtualization
\r
1657 applications on a <systemitem class="osname">Windows</systemitem> host system. Following
\r
1658 this section are further descriptions of installing
\r
1659 <systemitem class="osname">Linux</systemitem> and Evergreen systems using that
\r
1660 virtualization software.</para>
\r
1662 <title>Installing <application>"VirtualBox"</application> Virtualization Software</title>
\r
1663 <para>This section reviews installation of the
\r
1664 <application>"VirtualBox"</application> application on
\r
1665 <systemitem class="osname">WindowsXP Professional (SP2)</systemitem>.
\r
1666 Download the latest edition of <application>VirtualBox</application> from their official website:
\r
1667 <link xl:href="http://virtualbox.org" xl:title="virtual box">http://virtualbox.org</link>
\r
1668 and follow the on screen instructions to install the software.</para>
\r
1671 <title>Installing VMware Virtualization Software</title>
\r
1673 <primary>virtualization software</primary>
\r
1674 <secondary>VMware</secondary>
\r
1676 <para>This section reviews installation of the
\r
1677 <application>"VMware"</application> application on
\r
1678 <systemitem class="osname">WindowsXP Professional (SP2)</systemitem>.
\r
1679 Find and Download the free virtual machine software of from the VMware
\r
1681 <ulink url="http://downloads.vmware.com">http://downloads.vmware.com</ulink>
\r
1682 and follow the on-screen instructions.</para>
\r
1685 <simplesect xml:id="serversideinstallation-virtual-install-linux-ev">
\r
1686 <title>Installing <systemitem class="osname">Linux</systemitem> /
\r
1687 Evergreen on Virtualization Software</title>
\r
1688 <para>After the virtualization software is installed and running, there are two ways to
\r
1689 continue with installing <systemitem class="osname">Linux</systemitem> and Evergreen
\r
1690 software in the new virtualized environment:</para>
\r
1693 <para>Download and install a prebuilt software image that contains a
\r
1694 working <systemitem class="osname">Linux</systemitem> / Evergreen system
\r
1695 (see <xref linkend="serversideinstall-virtual-prebuilt"/> for
\r
1699 <para>Manually install a <systemitem class="osname">Linux</systemitem>
\r
1700 guest system, then manually install Evergreen on it.</para>
\r
1703 <para>We review each method in the following sections.</para>
\r
1704 <simplesect xml:id="serversideinstall-virtual-prebuilt">
\r
1705 <title>Download and install a prebuilt software image</title>
\r
1706 <para>You can download a prebuilt software image that, when installed with your
\r
1707 virtualization software, emulates a
\r
1708 <systemitem class="osname">Linux</systemitem> guest system containing a running
\r
1709 Evergreen distribution. The image is essentially a snapshot of a hard disk from
\r
1710 a fully configured, functional <systemitem class="osname">Linux</systemitem>
\r
1711 system with Evergreen already installed.</para>
\r
1712 <para>We recommend this approach if you wish to get Evergreen running quickly
\r
1713 with minimal attention to configuration. After reviewing only a few
\r
1714 configuration details you can have a working Evergreen system that integrates
\r
1715 smoothly with the rest of your network. See
\r
1716 <xref linkend="serversideinstall-virtual-versions"/> for a list of prebuilt
\r
1717 software images that are currently available to download and install</para>
\r
1718 <note>DISCLAIMER: The following virtual images have been contributed by members
\r
1719 of the Evergreen community for the purposes of testing, evaluation, training,
\r
1720 and development.</note>
\r
1721 <table xml:id="serversideinstall-virtual-versions">
\r
1722 <title>Linux / Evergreen Virtual Images</title>
\r
1723 <tgroup align="left" cols="4" colsep="1" rowsep="1">
\r
1724 <colspec colnum="1" colwidth="1.0*"/>
\r
1725 <colspec colnum="2" colwidth="1.0*"/>
\r
1726 <colspec colnum="3" colwidth="3.0*"/>
\r
1727 <colspec colnum="4" colwidth="1.0*"/>
\r
1730 <entry>Linux Version</entry>
\r
1731 <entry>Evergreen Version</entry>
\r
1732 <entry>Image</entry>
\r
1733 <entry>Comments</entry>
\r
1738 <entry>Debian lenny (5.0)</entry>
\r
1739 <entry>1.6.0.1</entry>
\r
1741 <ulink url="http://www.open-ils.org/~denials/Evergreen1601_DebianLenny.zip"> download </ulink>
\r
1743 <entry>VirtualBox image</entry>
\r
1746 <entry>Ubuntu karmic koala (9.10)</entry>
\r
1747 <entry>1.6.0.0</entry>
\r
1749 <ulink url="http://www.open-ils.org/~denials/Evergreen-1600-Karmic.zip"> download </ulink>
\r
1751 <entry>VirtualBox image</entry>
\r
1757 <title>VirtualBox Example</title>
\r
1759 <primary>virtualization software</primary>
\r
1760 <secondary>VirtualBox</secondary>
\r
1763 <para>Start VirtualBox for the first time and select
\r
1764 <menuchoice><guimenu>File</guimenu><guimenuitem>VirtualBox Media
\r
1765 Manager</guimenuitem><guimenuitem>Add</guimenuitem></menuchoice>
\r
1766 to locate the prebuilt software image just downloaded (the
\r
1767 example shows it was extracted from the original
\r
1768 <filename class="extension">zip</filename> file into a temporary directory
\r
1769 <filename class="directory">C:\temp</filename>).</para>
\r
1772 <para>After selecting the file, click <guibutton>Open</guibutton> to import it.</para>
\r
1775 <para>Then click <guibutton>OK</guibutton> to save the selection
\r
1776 and return to the VirtualBox Media Manager</para>
\r
1779 <para>Click <guibutton>New</guibutton>, then <guibutton>Next</guibutton> to continue
\r
1780 and create a new virtual machine (VM).</para>
\r
1783 <para>Create a new name for the VM and set the operating system
\r
1784 type, then click <guibutton>Next</guibutton>.</para>
\r
1787 <para>Set the memory size (at least 512Mb),
\r
1788 then click <guibutton>Next</guibutton>.</para>
\r
1791 <para>Edit the Virtual Hard Disk configuration settings; click
\r
1792 the radio boxes <guilabel>Boot Hard Disk</guilabel> and
\r
1793 <guilabel>Use existing hard disk</guilabel>
\r
1794 and ensure that the disk name <guilabel>Evergreen1601_DebianLenny.vmdk</guilabel>
\r
1795 is selected. Click <guibutton>Finish</guibutton> to finish the
\r
1799 <para>Install the <application>VirtualBox Guest
\r
1800 Additions</application> (really a required upgrade to
\r
1801 VirtualBox)</para>
\r
1804 <para>Return to VirtualBox and see the summary of the VM just
\r
1805 created. Click <guibutton>Start</guibutton> to boot the new VM.</para>
\r
1808 <para>See the start of the <systemitem class="osname">Linux</systemitem>
\r
1809 boot sequence. Choose <guimenuitem>Debian Gnu/Linux, kernel
\r
1810 2.6.26-2-686</guimenuitem> from the startup menu and click
\r
1811 <guibutton>Enter</guibutton> to start
\r
1812 <systemitem class="osname">Linux</systemitem> and Evergreen.
\r
1813 After some delay you should see the command line prompt
\r
1814 <prompt>debian-lenny login:</prompt>. Log in with username
\r
1815 <userinput>root</userinput> and password <userinput>evergreen</userinput>
\r
1816 to continue.</para>
\r