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 <?dbfo keep-together="always" ?>
35 <title>Evergreen Software Dependencies</title>
37 <primary>Evergreen software dependencies</primary>
39 <tgroup align="left" cols="3" colsep="1" rowsep="1">
40 <colspec colname="Evergreen" colnum="1" colwidth="1.0*"/>
41 <colspec colname="OpenSRF" colnum="2" colwidth="1.0*"/>
42 <colspec colname="PostgreSQL" colnum="3" colwidth="1.0*"/>
45 <entry>Evergreen</entry>
46 <entry>OpenSRF</entry>
47 <entry>PostgreSQL</entry>
52 <entry>1.6.1.x</entry>
54 <entry>8.2 / 8.3</entry>
57 <entry>1.6.0.x</entry>
59 <entry>8.2 / 8.3</entry>
64 <entry>8.1 / 8.2</entry>
69 <entry>8.1 / 8.2</entry>
74 <section xml:id="serversideinstallation-all">
75 <title>Installing Server-Side Software</title>
76 <para>This section describes the installation of the major components of Evergreen server-side software.</para>
77 <para>As far as possible, you should perform the following steps in the exact order given since the
78 success of many steps relies on the successful completion of earlier steps. You should make backup
79 copies of files and environments when you are instructed to do so. In the event of installation problems
80 those copies can allow you to back out of a step gracefully and resume the installation from a known
81 state. See <xref linkend="backingup"/> for further information.</para>
82 <para>Of course, after you successfully complete and test the entire Evergreen installation you should
83 take a final snapshot backup of your system(s). This can be the first in the series of regularly
84 scheduled system backups that you should probably also begin.</para>
85 <section xml:id="serversideinstallation-opensrf">
87 <primary>OpenSRF</primary>
88 <secondary>installation</secondary>
90 <title>Installing OpenSRF 1.4.x On <systemitem class="osname">Ubuntu</systemitem> or
91 <systemitem class="osname">Debian</systemitem></title>
93 <primary>Linux</primary>
94 <secondary>Debian</secondary>
97 <primary>Linux</primary>
98 <secondary>Ubuntu</secondary>
100 <para>This section describes the installation of the latest version of the Open Service Request
101 Framework (OpenSRF), a major component of the Evergreen server-side software, on
102 <systemitem class="osname">Ubuntu</systemitem> or <systemitem class="osname">Debian</systemitem>
103 systems. Evergreen software is integrated with and depends on the OpenSRF software
105 <para>Follow the steps outlined here and run the specified tests to ensure that OpenSRF is
106 properly installed and configured. Do <emphasis><emphasis role="bold">not</emphasis></emphasis>
107 continue with any further Evergreen installation steps
108 until you have verified that OpenSRF has been successfully installed and tested.</para>
110 <para>The following steps have been tested on the x86 (32-bit) and x86-64 (64-bit)
111 platforms. OpenSRF 1.4.0 has been tested on <systemitem class="osname">Debian Etch
112 (4.0)</systemitem>, <systemitem class="osname">Debian Lenny (5.0)</systemitem> and
113 <systemitem class="osname">Ubuntu Lucid Lynx (10.04)</systemitem>.</para>
114 <para>In the following instructions, you are asked to perform certain steps as
115 either the <systemitem class="username">root</systemitem> user, the
116 <systemitem class="username">opensrf</systemitem> user, or the
117 <systemitem class="username">postgres</systemitem> user.</para>
120 <para><systemitem class="osname">Debian</systemitem> -- To become the
121 <systemitem class="username">root</systemitem> user, issue the command
122 <command>su -</command> and enter the password of the
123 <systemitem class="username">root</systemitem> user.</para>
126 <para><systemitem class="osname">Ubuntu</systemitem> -- To become the
127 <systemitem class="username">root</systemitem> user, issue the command
128 <command>sudo su -</command> and enter the password of the
129 <systemitem class="username">root</systemitem> user.</para>
132 <para>To switch from the <systemitem class="username">root</systemitem> user to a
133 different user, issue the command <command>su - USERNAME</command>. For example, to
134 switch from the <systemitem class="username">root</systemitem> user to the
135 <systemitem class="username">opensrf</systemitem> user, issue the command
136 <command>su - opensrf</command>. Once you have become a non-root user, to become
137 the <systemitem class="username">root</systemitem> user again, simply issue the command
138 <command>exit</command>.</para>
142 <title>Add New <systemitem class="username">opensrf</systemitem> User</title>
143 <para>As the <systemitem class="username">root</systemitem> user, add the
144 <systemitem class="username">opensrf</systemitem> user to the system.
145 In the following example, the default shell for the
146 <systemitem class="username">opensrf</systemitem> user is automatically set
147 to <command>/bin/bash</command> to inherit a reasonable environment:</para>
151 useradd -m -s /bin/bash opensrf
152 passwd opensrf</userinput>
156 <title>Download and Unpack Latest OpenSRF Version</title>
158 <primary>OpenSRF</primary>
159 <secondary>download</secondary>
161 <para>The latest version of OpenSRF can be found here:
162 <ulink url="http://evergreen-ils.org/downloads/OpenSRF-1.4.0.tar.gz"></ulink> .
163 As the <systemitem class="username">opensrf</systemitem> user, change to
164 the directory <filename class="directory">/home/opensrf</filename> then download
165 and extract OpenSRF. The new subdirectory
166 <filename class="directory">/home/opensrf/OpenSRF-1.4.0</filename> will be created:</para>
169 # as the opensrf user:
171 wget http://evergreen-ils.org/downloads/OpenSRF-1.4.0.tar.gz
172 tar zxf OpenSRF-1.4.0.tar.gz</userinput>
176 <title>Install Prerequisites to Build OpenSRF</title>
177 <para>In this section you will install and configure a set of prerequisites that will be
178 used to build OpenSRF. In a following step you will actually build the OpenSRF software
179 using the <command>make</command> utility.</para>
180 <para>As the <systemitem class="username">root</systemitem> user, enter the commands show
181 below to build the prerequisites from the software distribution that you just downloaded
182 and unpacked. Remember to replace <emphasis>[DISTRIBUTION]</emphasis> in the following
183 example with the keyword corresponding to the name of one of the
184 <systemitem class="osname">Linux</systemitem> distributions listed in the following
185 distribution keywords table <xref linkend="serversideinstallation-keywords-opensrf"/> .
186 For example, to install the prerequisites for Ubuntu version 10.04 (Lucid Lynx) you would
187 enter this command: <command>make -f src/extras/Makefile.install ubuntu-lucid</command> .</para>
191 cd /home/opensrf/OpenSRF-1.4.0
192 make -f src/extras/Makefile.install [DISTRIBUTION]</userinput>
194 <table xml:id="serversideinstallation-keywords-opensrf">
195 <?dbfo keep-together="always" ?>
196 <title>Keyword Targets for OpenSRF <application>"make"</application> Command</title>
197 <tgroup align="left" cols="2" colsep="1" rowsep="1">
198 <colspec colname="keyword" colnum="1" colwidth="1.0*"/>
199 <colspec colname="linux_version" colnum="2" colwidth="3.0*"/>
202 <entry>Keyword</entry>
203 <entry>Linux Version</entry>
208 <entry>debian-etch</entry>
209 <entry>Debian "Etch" (4.0)</entry>
212 <entry>debian-lenny</entry>
213 <entry>Debian "Lenny" (5.0)</entry>
216 <entry>ubuntu-hardy</entry>
217 <entry>Ubuntu "Hardy Heron" (8.04)</entry>
220 <entry>ubuntu-karmic</entry>
221 <entry>Ubuntu "Karmic Koala" (9.10)</entry>
224 <entry>ubuntu-lucid</entry>
225 <entry>Ubuntu "Lucid Lynx" (10.04)</entry>
228 <entry>fedora13</entry>
229 <entry>Fedora "Goddard" (13)</entry>
232 <entry>centos</entry>
233 <entry>Centos</entry>
240 <entry>gentoo</entry>
241 <entry>Gentoo</entry>
246 <para>This will install a number of packages on the system that are required by OpenSRF,
247 including some Perl modules from CPAN. You can say <literal>No</literal> to the initial
248 CPAN configuration prompt to allow it to automatically configure itself to download and
249 install Perl modules from CPAN. The CPAN installer will ask you a number of times whether
250 it should install prerequisite modules - say <literal>Yes</literal>.</para>
253 <title>Build OpenSRF</title>
254 <para>In this section you will configure, build and install the OpenSRF
255 components that support other Evergreen services.</para>
258 <title>Configure OpenSRF</title>
260 <primary>OpenSRF</primary>
261 <secondary>configure</secondary>
263 <para>As the <systemitem class="username">opensrf</systemitem>
264 user, return to the new OpenSRF build directory and use the
265 <command>configure</command> utility to prepare for the next
266 step of compiling and linking the software. If you wish to
267 include support for Python and Java, add the configuration
268 options <option>--enable-python</option> and
269 <option>--enable-java</option>, respectively:</para>
272 # as the opensrf user:
273 cd /home/opensrf/OpenSRF-1.4.0
274 ./configure --prefix=/openils --sysconfdir=/openils/conf
277 <para>This step will take several minutes to complete.</para>
280 <title>Compile, Link and Install OpenSRF</title>
281 <para>As the <systemitem class="username">root</systemitem>
282 user, return to the new OpenSRF build directory and use the
283 <command>make</command> utility to compile, link and install
288 cd /home/opensrf/OpenSRF-1.4.0
289 make install</userinput>
291 <para>This step will take several minutes to complete.</para>
294 <title>Update the System Dynamic Library Path</title>
295 <para>You must update the system dynamic library path to force
296 your system to recognize the newly installed libraries. As the
297 <systemitem class="username">root</systemitem> user, do this by
298 creating the new file
299 <filename>/etc/ld.so.conf.d/osrf.conf</filename> containing a
300 new library path, then run the command
301 <command>ldconfig</command> to automatically read the file and
302 modify the system dynamic library path:</para>
306 echo "/openils/lib" > /etc/ld.so.conf.d/osrf.conf
310 <step xml:id="serversideinstallation-definedomains">
311 <title>Define Public and Private OpenSRF Domains</title>
312 <para>For security purposes, OpenSRF uses Jabber domains to separate services
313 into public and private realms. On a single-server system the easiest way to
314 define public and private OpenSRF domains is to define separate host names by
315 adding entries to the file <filename>/etc/hosts</filename>.</para>
316 <para>In the following steps we will use the example domains
317 <systemitem class="domainname">public.localhost</systemitem> for the public
318 domain and <systemitem class="domainname">private.localhost</systemitem>
319 for the private domain. In an upcoming step, you will configure two special
320 <systemitem class="service">ejabberd</systemitem> users
321 to handle communications for these two domains.</para>
322 <para>As the <systemitem class="username">root</systemitem> user, edit the file
323 <filename>/etc/hosts</filename> and add the following example domains:</para>
325 <primary>Jabber</primary>
330 127.0.1.2 public.localhost public
331 127.0.1.3 private.localhost private</userinput>
335 <title>Change File Ownerships</title>
336 <para>Finally, as the <systemitem class="username">root</systemitem>
337 user, change the ownership of all files installed in the
338 directory <filename class="directory">/openils</filename> to the
339 user <systemitem class="username">opensrf</systemitem>:</para>
343 chown -R opensrf:opensrf /openils</userinput>
348 <step xml:id="stop-ejabberd-service">
349 <title>Stop the <systemitem class="service">ejabberd</systemitem> Service</title>
351 <primary>ejabberd</primary>
353 <para>Before continuing with configuration of <systemitem class="service">ejabberd</systemitem>
354 you must stop that service. As the <systemitem class="username">root</systemitem> user,
355 execute the following command to stop the service:</para>
359 /etc/init.d/ejabberd stop</userinput>
361 <para>If <systemitem class="service">ejabberd</systemitem> reports that it
362 is already stopped, there may have been a problem when it started back
363 in the installation step. If there are any remaining daemon processes such as
364 <systemitem class="daemon">beam</systemitem> or
365 <systemitem class="daemon">epmd</systemitem>
366 you may need to perform the following commands to kill them:</para>
371 killall beam; killall beam.smp
372 rm /var/lib/ejabberd/*
373 echo 'ERLANG_NODE=ejabberd@localhost' >> /etc/default/ejabberd</userinput>
377 <title>Edit the <systemitem class="service">ejabberd</systemitem> configuration</title>
378 <para>You must make several configuration changes for the
379 <systemitem class="service">ejabberd</systemitem> service before
381 As the <systemitem class="username">root</systemitem> user, edit the file
382 <filename>/etc/ejabberd/ejabberd.cfg</filename> and make the following changes:</para>
385 <para>Change the line:</para>
386 <literal>{hosts, ["localhost"]}.</literal>
387 <para>to instead read:</para>
388 <literal>{hosts, ["localhost", "private.localhost", "public.localhost"]}.</literal>
392 <para>Change the line:</para>
393 <literal>{max_user_sessions, 10}</literal>
394 <para>to instead read:</para>
395 <literal>{max_user_sessions, 10000}</literal>
397 <para>If the line looks something like this:</para>
398 <literal>{access, max_user_sessions, [{10, all}]}</literal>
399 <para>then change it to instead read:</para>
400 <literal>{access, max_user_sessions, [{10000, all}]}</literal>
403 <para>Change all three occurrences of:</para>
404 <literal>max_stanza_size</literal>
405 <para>to instead read:</para>
406 <literal>2000000</literal>
409 <para>Change both occurrences of:</para>
410 <literal>maxrate</literal>
411 <para>to instead read:</para>
412 <literal>500000</literal>
415 <para>Comment out the line:</para>
416 <literal>{mod_offline, []}</literal>
417 <para>by placing two <literal>%</literal> comment signs in front
418 so it instead reads:</para>
419 <literal>%%{mod_offline, []}</literal>
423 <step xml:id="serversideinstallation-opensrf-continued">
424 <title>Restart the <systemitem class="service">ejabberd</systemitem> service</title>
425 <para>As the <systemitem class="username">root</systemitem> user, restart the
426 <systemitem class="service">ejabberd</systemitem> service to test the
427 configuration changes and to register your users:</para>
431 /etc/init.d/ejabberd start</userinput>
435 <title>Register <systemitem class="username">router</systemitem> and
436 <systemitem class="username">opensrf</systemitem> as
437 <systemitem class="service">ejabberd</systemitem> users</title>
438 <para>The two <systemitem class="service">ejabberd</systemitem> users
439 <systemitem class="username">router</systemitem> and
440 <systemitem class="username">opensrf</systemitem> must be registered
441 and configured to manage OpenSRF router service and communications
442 for the two domains <literal>public.localhost</literal> and
443 <literal>private.localhost</literal> that you added to the file
444 <filename>/etc/hosts</filename> in a previous step
445 (see <xref linkend="serversideinstallation-definedomains"/>).
446 The users include:</para>
449 <para>the <systemitem class="username">router</systemitem> user,
450 to whom all requests to connect to an OpenSRF service will be
454 <para>the <systemitem class="username">opensrf</systemitem> user,
455 which clients use to connect to OpenSRF services (you may name
456 the user anything you like, but we use
457 <literal>opensrf</literal> in these examples)</para>
460 <para>As the <systemitem class="username">root</systemitem> user, execute the
461 <command>ejabberdctl</command> utility as shown below to register and create passwords
462 for the users <systemitem class="username">router</systemitem> and
463 <systemitem class="username">opensrf</systemitem> on each domain (remember to replace
464 <emphasis>NEWPASSWORD</emphasis> with the appropriate password):</para>
468 # Note: the syntax for registering a user with ejabberdctl is:
469 # ejabberdctl register USER DOMAIN PASSWORD
470 ejabberdctl register router private.localhost NEWPASSWORD
471 ejabberdctl register router public.localhost NEWPASSWORD
472 ejabberdctl register opensrf private.localhost NEWPASSWORD
473 ejabberdctl register opensrf public.localhost NEWPASSWORD</userinput>
475 <para>Note that the users <systemitem class="username">router</systemitem> and
476 <systemitem class="username">opensrf</systemitem> and their respective passwords
477 will be used again in <xref linkend="serversideinstallation-passwords"/> when
478 we modify the OpenSRF configuration file <filename>/openils/conf/opensrf_core.xml</filename> .</para>
480 <step xml:id="serversideinstallation-opensrf-createconfig">
481 <title>Create OpenSRF configuration files</title>
482 <para>As the <systemitem class="username">opensrf</systemitem> user,
483 execute the following commands to create the new configuration files
484 <filename>/openils/conf/opensrf_core.xml</filename> and
485 <filename>/openils/conf/opensrf.xml</filename> from the example templates:</para>
488 # as the opensrf user:
490 cp opensrf.xml.example opensrf.xml
491 cp opensrf_core.xml.example opensrf_core.xml</userinput>
494 <step xml:id="serversideinstallation-passwords">
495 <title>Update usernames and passwords in the OpenSRF configuration file</title>
496 <para>As the <systemitem class="username">opensrf</systemitem> user, edit the
497 OpenSRF configuration file <filename>/openils/conf/opensrf_core.xml</filename>
498 and update the usernames and passwords to match the values shown in the
499 following table. The left-hand side of <xref linkend="serversideinstallation-xpath-table-1"/>
500 shows common XPath syntax to indicate the approximate position within the XML
501 file that needs changes. The right-hand side of the table shows the replacement
503 <table xml:id="serversideinstallation-xpath-table-1">
504 <?dbfo keep-together="always" ?>
505 <title>Sample XPath syntax for editing "opensrf_core.xml"</title>
506 <tgroup align="left" cols="2" colsep="1" rowsep="1">
507 <colspec colname="Xpath" colnum="1" colwidth="1.6*"/>
508 <colspec colname="Value" colnum="2" colwidth="2.0*"/>
511 <entry>XPath location</entry>
517 <entry>/config/opensrf/username</entry>
519 <systemitem class="username">opensrf</systemitem>
523 <entry>/config/opensrf/passwd </entry>
524 <entry><systemitem class="domainname">private.localhost</systemitem>
526 <systemitem class="username">opensrf</systemitem> user
530 <entry>/config/gateway/username</entry>
532 <systemitem class="username">opensrf</systemitem>
536 <entry>/config/gateway/passwd</entry>
537 <entry><systemitem class="domainname">public.localhost</systemitem>
539 <systemitem class="username">opensrf</systemitem> user
543 <entry>/config/routers/router/transport/username,
544 first entry where server == public.localhost</entry>
546 <systemitem class="username">router</systemitem>
550 <entry>/config/routers/router/transport/password,
551 first entry where server == public.localhost</entry>
552 <entry><systemitem class="domainname">public.localhost</systemitem>
554 <systemitem class="username">router</systemitem> user
558 <entry>/config/routers/router/transport/username,
559 second entry where server == private.localhost</entry>
561 <systemitem class="username">router</systemitem>
565 <entry>/config/routers/router/transport/password,
566 second entry where server == private.localhost</entry>
567 <entry><systemitem class="domainname">private.localhost</systemitem>
569 <systemitem class="username">router</systemitem> user
575 <para>You may also need to modify the file to specify the domains from which
576 <systemitem class="service">OpenSRF</systemitem> will accept connections,
577 and to which it will make connections.
578 If you are installing <application>OpenSRF</application> on a single server
579 and using the <systemitem class="domainname">private.localhost</systemitem> and
580 <systemitem class="domainname">public.localhost</systemitem> domains,
581 these will already be set to the correct values. Otherwise, search and replace
582 to match values for your own systems.</para>
585 <title>Set location of the persistent database</title>
586 <para>As the <systemitem class="username">opensrf</systemitem> user, edit the
587 file <filename>/openils/conf/opensrf.xml</filename>, then find and modify the
588 element <literal>dbfile</literal> (near the end of the file) to set the
589 location of the persistent database. Change the default line:</para>
590 <literal>/openils/var/persist.db</literal>
591 <para>to instead read:</para>
592 <literal>/tmp/persist.db</literal>
593 <para>Following is a sample modification of that portion of the file:</para>
594 <programlisting language="xml"><![CDATA[
595 <!-- Example of an app-specific setting override -->
598 <dbfile>/tmp/persist.db</dbfile>
603 <step xml:id="serversideinstallation-srfsh">
604 <title>Create configuration files for users needing <command>srfsh</command></title>
605 <para>In this section you will set up a special configuration file for each user
606 who will need to run the <command>srfsh</command> (pronounced <emphasis>surf
607 shell</emphasis>) utility.</para>
609 <primary>srfsh</primary>
611 <para>The software installation will automatically create the utility
612 <command>srfsh</command> (surf shell), a command line diagnostic tool for
613 testing and interacting with <application>OpenSRF</application>. It will be used
614 in a future step to complete and test the Evergreen installation. See
615 <xref linkend="serversideinstallation-testing"/> for further information.</para>
616 <para>As the <systemitem class="username">root</systemitem> user, copy the
617 sample configuration file <filename>/openils/conf/srfsh.xml.example</filename>
618 to the home directory of each user who will use <command>srfsh</command>.
619 For instance, do the following for the
620 <systemitem class="username">opensrf</systemitem> user:</para>
624 cp /openils/conf/srfsh.xml.example /home/opensrf/.srfsh.xml</userinput>
626 <para>Edit each user's file <filename>~/.srfsh.xml</filename> and make the
627 following changes:</para>
630 <para>Modify <literal>domain</literal> to be the router hostname
631 (following our domain examples,
632 <systemitem class="domainname">private.localhost</systemitem> will give
633 <command>srfsh</command> access to all OpenSRF services, while
634 <systemitem class="domainname">public.localhost</systemitem>
635 will only allow access to those OpenSRF services that are
636 publicly exposed).</para>
639 <para>Modify <literal>username</literal> and
640 <literal>password</literal> to match the
641 <literal>opensrf</literal> Jabber user for the chosen
645 <para>Modify <literal>logfile</literal> to be the full path for
646 a log file to which the user has write access</para>
649 <para>Modify <literal>loglevel</literal> as needed for testing</para>
652 <para>Change the owner of the file to match the owner of the home directory</para>
655 <para>Following is a sample of the file:</para>
656 <programlisting language="xml"><![CDATA[
657 <?xml version="1.0"?>
658 <!-- This file follows the standard bootstrap config file layout -->
659 <!-- found in opensrf_core.xml -->
661 <router_name>router</router_name>
662 <domain>private.localhost</domain>
663 <username>opensrf</username>
664 <passwd>SOMEPASSWORD</passwd>
666 <logfile>/tmp/srfsh.log</logfile>
667 <!-- 0 None, 1 Error, 2 Warning, 3 Info, 4 debug, 5 Internal (Nasty) -->
668 <loglevel>4</loglevel>
673 <title>Modify the environmental variable <envar>PATH</envar> for the
674 <systemitem class="username">opensrf</systemitem> user</title>
675 <para>As the <systemitem class="username">opensrf</systemitem> user, modify the
676 environmental variable <envar>PATH</envar> by adding a new file path to the
677 <systemitem class="username">opensrf</systemitem> user's shell configuration
678 file <filename>~/.bashrc</filename>:</para>
681 # as the opensrf user:
682 echo "export PATH=/openils/bin:\$PATH" >> ~/.bashrc</userinput>
686 <title>Start OpenSRF</title>
687 <para>As the <systemitem class="username">root</systemitem> user, start the
688 <systemitem class="service">ejabberd</systemitem> and
689 <systemitem class="service">memcached</systemitem> services:</para>
693 /etc/init.d/ejabberd start
694 /etc/init.d/memcached start</userinput>
696 <para>As the <systemitem class="username">opensrf</systemitem> user,
697 start OpenSRF as follows:</para>
700 # as the opensrf user:
701 osrf_ctl.sh -l -a start_all</userinput>
703 <para>The flag <option>-l</option> forces Evergreen to use
704 <systemitem class="domainname">localhost</systemitem> (your current system)
705 as the hostname. The flag <option>-a start_all</option> starts the other
706 OpenSRF <systemitem class="service">router</systemitem> ,
707 <systemitem class="service">Perl</systemitem> , and
708 <systemitem class="service">C</systemitem> services.</para>
711 <para>You can also start Evergreen without the
712 <option>-l</option> flag, but the <command>osrf_ctl.sh</command>
713 utility must know the fully qualified domain name for the system
714 on which it will execute. That hostname was probably specified
715 in the configuration file <filename>opensrf.xml</filename> which
716 you configured in a previous step.</para>
719 <para>If you receive an error message similar to
720 <emphasis>osrf_ctl.sh: command not found</emphasis>, then your
721 environment variable <envar>PATH</envar> does not include the
722 directory <filename class="directory">/openils/bin</filename>.
723 As the <systemitem class="username">opensrf</systemitem> user,
724 edit the configuration file <filename>~/.bashrc</filename> and
725 add the following line:
726 <literal>export PATH=$PATH:/openils/bin</literal></para>
731 <title>Test connections to OpenSRF</title>
732 <para>Once you have installed and started OpenSRF, as the
733 <systemitem class="username">root</systemitem> user, test your connection to
734 <systemitem class="service">OpenSRF</systemitem> using the <command>srfsh</command>
735 utility and trying to call the <command>add</command> method on the OpenSRF
736 <systemitem class="service">math</systemitem> service:</para>
740 /openils/bin/srfsh</userinput>
742 srfsh# <userinput>request opensrf.math add 2 2</userinput></computeroutput>
745 ------------------------------------
746 Request Completed Successfully
747 Request Time in seconds: 0.007519
748 ------------------------------------</computeroutput>
750 <para>For other <command>srfsh</command> commands, type in
751 <userinput>help</userinput> at the prompt.</para>
754 <title>Stop OpenSRF</title>
755 <para>After OpenSRF has started, you can stop it at any time by using the
756 <command>osrf_ctl.sh</command> again. As the
757 <systemitem class="username">opensrf</systemitem>
758 user, stop OpenSRF as follows:</para>
761 # as the opensrf user:
762 osrf_ctl.sh -l -a stop_all</userinput>
767 <section xml:id="serversideinstallation-ubuntudebian">
768 <title>Installing Evergreen 1.6.1.x On <systemitem class="osname">Ubuntu</systemitem> or
769 <systemitem class="osname">Debian</systemitem></title>
771 <primary>Linux</primary>
772 <secondary>Debian</secondary>
775 <primary>Linux</primary>
776 <secondary>Ubuntu</secondary>
778 <para>This section outlines the installation process for the latest stable version of
780 <para>In this section you will download, unpack, install, configure and test the Evergreen
781 system, including the Evergreen server and the PostgreSQL database system. You will make several
782 configuration changes and adjustments to the software, including updates to configure the system
783 for your own locale, and some updates needed to work around a few known issues.</para>
785 <para>The following steps have been tested on the x86 (32-bit) and x86-64 (64-bit)
786 architectures. There may be differences between the Desktop and Server editions of
787 <systemitem class="osname">Ubuntu</systemitem>. These instructions assume the Server
789 <para>In the following instructions, you are asked to perform certain steps as
790 either the <systemitem class="username">root</systemitem> user, the
791 <systemitem class="username">opensrf</systemitem> user, or the
792 <systemitem class="username">postgres</systemitem> user.</para>
795 <para><systemitem class="osname">Debian</systemitem> -- To become the
796 <systemitem class="username">root</systemitem> user, issue the command
797 <command>su -</command> and enter the password of the
798 <systemitem class="username">root</systemitem> user.</para>
801 <para><systemitem class="osname">Ubuntu</systemitem> -- To become the
802 <systemitem class="username">root</systemitem> user, issue the command
803 <command>sudo su -</command> and enter the password of the
804 <systemitem class="username">root</systemitem> user.</para>
807 <para>To switch from the <systemitem class="username">root</systemitem> user to a
808 different user, issue the command <command>su - USERNAME</command>. For example, to
809 switch from the <systemitem class="username">root</systemitem> user to the
810 <systemitem class="username">opensrf</systemitem> user, issue the command
811 <command>su - opensrf</command>. Once you have become a non-root user, to become the
812 <systemitem class="username">root</systemitem> user again, simply issue the command
813 <command>exit</command>.</para>
817 <title>Install OpenSRF</title>
818 <para>Evergreen software is integrated with and depends on the Open Service
819 Request Framework (OpenSRF) software system. For further information on
820 installing, configuring and testing OpenSRF, see
821 <xref linkend="serversideinstallation-opensrf"/>.</para>
822 <para>Follow the steps outlined in that section and run the specified tests to
823 ensure that OpenSRF is properly installed and configured. Do
824 <emphasis><emphasis role="bold">not</emphasis></emphasis> continue with
825 any further Evergreen installation steps until you have verified that OpenSRF
826 has been successfully installed and tested.</para>
829 <title>Download and Unpack Latest Evergreen Version</title>
830 <para>The latest version of Evergreen can be found here:
831 <ulink url="http://evergreen-ils.org/downloads/Evergreen-ILS-1.6.1.2.tar.gz"></ulink> .
832 As the <systemitem class="username">opensrf</systemitem> user, change to
833 the directory <filename class="directory">/home/opensrf</filename> then download
834 and extract Evergreen. The new subdirectory
835 <filename class="directory">/home/opensrf/Evergreen-ILS-1.6.1.2</filename> will be created:</para>
838 # as the opensrf user:
840 wget http://evergreen-ils.org/downloads/Evergreen-ILS-1.6.1.2.tar.gz
841 tar zxf Evergreen-ILS-1.6.1.2.tar.gz</userinput>
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 will be
847 used later in <xref linkend="serversideinstallation-configure"/> and
848 <xref linkend="serversideinstallation-compile"/> to build the Evergreen software
849 using the <command>make</command> utility.</para>
850 <para>As the <systemitem class="username">root</systemitem> user, enter the commands show
851 below to build the prerequisites from the software distribution that you just downloaded
852 and unpacked. Remember to replace <emphasis>[DISTRIBUTION]</emphasis> in the following
853 example with the keyword corresponding to the name of one of the
854 <systemitem class="osname">Linux</systemitem> distributions listed in the following
855 distribution keywords table <xref linkend="serversideinstallation-keywords-evergreen"/> .
856 For example, to install the prerequisites for Ubuntu version 9.10 (Karmic Koala) you would
857 enter this command: <command>make -f Open-ILS/src/extras/Makefile.install
858 ubuntu-karmic</command>.</para>
862 cd /home/opensrf/Evergreen-ILS-1.6.1.2
863 make -f Open-ILS/src/extras/Makefile.install [DISTRIBUTION]</userinput>
865 <table xml:id="serversideinstallation-keywords-evergreen">
866 <?dbfo keep-together="always" ?>
867 <title>Keyword Targets for Evergreen <application>"make"</application> Command</title>
868 <tgroup align="left" cols="2" colsep="1" rowsep="1">
869 <colspec colname="keyword" colnum="1" colwidth="1.0*"/>
870 <colspec colname="linux_version" colnum="2" colwidth="3.0*"/>
873 <entry>Keyword</entry>
874 <entry>Linux Version</entry>
879 <entry>debian-etch</entry>
880 <entry>Debian "Etch" (4.0)</entry>
883 <entry>debian-lenny</entry>
884 <entry>Debian "Lenny" (5.0)</entry>
887 <entry>ubuntu-hardy</entry>
888 <entry>Ubuntu "Hardy Heron" (8.04)</entry>
891 <entry>ubuntu-intrepid</entry>
892 <entry>Ubuntu "Intrepid Ibex" (8.10)</entry>
895 <entry>ubuntu-karmic</entry>
896 <entry>Ubuntu "Karmic Koala" (9.10)</entry>
899 <entry>ubuntu-karmic</entry>
900 <entry>Ubuntu "Lucid Lynx" (10.04)</entry>
903 <entry>centos</entry>
904 <entry>Centos</entry>
911 <entry>gentoo</entry>
912 <entry>Gentoo</entry>
918 <step performance="optional" xml:id="serversideinstallation-postgresql-default">
919 <title>(OPTIONAL) Install the PostgreSQL Server</title>
921 <primary>databases</primary>
922 <secondary>PostgreSQL</secondary>
924 <para>Since the PostgreSQL server is usually a standalone server in multi-server
925 production systems, the prerequisite installer Makefile in the previous section
926 (see <xref linkend="serversideinstallation-installprereq"/>)
927 does not automatically install PostgreSQL. You must install the PostgreSQL server
928 yourself, either on the same system as Evergreen itself or on another system.
929 If your PostgreSQL server is on a different system, just skip this step.
930 If your PostgreSQL server will be on the same system as your Evergreen
931 software, then install the required PostgreSQL server packages as follows.
932 For further information on manually installing PostgreSQL, visit the official
933 <link xl:href="http://www.postgresql.org/">PostgreSQL Site</link>.</para>
934 <para>For <systemitem class="osname">Debian Lenny</systemitem> and
935 <systemitem class="osname">Ubuntu Hardy (8.04)</systemitem>, execute these commands:</para>
939 cd /home/opensrf/Evergreen-ILS-1.6.1.2
940 make -f Open-ILS/src/extras/Makefile.install install_pgsql_server_debs_83</userinput>
942 <para>For <systemitem class="osname">Ubuntu Karmic (9.10)</systemitem> and
943 <systemitem class="osname">Ubuntu Lucid (10.04)</systemitem>, execute these commands:</para>
947 cd /home/opensrf/Evergreen-ILS-1.6.1.2
948 make -f Open-ILS/src/extras/Makefile.install install_pgsql_server_debs_84</userinput>
951 <para>PostgreSQL versions 8.3 or 8.4 are the recommended versions to work
952 with Evergreen 1.6.1.2 . If you have an older version of PostgreSQL, you
953 should upgrade before installing Evergreen. To find the running version of
954 PostgreSQL, as the <systemitem class="username">postgres</systemitem>
955 user execute the command <command>psql</command>, then type
956 <userinput>SELECT version();</userinput> to get detailed information
957 about your version of PostgreSQL.</para>
960 <step performance="optional">
961 <title>Install Perl Modules on PostgreSQL Server</title>
962 <para>If PostgreSQL is running on the same system as your Evergreen software,
963 then the Perl modules will automatically be available. Just skip this step.
964 Otherwise, continue if your PostgreSQL server is running on another system.</para>
965 <para>You will need to install several Perl modules on the other system. As the
966 <systemitem class="username">root</systemitem> user install the following Perl
971 # first, ensure the gcc compiler is installed:
974 # then install the Perl modules:
975 perl -MCPAN -e shell</userinput>
977 cpan> <userinput>install JSON::XS</userinput>
978 cpan> <userinput>install MARC::Record</userinput>
979 cpan> <userinput>install MARC::File::XML</userinput></computeroutput>
981 <para>For more information on installing Perl Modules vist the official
982 <link xl:href="http://www.cpan.org/">CPAN</link> site.</para>
984 <primary>Perl</primary>
985 <secondary>CPAN</secondary>
989 <title>Update the System Dynamic Library Path</title>
990 <para>You must update the system dynamic library path to force your system to recognize
991 the newly installed libraries. As the <systemitem class="username">root</systemitem> user,
992 do this by creating the new file <filename>/etc/ld.so.conf.d/osrf.conf</filename>
993 containing a new library path, then run the command <command>ldconfig</command> to
994 automatically read the file and modify the system dynamic library path:</para>
998 echo "/usr/local/lib" >> /etc/ld.so.conf.d/osrf.conf
999 echo "/usr/local/lib/dbd" >> /etc/ld.so.conf.d/osrf.conf
1000 ldconfig</userinput>
1003 <step performance="optional">
1004 <title>Restart the PostgreSQL Server</title>
1005 <para>If PostgreSQL is running on the same system as the rest of Evergreen, as
1006 the <systemitem class="username">root</systemitem> user you must restart
1007 PostgreSQL to re-read the new library paths just configured. If PostgreSQL is
1008 running on another system, you may skip this step.
1009 As the <systemitem class="username">opensrf</systemitem> user,
1010 execute the following command (remember to replace
1011 <emphasis>PGSQL_VERSION</emphasis> with your installed PostgreSQL version,
1012 for example <literal>8.3</literal>):</para>
1015 # as the opensrf user:
1016 /etc/init.d/postgresql-PGSQL_VERSION restart</userinput>
1019 <step xml:id="serversideinstallation-configure">
1020 <title>Configure Evergreen</title>
1021 <para>In this step you will use the <command>configure</command> and
1022 <command>make</command> utilities to configure Evergreen so it can be compiled
1023 and linked later in <xref linkend="serversideinstallation-compile"/>.</para>
1024 <para>As the <systemitem class="username">opensrf</systemitem> user, return to
1025 the Evergreen build directory and execute these commands:</para>
1028 # as the opensrf user:
1029 cd /home/opensrf/Evergreen-ILS-1.6.1.2
1030 ./configure --prefix=/openils --sysconfdir=/openils/conf
1034 <step xml:id="serversideinstallation-compile">
1035 <title>Compile, Link and Install Evergreen</title>
1036 <para>In this step you will actually compile, link and install Evergreen and the
1037 default Evergreen Staff Client.</para>
1038 <para>As the <systemitem class="username">root</systemitem> user, return to the
1039 Evergreen build directory and use the <command>make</command> utility as shown below:</para>
1043 cd /home/opensrf/Evergreen-ILS-1.6.1.2
1044 make STAFF_CLIENT_BUILD_ID=rel_1_6_1_2 install</userinput>
1046 <para>The Staff Client will also be automatically built, but you must remember
1047 to set the variable <envar>STAFF_CLIENT_BUILD_ID</envar> to match the version of the
1048 Staff Client you will use to connect to the Evergreen server.</para>
1049 <para>The above commands will create a new subdirectory
1050 <filename class="directory">/openils/var/web/xul/rel_1_6_1_2</filename>
1051 containing the Staff Client.</para>
1052 <para>To complete the Staff Client installation, as the
1053 <systemitem class="username">root</systemitem> user execute the following commands to
1054 create a symbolic link named <emphasis>server</emphasis> in the head of the Staff Client
1055 directory <filename class="directory">/openils/var/web/xul</filename> that points to the
1056 subdirectory <filename class="directory">/server</filename> of the new Staff Client
1061 cd /openils/var/web/xul
1062 ln -sf rel_1_6_1_2/server server</userinput>
1066 <title>Copy the OpenSRF Configuration Files</title>
1067 <para>In this step you will replace some OpenSRF configuration files that you set up in
1068 <xref linkend="serversideinstallation-opensrf-createconfig"/> when you installed and
1069 tested OpenSRF.</para>
1070 <para>You must copy several example OpenSRF configuration files into place after first
1071 creating backup copies for troubleshooting purposes, then change all the file ownerships
1072 to <systemitem class="username">opensrf</systemitem>.
1073 As the <systemitem class="username">root</systemitem> user, execute the following
1079 cp opensrf.xml opensrf.xml.BAK
1080 cp opensrf_core.xml opensrf_core.xml.BAK
1081 cp opensrf.xml.example opensrf.xml
1082 cp opensrf_core.xml.example opensrf_core.xml
1083 cp oils_web.xml.example oils_web.xml
1084 chown -R opensrf:opensrf /openils/</userinput>
1088 <title>Create and Configure PostgreSQL Database</title>
1090 <primary>databases</primary>
1091 <secondary>PostgreSQL</secondary>
1093 <para>In this step you will create the Evergreen database. In the commands
1094 below, remember to adjust the path of the <emphasis role="bold">contrib</emphasis>
1095 repository to match your PostgreSQL server
1096 layout. For example, if you built PostgreSQL from source the path would be
1097 <filename class="directory">/usr/local/share/contrib</filename> , and if you
1098 installed the PostgreSQL 8.3 server packages on <systemitem class="osname">Ubuntu 8.04</systemitem>,
1100 <systemitem class="directory">/usr/share/postgresql/8.3/contrib/</systemitem> .</para>
1104 <emphasis role="bold">Create and configure the database</emphasis>
1106 <para>As the <systemitem class="username">postgres</systemitem>
1107 user on the PostgreSQL system create the PostgreSQL database,
1108 then set some internal paths:</para>
1111 # as the postgres user:
1112 createdb evergreen -E UTF8 -T template0
1113 createlang plperl evergreen
1114 createlang plperlu evergreen
1115 createlang plpgsql evergreen</userinput>
1117 <para>Continue as the <systemitem class="username">postgres</systemitem> user
1118 and execute the SQL scripts as shown below (remember to adjust the paths as needed,
1119 where <emphasis>PGSQL_VERSION</emphasis> is your installed PostgreSQL
1120 version, for example <literal>8.3</literal>).</para>
1123 # as the postgres user:
1124 psql -f /usr/share/postgresql/PGSQL_VERSION/contrib/tablefunc.sql evergreen
1125 psql -f /usr/share/postgresql/PGSQL_VERSION/contrib/tsearch2.sql evergreen
1126 psql -f /usr/share/postgresql/PGSQL_VERSION/contrib/pgxml.sql evergreen</userinput>
1129 <step xml:id="serversideinstallation-postgresqlcreateuser">
1130 <title>Create <systemitem class="username">evergreen</systemitem> PostgreSQL user</title>
1131 <para>As the <systemitem class="username">postgres</systemitem>
1132 user on the PostgreSQL system, create a new PostgreSQL user
1133 named <systemitem class="username">evergreen</systemitem> and
1134 assign a password (remember to replace <emphasis>NEWPASSWORD</emphasis>
1135 with an appropriate new password):</para>
1138 # as the postgres user:
1139 createuser -P -s evergreen</userinput>
1141 Enter password for new role: <userinput>NEWPASSWORD</userinput>
1142 Enter it again: <userinput>NEWPASSWORD</userinput></computeroutput>
1146 <title>Create database schema</title>
1147 <para>In this step you will create the database schema and configure your
1148 system with the corresponding database authentication details for the
1149 <emphasis>evergreen</emphasis> database user that you just created in
1150 <xref linkend="serversideinstallation-postgresqlcreateuser"/>.</para>
1151 <para>As the <systemitem class="username">root</systemitem> user, enter
1152 the following commands and replace <emphasis>HOSTNAME, PORT,
1153 PASSWORD</emphasis> and <emphasis>DATABASENAME</emphasis> with appropriate
1158 cd /home/opensrf/Evergreen-ILS-1.6.1.2
1159 perl Open-ILS/src/support-scripts/eg_db_config.pl --update-config \
1160 --service all --create-schema --create-bootstrap --create-offline \
1161 --hostname HOSTNAME --port PORT \
1162 --user evergreen --password PASSWORD --database DATABASENAME</userinput>
1164 <para>On most systems, <emphasis>HOSTNAME</emphasis> will be
1165 <emphasis role="bold">localhost</emphasis> and
1166 <emphasis>PORT</emphasis> will be <emphasis role="bold">5432</emphasis>.
1167 Of course, values for <emphasis>PASSWORD</emphasis> and
1168 <emphasis>DATABASENAME</emphasis> must match the values you used in
1169 <xref linkend="serversideinstallation-postgresqlcreateuser"/>.</para>
1170 <para>As the command executes, you may see warnings similar to:
1171 <literal>ERROR: schema SOMENAME does not exist</literal> (in fact,
1172 you may see one warning per schema) but they can be safely ignored.</para>
1173 <note>If you are entering the above command on a single line, do not
1174 include the <literal>\</literal> (backslash) characters. If you are using
1175 the <command>bash</command> shell, these should only be used at the end of
1176 a line at a <command>bash</command> prompt to indicate that the command is
1177 continued on the next line.</note>
1182 <title>Configure the Apache web server</title>
1184 <primary>web server</primary>
1185 <secondary>Apache</secondary>
1187 <para>In this step you will configure the Apache web server to support Evergreen
1189 <para>First, you must enable some built-in Apache modules and install some
1190 additional Apache configuration files. Then you will create a new Security
1191 Certificate. Finally, you must make several changes to the Apache configuration
1195 <title>Enable the required Apache Modules</title>
1196 <para>As the <systemitem class="username">root</systemitem>
1197 user, enable some modules in the Apache server, then copy the
1198 new configuration files to the Apache server directories:</para>
1200 <primary>Apache modules</primary>
1205 a2enmod ssl # enable mod_ssl
1206 a2enmod rewrite # enable mod_rewrite
1207 a2enmod expires # enable mod_expires</userinput>
1209 <para>As the commands execute, you may see warnings similar to:
1210 <literal>Module SOMEMODULE already enabled</literal> but you can
1211 safely ignore them.</para>
1214 <title>Copy Apache configuration files</title>
1215 <para>You must copy the Apache configuration files from the
1216 Evergreen installation directory to the Apache directory. As the
1217 <systemitem class="username">root</systemitem> user, perform the
1218 following commands:</para>
1222 cd /home/opensrf/Evergreen-ILS-1.6.1.2
1223 cp Open-ILS/examples/apache/eg.conf /etc/apache2/sites-available/
1224 cp Open-ILS/examples/apache/eg_vhost.conf /etc/apache2/
1225 cp Open-ILS/examples/apache/startup.pl /etc/apache2/</userinput>
1228 <step xml:id="serversideinstallation-createsslcertificate">
1229 <title>Create a Security Certificate</title>
1230 <para>In this step you will create a new Security Certificate (SSL Key)
1231 for the Apache server using the <command>openssl</command> command. For a
1232 public production server you must configure or purchase a signed SSL
1233 certificate, but for now you can just use a self-signed certificate and
1234 accept the warnings in the Staff Client and browser during testing and
1235 development. As the <systemitem class="username">root</systemitem> user,
1236 perform the following commands:</para>
1240 mkdir /etc/apache2/ssl
1242 openssl req -new -x509 -days 365 -nodes -out server.crt -keyout server.key</userinput>
1244 <para>You will be prompted for several items of information; enter
1245 the appropriate information for each item. The new files
1246 <filename>server.crt</filename> and <filename>server.key</filename> will
1247 be created in the directory
1248 <filename class="directory">/etc/apache2/ssl</filename> .</para>
1249 <note>This step generates a self-signed SSL certificate. You must install
1250 a proper SSL certificate for a public production system to avoid warning
1251 messages when users login to their account through the OPAC or when staff
1252 login through the Staff Client. For further information on
1253 installing a proper SSL certificate, see
1254 <xref linkend="serversideinstallation-ssl"/>.</note>
1256 <step xml:id="serversideinstallation-modify-apache">
1257 <title>Update Apache configuration file</title>
1258 <para>You must make several changes to the new Apache
1260 <filename>/etc/apache2/sites-available/eg.conf</filename> .
1261 As the <systemitem class="username">root</systemitem> user,
1262 edit the file and make the following changes:</para>
1265 <para>In the section
1266 <literal><Directory "/openils/var/cgi-bin"></literal>
1267 replace the line:</para>
1268 <literal>Allow from 10.0.0.0/8</literal>
1269 <para>with the line:</para>
1270 <literal>Allow from all</literal>
1271 <warning>This change allows access to your configuration
1272 CGI scripts from any workstation on any network. This is
1273 only a temporary change to expedite testing and should be
1274 removed after you have finished and successfully tested
1275 the Evergreen installation. See
1276 <xref linkend="serversideinstallation-postinstallation"/>
1277 for further details on removing this change after the
1278 Evergreen installation is complete.
1282 <para>Comment out the line:</para>
1283 <literal>Listen 443</literal>
1284 <para>since it conflicts with the same declaration in
1285 the configuration file:
1286 <filename>/etc/apache2/ports.conf</filename>. Note that
1287 <systemitem class="osname">Debian </systemitem> users
1288 should not do this since the conflict does not apply to
1289 that operating system.</para>
1292 <para>The following updates are needed to allow the logs
1293 to function properly, but it may break other Apache
1294 applications on your server:</para>
1296 <systemitem class="osname">Linux</systemitem> distributions
1297 <systemitem class="osname">Ubuntu Hardy</systemitem> or
1298 <systemitem class="osname">Debian Etch</systemitem>, as
1299 the <systemitem class="username">root</systemitem> user,
1300 edit the Apache configuration file
1301 <filename>/etc/apache2/apache2.conf</filename> and change
1302 the line <literal>User www-data</literal> to <literal>User
1303 opensrf</literal>.</para>
1305 <systemitem class="osname">Linux</systemitem> distributions
1306 <systemitem class="osname">Ubuntu Karmic</systemitem>,
1307 <systemitem class="osname">Ubuntu Lucid</systemitem> or
1308 <systemitem class="osname">Debian Lenny</systemitem>, as
1309 the <systemitem class="username">root</systemitem> user,
1310 edit the Apache configuration file and change the lines:</para>
1313 export APACHE_RUN_USER=www-data
1314 export APACHE_RUN_GROUP=www-data</userinput>
1316 <para>to instead read:</para>
1319 export APACHE_RUN_USER=opensrf
1320 export APACHE_RUN_GROUP=opensrf</userinput>
1325 <systemitem class="username">root</systemitem> user,
1326 edit the Apache configuration file
1327 <filename>/etc/apache2/apache2.conf</filename> and
1328 modify the value for <literal>KeepAliveTimeout</literal>
1329 and <literal>MaxKeepAliveRequests</literal> to match
1330 the following:</para>
1334 MaxKeepAliveRequests 100</userinput>
1338 <para>Further configuration changes to Apache may be
1339 necessary for busy systems. These changes increase the
1340 number of Apache server processes that are started to
1341 support additional browser connections.</para>
1343 <systemitem class="username">root</systemitem> user,
1344 edit the Apache configuration file
1345 <filename>/etc/apache2/apache2.conf</filename>, locate
1346 and modify the section related to <emphasis>prefork
1347 configuration</emphasis> to suit the load on your
1349 <programlisting language="xml"><![CDATA[
1350 <IfModule mpm_prefork_module>
1355 MaxRequestsPerChild 10000
1357 ]]></programlisting>
1362 <title>Enable the Evergreen web site</title>
1363 <para>Finally, you must enable the Evergreen web site. As the
1364 <systemitem class="username">root</systemitem> user, execute the
1365 following Apache configuration commands to disable the default
1366 <emphasis>It Works</emphasis> web page and enable the Evergreen
1367 web site, and then restart the Apache server:</para>
1371 # disable/enable web sites
1374 # restart the server
1375 /etc/init.d/apache2 reload</userinput>
1380 <step xml:id="serversideinstallation-opensrf-config">
1381 <title>Update the OpenSRF Configuration File</title>
1382 <para>As the <systemitem class="username">opensrf</systemitem> user, edit the
1383 OpenSRF configuration file <filename>/openils/conf/opensrf_core.xml</filename>
1384 to update the Jabber usernames and passwords, and to specify the domain from
1385 which we will accept and to which we will make connections.</para>
1386 <para>If you are installing Evergreen on a single server and using the
1387 <systemitem class="domainname">private.localhost</systemitem> /
1388 <systemitem class="domainname">public.localhost</systemitem> domains,
1389 these will already be set to the correct values. Otherwise, search and replace
1390 to match your customized values.</para>
1391 <para>The left-hand side of <xref linkend="serversideinstallation-xpath-table-2"/>
1392 shows common XPath syntax to indicate the approximate position within the XML
1393 file that needs changes. The right-hand side of the table shows the replacement
1395 <table xml:id="serversideinstallation-xpath-table-2">
1396 <?dbfo keep-together="always" ?>
1397 <title>Sample XPath syntax for editing "opensrf_core.xml"</title>
1398 <tgroup align="left" cols="2" colsep="1" rowsep="1">
1399 <colspec colname="Xpath" colnum="1" colwidth="1.6*"/>
1400 <colspec colname="Value" colnum="2" colwidth="2.0*"/>
1403 <entry>XPath location</entry>
1404 <entry>Value</entry>
1409 <entry>/config/opensrf/username</entry>
1411 <systemitem class="username">opensrf</systemitem>
1415 <entry>/config/opensrf/passwd </entry>
1416 <entry><systemitem class="domainname">private.localhost</systemitem>
1418 <systemitem class="username">opensrf</systemitem> user
1422 <entry>/config/gateway/username</entry>
1424 <systemitem class="username">opensrf</systemitem>
1428 <entry>/config/gateway/passwd</entry>
1429 <entry><systemitem class="domainname">public.localhost</systemitem>
1431 <systemitem class="username">opensrf</systemitem> user
1435 <entry>/config/routers/router/transport/username,
1436 first entry where server == public.localhost</entry>
1438 <systemitem class="username">router</systemitem>
1442 <entry>/config/routers/router/transport/password,
1443 first entry where server == public.localhost</entry>
1444 <entry><systemitem class="domainname">public.localhost</systemitem>
1446 <systemitem class="username">router</systemitem> user
1450 <entry>/config/routers/router/transport/username,
1451 second entry where server == private.localhost</entry>
1453 <systemitem class="username">router</systemitem>
1457 <entry>/config/routers/router/transport/password,
1458 second entry where server == private.localhost</entry>
1459 <entry><systemitem class="domainname">private.localhost</systemitem>
1461 <systemitem class="username">router</systemitem> user
1468 <step performance="optional">
1469 <title>(OPTIONAL) Create Configuration Files for Users Needing <command>srfsh</command></title>
1470 <para>When OpenSRF was installed in <xref linkend="serversideinstallation-opensrf"/>, the
1471 software installation automatically created a utility named <command>srfsh</command> (surf
1472 shell). This is a command line diagnostic tool for testing and interacting with
1473 OpenSRF. It will be used in a future step to complete and test the Evergreen installation.
1474 Earlier in <xref linkend="serversideinstallation-srfsh"/> you also created a configuration
1475 file <filename>~/.srfsh.xml</filename> for each user that might need to use the utility.
1476 See <xref linkend="serversideinstallation-testing"/> for further information.</para>
1478 <step xml:id="serversideinstallation-opensrf-env">
1479 <title>Modify the OpenSRF Environment</title>
1480 <para>In this step you will make some minor modifications to the OpenSRF environment:</para>
1483 <para>Modify the permissions in the directory
1484 <filename class="directory">/openils/var/cgi-bin</filename>
1485 to make the files executable:</para>
1488 # as the opensrf user:
1489 chmod 755 /openils/var/cgi-bin/*.cgi</userinput>
1493 <para>As the <systemitem class="username">opensrf</systemitem> user,
1494 modify the shell configuration file <filename>~/.bashrc</filename> for
1495 user <systemitem class="username">opensrf</systemitem> by adding a Perl
1496 environmental variable, then execute the shell configuration file to load
1497 the new variables into your current environment.</para>
1498 <note>In a multi-server environment, you must add any
1499 modifications to <filename>~/.bashrc</filename> to the top of the file
1500 <emphasis>before</emphasis> the line <literal>[ -z "$PS1" ] &&
1501 return </literal>. This will allow headless (scripted) logins to load the
1502 correct environment.</note>
1505 # as the opensrf user:
1506 echo "export PERL5LIB=/openils/lib/perl5:\$PERL5LIB" >> ~/.bashrc
1507 . ~/.bashrc</userinput>
1512 <step performance="optional">
1513 <title>(OPTIONAL) Enable and Disable Language Localizations</title>
1514 <para>You can load translations such as Armenian (hy-AM), Canadian French
1515 (fr-CA), and others into the database to complete the translations available in
1516 the OPAC and Staff Client. For further information, see
1517 <xref linkend="enabling_and_disabling_localization"/>.</para>
1521 <section xml:id="serversideinstallation-starting">
1522 <title>Starting Evergreen</title>
1523 <para>In this section you will learn how to start the Evergreen services.
1524 For completeness, instructions for stopping Evergreen can be found later in
1525 <xref linkend="serversideinstallation-stopping"/>.</para>
1528 <para>As the <systemitem class="username">root</systemitem>
1529 user, start the <systemitem class="service">ejabberd</systemitem> and
1530 <systemitem class="service">memcached</systemitem> services as follows:</para>
1534 /etc/init.d/ejabberd start
1535 /etc/init.d/memcached start</userinput>
1539 <para>As the <systemitem class="username">opensrf</systemitem> user,
1540 start Evergreen as follows:</para>
1543 # as the opensrf user:
1544 osrf_ctl.sh -l -a start_all</userinput>
1546 <para>The flag <option>-l</option> forces Evergreen to use
1547 <systemitem class="domainname">localhost</systemitem> (your current system)
1548 as the hostname. The flag <option>-a start_all</option> starts the other
1549 OpenSRF <systemitem class="service">router</systemitem> ,
1550 <systemitem class="service">Perl</systemitem> , and
1551 <systemitem class="service">C</systemitem> services.</para>
1554 <para>You can also start Evergreen without the
1555 <option>-l</option> flag, but the <command>osrf_ctl.sh</command>
1556 utility must know the fully qualified domain name for the system
1557 on which it will execute. That hostname was probably specified
1558 in the configuration file <filename>opensrf.xml</filename> which
1559 you configured in a previous step.</para>
1562 <para>If you receive an error message similar to
1563 <emphasis>osrf_ctl.sh: command not found</emphasis>, then your
1564 environment variable <envar>PATH</envar> does not include the
1565 directory <filename class="directory">/openils/bin</filename>.
1566 As the <systemitem class="username">opensrf</systemitem> user,
1567 edit the configuration file <filename>~/.bashrc</filename> and
1568 add the following line:
1569 <literal>export PATH=$PATH:/openils/bin</literal></para>
1572 <para>If you receive an error message similar to <emphasis>Can't
1573 locate OpenSRF/System.pm in @INC ... BEGIN failed--compilation
1574 aborted</emphasis>, then your environment variable
1575 <emphasis role="bold">PERL5LIB</emphasis> does not include the
1576 directory <filename class="directory">/openils/lib/perl5</filename>.
1577 As the <systemitem class="username">opensrf</systemitem> user,
1578 edit the configuration file <filename>~/.bashrc</filename> and
1579 add the following line:
1580 <literal>export PERL5LIB=$PERL5LIB:/openils/lib/perl5</literal></para>
1585 <para>In this step you will generate the Web files needed by the Staff Client
1586 and catalog, and update the proximity of locations in the Organizational Unit
1587 tree (which allows <emphasis>Holds</emphasis> to work properly).</para>
1588 <para>You must do this the first time you start Evergreen and after making any
1589 changes to the library hierarchy.</para>
1590 <para>As the <systemitem class="username">opensrf</systemitem> user, execute the
1591 following command and review the results:</para>
1594 # as the opensrf user:
1596 ./autogen.sh -c /openils/conf/opensrf_core.xml -u</userinput>
1598 Updating Evergreen organization tree and IDL using '/openils/conf/opensrf_core.xml'
1599 Updating fieldmapper
1600 Updating web_fieldmapper
1602 removing OrgTree from the cache for locale hy-AM...
1603 removing OrgTree from the cache for locale cs-CZ...
1604 removing OrgTree from the cache for locale en-CA...
1605 removing OrgTree from the cache for locale en-US...
1606 removing OrgTree from the cache for locale fr-CA...
1607 removing OrgTree from the cache for locale ru-RU...
1608 Updating OrgTree HTML
1609 Updating locales selection HTML
1610 Updating Search Groups
1611 Refreshing proximity of org units
1612 Successfully updated the organization proximity
1613 Done</computeroutput>
1617 <para>As the <systemitem class="username">root</systemitem> user, restart the
1618 Apache Web server:</para>
1622 /etc/init.d/apache2 restart</userinput>
1624 <note>If the Apache Web server was running when you started the OpenSRF
1625 services, you might not be able to successfully log into the OPAC or Staff
1626 Client until the Apache Web server has been restarted.</note>
1630 <section xml:id="serversideinstallation-testing">
1631 <title>Testing Your Evergreen Installation</title>
1632 <para>This section describes several simple tests you can perform to verify that the Evergreen
1633 server-side software has been installed and configured properly and is running as
1635 <simplesect xml:id="serversideinstallation-testing-connections">
1636 <title>Testing Connections to Evergreen</title>
1637 <para>Once you have installed and started Evergreen, test your connection to Evergreen. Start the
1638 <command>srfsh</command> application and try logging onto the Evergreen server using the default
1639 administrator username and password. Following is sample output generated by executing
1640 <command>srfsh</command> after a successful Evergreen installation. For help with
1641 <command>srfsh</command> commands, type <userinput>help</userinput> at the prompt.
1642 As the <systemitem class="username">opensrf</systemitem> user,
1643 execute the following commands to test your Evergreen connection:</para>
1646 # as the opensrf user:
1647 /openils/bin/srfsh</userinput>
1649 srfsh% <userinput>login admin open-ils</userinput>
1650 Received Data: "250bf1518c7527a03249858687714376"
1651 ------------------------------------
1652 Request Completed Successfully
1653 Request Time in seconds: 0.045286
1654 ------------------------------------
1657 "textcode":"SUCCESS",
1660 "stacktrace":"oils_auth.c:304",
1662 "authtoken":"e5f9827cc0f93b503a1cc66bee6bdd1a",
1666 ------------------------------------
1667 Request Completed Successfully
1668 Request Time in seconds: 1.336568
1669 ------------------------------------
1672 <para>If this does not work, try the following:</para>
1675 <para>As the <systemitem class="username">opensrf</systemitem> user, run the
1676 <filename>settings-tester.pl</filename> utility to review your Evergreen
1677 installation for any system configuration problems:</para>
1680 # as the opensrf user:
1682 ./Evergreen-ILS-1.6.1.2/Open-ILS/src/support-scripts/settings-tester.pl</userinput>
1684 <para>If the output of <command>settings-tester.pl</command> does not help you
1685 find the problem, please do not make any significant changes to your
1686 configuration.</para>
1689 <para>Follow the steps in the troubleshooting guide in
1690 <xref linkend="troubleshooting"/>.</para>
1693 <para>If you have followed the entire set of installation steps listed here
1694 closely, you are probably extremely close to a working system. Gather your
1695 configuration files and log files and contact the
1696 <ulink url="http://open-ils.org/listserv.php">Evergreen Development Mailing List</ulink>
1697 list for assistance before making any drastic changes to your system
1698 configuration.</para>
1702 <simplesect xml:id="serversideinstallation-running-staffclient">
1703 <title>Testing the Staff Client on Linux</title>
1704 <para>In this section you will confirm that a basic login on the Staff Client works
1706 <para>Run the Evergreen Staff Client on a Linux system by using the application
1707 <emphasis>XULRunner</emphasis> (installed automatically and by default with Firefox
1708 version 3.0 and later on Ubuntu and Debian distributions).</para>
1709 <para>As the <systemitem class="username">root</systemitem> user, start the Staff Client
1714 xulrunner /home/opensrf/Evergreen-ILS-1.6.1.2/Open-ILS/xul/staff_client/build/application.ini</userinput>
1716 <para>The login screen for the Staff Client should appear:</para>
1718 <alt>Logging into the Staff Client</alt>
1720 <imagedata fileref="../media/serversideinstallation-staffclient-running-1.png" format="PNG" scalefit="1" width="70%"/>
1723 <para>First, add the name of your Evergreen server to the field
1724 <literal>Hostname</literal> in the <literal>Server</literal> section. You will probably
1725 want to use <literal>127.0.0.1</literal>. After adding the server name, click Re-Test
1726 Server. You should now see the messages <literal>200:OK</literal> in the fields
1727 <literal>Status</literal> and <literal>Version</literal>.</para>
1728 <para>Because this is the initial run of the Staff Client, you will see a warning in the
1729 upper-right saying: <emphasis role="bold">Not yet configured for the specified
1730 server</emphasis>. To continue, you must assign a workstation name. Refer to
1731 <xref linkend="staffclientinstallation-workstationnames"/> for further details.</para>
1732 <para>Try to log into the Staff Client with the username <literal>admin</literal> and
1733 the password <literal>open-ils</literal>. If the login is successful, you will see the
1734 following screen:</para>
1736 <alt>Logging into the Staff Client</alt>
1738 <imagedata fileref="../media/serversideinstallation-staffclient-running-4.png" format="PNG" scalefit="1" width="70%"/>
1741 <para>Otherwise, you may need to click <guibutton>'Add SSL Exception'</guibutton> in the
1742 main window. You should see a popup window titled <literal>Add Security Exception</literal>:</para>
1744 <alt>Adding an SSL Exception in the Staff Client</alt>
1746 <imagedata fileref="../media/serversideinstallation-staffclient-running-2.png" format="PNG" scalefit="1" width="70%"/>
1749 <para>Click <guibutton>'Get Certificate'</guibutton>, then click <guibutton>'Confirm
1750 Security Exception'</guibutton>, then click <guibutton>'Re-Test Server'</guibutton> in the
1751 main window and try to log in again.</para>
1753 <simplesect xml:id="serversideinstallation-starting-apache-server">
1754 <title>Testing the Apache Web Server</title>
1755 <para>In this section you will test the Apache configuration file(s), then restart the
1756 Apache web server.</para>
1757 <para>As the <emphasis role="bold">root</emphasis> user, execute the following
1758 commands. Note the use of <emphasis>restart</emphasis> to force the new Evergreen
1759 modules to be reloaded even if the Apache server is already running. Any problems found
1760 with your configuration files should be displayed:</para>
1764 apache2ctl configtest && /etc/init.d/apache2 restart</userinput>
1767 <simplesect xml:id="serversideinstallation-stopping">
1768 <title>Stopping Evergreen</title>
1769 <para>In <xref linkend="serversideinstallation-starting"/> you learned how to start the
1770 Evergreen services. For completeness, following are instructions for stopping the
1771 Evergreen services.</para>
1772 <para>As the <systemitem class="username">opensrf</systemitem> user, stop all Evergreen
1773 services by using the following command:</para>
1776 # as the opensrf user
1777 # stop the server; use "-l" to force hostname to be "localhost"
1778 osrf_ctl.sh -l -a stop_all</userinput>
1780 <note>You can also stop Evergreen services <emphasis role="bold">without</emphasis> the
1781 <option>-l</option> flag, but the <command>osrf_ctl.sh</command> utility must know the
1782 fully qualified domain name for the system on which it will execute. That hostname may
1783 have been specified in the configuration file <filename>opensrf.xml</filename>, which
1784 you configured in a previous step.</note>
1787 <section xml:id="serversideinstallation-postinstallation">
1788 <title>Post-Installation Chores</title>
1789 <para>There are several additional steps you may need to complete after Evergreen has been
1790 successfully installed and tested. Some steps may not be needed (e.g., setting up support for
1793 <title>Remove temporary Apache configuration changes</title>
1794 <para>You modified the Apache configuration file
1795 <filename>/etc/apache2/sites-available/eg.conf</filename> in an earlier step as a
1796 temporary measure to expedite testing (see
1797 <xref linkend="serversideinstallation-modify-apache"/> for further information).
1798 Those changes must now be reversed in order to deny unwanted access to your
1799 CGI scripts from users on other public networks.</para>
1802 <emphasis>This temporary network update was done to expedite
1803 testing. You <emphasis role="bold">must</emphasis> correct
1804 this for a public production system.</emphasis>
1807 <para>As the <systemitem class="username">root</systemitem> user, edit the configuration
1808 file again and comment out the line <literal>Allow from all</literal> and uncomment the
1809 line <literal>Allow from 10.0.0.0/8</literal>, then change it to match your network
1810 address scheme.</para>
1812 <section xml:id="serversideinstallation-ssl">
1813 <title>Configure a permanent SSL key</title>
1814 <para>In a previous step (see <xref linkend="serversideinstallation-createsslcertificate"/>)
1815 you used the command <command>openssl</command> to temporarily
1816 create a new SSL key for the Apache server. This self-signed security certificate was adequate
1817 during testing and development, but will continue to generate warnings in the Staff Client
1818 and browser. For a public production server you should configure or purchase a signed SSL
1820 <para>There are several open source software solutions that provide schemes to generate and
1821 maintain public key security certificates for your library system. Some popular projects are
1822 listed below; please review them for background information on why you need such a system and
1823 how you can provide it:</para>
1826 <ulink url="http://www.openca.org/projects/openca/">http://www.openca.org/projects/openca/</ulink>
1829 <ulink url="http://sourceforge.net/projects/ejbca/">http://sourceforge.net/projects/ejbca/</ulink>
1832 <ulink url="http://pki.fedoraproject.org">http://pki.fedoraproject.org</ulink>
1837 <emphasis>The temporary SSL key was only created to expedite
1838 testing. You should install a proper SSL certificate for a public
1839 production system.</emphasis>
1844 <title>(OPTIONAL) Set Up Support For Reports</title>
1845 <para>Evergreen reports are extremely powerful but require some simple configuration.
1846 This section describes starting and stopping the Reporter daemon processes.</para>
1849 <para>Starting the Reporter Daemon</para>
1850 <para>Once the <systemitem class="daemon">open-ils.reporter</systemitem>
1851 process is running and enabled on the gateway, you can start the
1852 Reporter daemon. That process periodically checks for requests for new
1853 or scheduled reports, then starts them as required.</para>
1854 <para>As the <systemitem class="username">opensrf</systemitem> user,
1855 start the Reporter daemon using the following command:</para>
1858 # as the opensrf user:
1859 cd /home/opensrf/Evergreen-ILS-1.6.1.2/Open-ILS/src/reporter
1860 ./clark-kent.pl --daemon</userinput>
1862 <para>You can control how the <command>clark-kent.pl</command> utility behaves
1863 by specifying any of several command-line options:</para>
1865 <listitem><option>--sleep=interval</option> : number of seconds
1866 to sleep between checks for new reports to run; defaults to
1867 <literal>10</literal></listitem>
1868 <listitem><option>--lockfile=filename</option> : where to place
1869 the lockfile for the process; defaults to
1870 <filename>/tmp/reporter-LOCK</filename></listitem>
1871 <listitem><option>--concurrency=integer</option> : number of
1872 Reporter daemon processes to run; defaults to
1873 <literal>1</literal></listitem>
1874 <listitem><option>--bootstrap=filename</option> : OpenSRF
1875 bootstrap configuration file; defaults to
1876 <filename>/openils/conf/opensrf_core.xml</filename></listitem>
1880 <para>Stopping the Reporter Daemon</para>
1881 <para>To stop the Reporter daemon, you must kill the process and remove
1882 the lockfile. The daemon may have just a single associated process or
1883 there may be several processes if the daemon was started with the optional
1884 <literal>--concurrency</literal> switch. It will also have a lockfile
1885 in the default location.</para>
1886 <para>As the <systemitem class="username">opensrf</systemitem> user,
1887 execute the following shell commands:</para>
1891 # find and kill the process ID number(s)
1892 kill `ps wax | grep "Clark Kent" | grep -v grep | cut -b1-6`
1893 # remove the lock file
1894 rm /tmp/reporter-LOCK</userinput>
1900 <section xml:id="serversideinstallation-virtual">
1901 <title>Installing In Virtualized <systemitem class="osname">Linux</systemitem> Environments</title>
1902 <para>This section describes the installation of Evergreen software in so-called "virtualized"
1903 software environments. Evergreen software runs as a native application on any of several
1904 well-known x86 (32-bit) and x86-64 (64-bit) <systemitem class="osname">Linux</systemitem>
1905 distributions including <systemitem class="osname">Ubuntu</systemitem> and
1906 <systemitem class="osname">Debian</systemitem> but it does not run as a native application
1907 on the <systemitem class="osname">Microsoft Windows</systemitem> operating system.
1908 However, it is possible to execute Evergreen on a <systemitem class="osname">Windows</systemitem>
1909 host system by running it within a virtual Linux-guest installation, which itself executes
1910 on the <systemitem class="osname">Windows</systemitem> system.
1911 The <systemitem class="osname">Linux</systemitem> environment is fully emulated and acts
1912 (within limits) just as if it were executing on a real standalone system.</para>
1913 <para>This technique of emulating a <systemitem class="osname">Linux</systemitem> environment on
1914 a <systemitem class="osname">Windows</systemitem> host is a practical way to install and run an
1915 Evergreen system if it is not possible to dedicate a physical machine solely as a
1916 <systemitem class="osname">Linux</systemitem> host for Evergreen. This architecture is not
1917 recommended for large scale systems since there are performance limitations to running Evergreen
1918 in a virtualized environment. However, it is a reasonable architecture for smaller experimental
1919 systems, as a proof of concept, or as a conference-room pilot.</para>
1921 <title>Installing Virtualization Software</title>
1922 <para>As described above, Evergreen can be installed on top of an emulated
1923 <systemitem class="osname">Linux</systemitem> environment. The
1924 <systemitem class="osname">Linux</systemitem> environment, in turn, is installed
1925 on top of a software application such as <application>"VirtualBox"</application>,
1926 <application>"VMware"</application> or <application>"VirtualPC"</application> which must
1927 first be installed on the <systemitem class="osname">Windows</systemitem> system. This
1928 section contains step-by-step examples that show installing popular virtualization
1929 applications on a <systemitem class="osname">Windows</systemitem> host system. Following
1930 this section are further descriptions of installing
1931 <systemitem class="osname">Linux</systemitem> and Evergreen systems using that
1932 virtualization software.</para>
1934 <title>Installing <application>"VirtualBox"</application> Virtualization Software</title>
1935 <para>This section reviews installation of the
1936 <application>"VirtualBox"</application> application on
1937 <systemitem class="osname">WindowsXP Professional (SP2)</systemitem>.
1938 Download the latest edition of <application>VirtualBox</application> from their official website:
1939 <link xl:href="http://virtualbox.org" xl:title="virtual box">http://virtualbox.org</link>
1940 and follow the on screen instructions to install the software.</para>
1943 <title>Installing VMware Virtualization Software</title>
1945 <primary>virtualization software</primary>
1946 <secondary>VMware</secondary>
1948 <para>This section reviews installation of the
1949 <application>"VMware"</application> application on
1950 <systemitem class="osname">WindowsXP Professional (SP2)</systemitem>.
1951 Find and Download the free virtual machine software of from the VMware
1953 <ulink url="http://downloads.vmware.com">http://downloads.vmware.com</ulink>
1954 and follow the on-screen instructions.</para>
1957 <simplesect xml:id="serversideinstallation-virtual-install-linux-ev">
1958 <title>Installing <systemitem class="osname">Linux</systemitem> /
1959 Evergreen on Virtualization Software</title>
1960 <para>After the virtualization software is installed and running, there are two ways to
1961 continue with installing <systemitem class="osname">Linux</systemitem> and Evergreen
1962 software in the new virtualized environment:</para>
1965 <para>Download and install a prebuilt software image that contains a
1966 working <systemitem class="osname">Linux</systemitem> / Evergreen system
1967 (see <xref linkend="serversideinstall-virtual-prebuilt"/> for
1971 <para>Manually install a <systemitem class="osname">Linux</systemitem>
1972 guest system, then manually install Evergreen on it.</para>
1975 <para>We review each method in the following sections.</para>
1976 <section xml:id="serversideinstall-virtual-prebuilt">
1977 <title>Download and install a prebuilt software image</title>
1978 <para>You can download a prebuilt software image that, when installed with your
1979 virtualization software, emulates a
1980 <systemitem class="osname">Linux</systemitem> guest system containing a running
1981 Evergreen distribution. The image is essentially a snapshot of a hard disk from
1982 a fully configured, functional <systemitem class="osname">Linux</systemitem>
1983 system with Evergreen already installed.</para>
1984 <para>We recommend this approach if you wish to get Evergreen running quickly
1985 with minimal attention to configuration. After reviewing only a few
1986 configuration details you can have a working Evergreen system that integrates
1987 smoothly with the rest of your network. See
1988 <xref linkend="serversideinstall-virtual-versions"/> for a list of prebuilt
1989 software images that are currently available to download and install</para>
1990 <note>DISCLAIMER: The following virtual images have been contributed by members
1991 of the Evergreen community for the purposes of testing, evaluation, training,
1992 and development.</note>
1993 <table xml:id="serversideinstall-virtual-versions">
1994 <?dbfo keep-together="always" ?>
1995 <title>Linux / Evergreen Virtual Images</title>
1996 <tgroup align="left" cols="4" colsep="1" rowsep="1">
1997 <colspec colname="linux_version" colnum="1" colwidth="1.0*"/>
1998 <colspec colname="evergreen_version" colnum="2" colwidth="1.0*"/>
1999 <colspec colname="image" colnum="3" colwidth="3.0*"/>
2000 <colspec colname="comments" colnum="4" colwidth="1.0*"/>
2003 <entry>Linux Version</entry>
2004 <entry>Evergreen Version</entry>
2005 <entry>Image</entry>
2006 <entry>Comments</entry>
2011 <entry>Debian lenny (5.0)</entry>
2012 <entry>1.6.0.1</entry>
2014 <ulink url="http://www.open-ils.org/~denials/Evergreen1601_DebianLenny.zip"> download </ulink>
2016 <entry>VirtualBox image</entry>
2019 <entry>Ubuntu karmic koala (9.10)</entry>
2020 <entry>1.6.0.0</entry>
2022 <ulink url="http://www.open-ils.org/~denials/Evergreen-1600-Karmic.zip"> download </ulink>
2024 <entry>VirtualBox image</entry>
2030 <title>VirtualBox Example</title>
2032 <primary>virtualization software</primary>
2033 <secondary>VirtualBox</secondary>
2036 <para>Start VirtualBox for the first time and select
2037 <menuchoice><guimenu>File</guimenu><guimenuitem>VirtualBox Media Manager</guimenuitem><guimenuitem>Add</guimenuitem></menuchoice>
2038 to locate the prebuilt software image just downloaded (the
2039 example shows it was extracted from the original
2040 <filename class="extension">zip</filename> file into a temporary directory
2041 <filename class="directory">C:\temp</filename>).</para>
2044 <para>After selecting the file, click <guibutton>'Open'</guibutton> to import it.</para>
2047 <para>Then click <guibutton>'OK'</guibutton> to save the selection
2048 and return to the VirtualBox Media Manager</para>
2051 <para>Click <guibutton>'New'</guibutton>, then <guibutton>'Next'</guibutton>
2052 to continue and create a new virtual machine (VM).</para>
2055 <para>Create a new name for the VM and set the operating system
2056 type, then click <guibutton>'Next'</guibutton>.</para>
2059 <para>Set the memory size (at least 512Mb),
2060 then click <guibutton>'Next'</guibutton>.</para>
2063 <para>Edit the Virtual Hard Disk configuration settings; click
2064 the radio boxes <guilabel>Boot Hard Disk</guilabel> and
2065 <guilabel>Use existing hard disk</guilabel>
2066 and ensure that the disk name <guilabel>Evergreen1601_DebianLenny.vmdk</guilabel>
2067 is selected. Click <guibutton>'Finish'</guibutton> to finish the
2071 <para>Install the <application>VirtualBox Guest
2072 Additions</application> (really a required upgrade to
2076 <para>Return to VirtualBox and see the summary of the VM just
2077 created. Click <guibutton>'Start'</guibutton> to boot the new VM.</para>
2080 <para>See the start of the <systemitem class="osname">Linux</systemitem>
2081 boot sequence. Choose <guimenuitem>Debian Gnu/Linux, kernel
2082 2.6.26-2-686</guimenuitem> from the startup menu and click
2083 <guibutton>'Enter'</guibutton> to start
2084 <systemitem class="osname">Linux</systemitem> and Evergreen.
2085 After some delay you should see the command line prompt
2086 <prompt>debian-lenny login:</prompt>. Log in with username
2087 <userinput>root </userinput> and password <userinput>evergreen</userinput>