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