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>
24 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.6.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.6</filename> will be created:</para>
838 # as the opensrf user:
840 wget http://evergreen-ils.org/downloads/Evergreen-ILS-1.6.1.6.tar.gz
841 tar zxf Evergreen-ILS-1.6.1.6.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.6
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, you can install the required PostgreSQL server packages as described
932 in <xref linkend="InstallingPostgreSQL"/>, or you can visit the official
933 web site <link xl:href="http://www.postgresql.org/">http://www.postgresql.org</link>
934 for more information.</para>
936 <para>PostgreSQL versions 8.3 or 8.4 are the recommended versions to work
937 with Evergreen version 1.6.1.6 . If you have an older version of PostgreSQL,
938 you should upgrade before installing Evergreen. To find your current version
939 of PostgreSQL, as the <systemitem class="username">postgres</systemitem>
940 user execute the command <command>psql</command>, then type
941 <userinput>SELECT version();</userinput> to get detailed information
942 about your version of PostgreSQL.</para>
945 <step performance="optional">
946 <title>Install Perl Modules on PostgreSQL Server</title>
947 <para>If PostgreSQL is running on the same system as your Evergreen software,
948 then the Perl modules will automatically be available. Just skip this step.
949 Otherwise, continue if your PostgreSQL server is running on another system.</para>
950 <para>You will need to install several Perl modules on the other system. As the
951 <systemitem class="username">root</systemitem> user install the following Perl
956 # first, ensure the gcc compiler is installed:
959 # then install the Perl modules:
960 perl -MCPAN -e shell</userinput>
962 cpan> <userinput>install JSON::XS</userinput>
963 cpan> <userinput>install MARC::Record</userinput>
964 cpan> <userinput>install MARC::File::XML</userinput></computeroutput>
966 <para>For more information on installing Perl Modules vist the official
967 <link xl:href="http://www.cpan.org/">CPAN</link> site.</para>
969 <primary>Perl</primary>
970 <secondary>CPAN</secondary>
974 <title>Update the System Dynamic Library Path</title>
975 <para>You must update the system dynamic library path to force your system to recognize
976 the newly installed libraries. As the <systemitem class="username">root</systemitem> user,
977 do this by creating the new file <filename>/etc/ld.so.conf.d/osrf.conf</filename>
978 containing a new library path, then run the command <command>ldconfig</command> to
979 automatically read the file and modify the system dynamic library path:</para>
983 echo "/usr/local/lib" >> /etc/ld.so.conf.d/osrf.conf
984 echo "/usr/local/lib/dbd" >> /etc/ld.so.conf.d/osrf.conf
988 <step performance="optional">
989 <title>Restart the PostgreSQL Server</title>
990 <para>If PostgreSQL is running on the same system as the rest of Evergreen, as
991 the <systemitem class="username">root</systemitem> user you must restart
992 PostgreSQL to re-read the new library paths just configured. If PostgreSQL is
993 running on another system, you may skip this step.
994 As the <systemitem class="username">opensrf</systemitem> user,
995 execute the following command (remember to replace
996 <emphasis>PGSQL_VERSION</emphasis> with your installed PostgreSQL version,
997 for example <literal>8.3</literal>):</para>
1000 # as the opensrf user:
1001 /etc/init.d/postgresql-PGSQL_VERSION restart</userinput>
1004 <step xml:id="serversideinstallation-configure">
1005 <title>Configure Evergreen</title>
1006 <para>In this step you will use the <command>configure</command> and
1007 <command>make</command> utilities to configure Evergreen so it can be compiled
1008 and linked later in <xref linkend="serversideinstallation-compile"/>.</para>
1009 <para>As the <systemitem class="username">opensrf</systemitem> user, return to
1010 the Evergreen build directory and execute these commands:</para>
1013 # as the opensrf user:
1014 cd /home/opensrf/Evergreen-ILS-1.6.1.6
1015 ./configure --prefix=/openils --sysconfdir=/openils/conf
1019 <step xml:id="serversideinstallation-compile">
1020 <title>Compile, Link and Install Evergreen</title>
1021 <para>In this step you will actually compile, link and install Evergreen and the
1022 default Evergreen Staff Client.</para>
1023 <para>As the <systemitem class="username">root</systemitem> user, return to the
1024 Evergreen build directory and use the <command>make</command> utility as shown below:</para>
1028 cd /home/opensrf/Evergreen-ILS-1.6.1.6
1029 make STAFF_CLIENT_BUILD_ID=rel_1_6_1_6 install</userinput>
1031 <para>The Staff Client will also be automatically built, but you must remember
1032 to set the variable <envar>STAFF_CLIENT_BUILD_ID</envar> to match the version of the
1033 Staff Client you will use to connect to the Evergreen server.</para>
1034 <para>The above commands will create a new subdirectory
1035 <filename class="directory">/openils/var/web/xul/rel_1_6_1_6</filename>
1036 containing the Staff Client.</para>
1037 <para>To complete the Staff Client installation, as the
1038 <systemitem class="username">root</systemitem> user execute the following commands to
1039 create a symbolic link named <emphasis>server</emphasis> in the head of the Staff Client
1040 directory <filename class="directory">/openils/var/web/xul</filename> that points to the
1041 subdirectory <filename class="directory">/server</filename> of the new Staff Client
1046 cd /openils/var/web/xul
1047 ln -sf rel_1_6_1_6/server server</userinput>
1051 <title>Copy the OpenSRF Configuration Files</title>
1052 <para>In this step you will replace some OpenSRF configuration files that you set up in
1053 <xref linkend="serversideinstallation-opensrf-createconfig"/> when you installed and
1054 tested OpenSRF.</para>
1055 <para>You must copy several example OpenSRF configuration files into place after first
1056 creating backup copies for troubleshooting purposes, then change all the file ownerships
1057 to <systemitem class="username">opensrf</systemitem>.
1058 As the <systemitem class="username">root</systemitem> user, execute the following
1064 cp opensrf.xml opensrf.xml.BAK
1065 cp opensrf_core.xml opensrf_core.xml.BAK
1066 cp opensrf.xml.example opensrf.xml
1067 cp opensrf_core.xml.example opensrf_core.xml
1068 cp oils_web.xml.example oils_web.xml
1069 chown -R opensrf:opensrf /openils/</userinput>
1073 <title>Create and Configure PostgreSQL Database</title>
1075 <primary>databases</primary>
1076 <secondary>PostgreSQL</secondary>
1078 <para>In this step you will create the Evergreen database. In the commands
1079 below, remember to adjust the path of the <emphasis role="bold">contrib</emphasis>
1080 repository to match your PostgreSQL server
1081 layout. For example, if you built PostgreSQL from source the path would be
1082 <filename class="directory">/usr/local/share/contrib</filename> , and if you
1083 installed the PostgreSQL 8.3 server packages on <systemitem class="osname">Ubuntu 8.04</systemitem>,
1085 <systemitem class="directory">/usr/share/postgresql/8.3/contrib/</systemitem> .</para>
1089 <emphasis role="bold">Create and configure the database</emphasis>
1091 <para>As the <systemitem class="username">postgres</systemitem>
1092 user on the PostgreSQL system create the PostgreSQL database,
1093 then set some internal paths:</para>
1096 # as the postgres user:
1097 createdb evergreen -E UTF8 -T template0
1098 createlang plperl evergreen
1099 createlang plperlu evergreen
1100 createlang plpgsql evergreen</userinput>
1102 <para>Continue as the <systemitem class="username">postgres</systemitem> user
1103 and execute the SQL scripts as shown below (remember to adjust the paths as needed,
1104 where <emphasis>PGSQL_VERSION</emphasis> is your installed PostgreSQL
1105 version, for example <literal>8.3</literal>).</para>
1108 # as the postgres user:
1109 psql -f /usr/share/postgresql/PGSQL_VERSION/contrib/tablefunc.sql evergreen
1110 psql -f /usr/share/postgresql/PGSQL_VERSION/contrib/tsearch2.sql evergreen
1111 psql -f /usr/share/postgresql/PGSQL_VERSION/contrib/pgxml.sql evergreen</userinput>
1114 <step xml:id="serversideinstallation-postgresqlcreateuser">
1115 <title>Create <systemitem class="username">evergreen</systemitem> PostgreSQL user</title>
1116 <para>As the <systemitem class="username">postgres</systemitem>
1117 user on the PostgreSQL system, create a new PostgreSQL user
1118 named <systemitem class="username">evergreen</systemitem> and
1119 assign a password (remember to replace <emphasis>NEWPASSWORD</emphasis>
1120 with an appropriate new password):</para>
1123 # as the postgres user:
1124 createuser -P -s evergreen</userinput>
1126 Enter password for new role: <userinput>NEWPASSWORD</userinput>
1127 Enter it again: <userinput>NEWPASSWORD</userinput></computeroutput>
1131 <title>Create database schema</title>
1132 <para>In this step you will create the database schema and configure your
1133 system with the corresponding database authentication details for the
1134 <emphasis>evergreen</emphasis> database user that you just created in
1135 <xref linkend="serversideinstallation-postgresqlcreateuser"/>.</para>
1136 <para>As the <systemitem class="username">root</systemitem> user, enter
1137 the following commands and replace <emphasis>HOSTNAME, PORT,
1138 PASSWORD</emphasis> and <emphasis>DATABASENAME</emphasis> with appropriate
1143 cd /home/opensrf/Evergreen-ILS-1.6.1.6
1144 perl Open-ILS/src/support-scripts/eg_db_config.pl --update-config \
1145 --service all --create-schema --create-bootstrap --create-offline \
1146 --hostname HOSTNAME --port PORT \
1147 --user evergreen --password PASSWORD --database DATABASENAME</userinput>
1149 <para>On most systems, <emphasis>HOSTNAME</emphasis> will be
1150 <emphasis role="bold">localhost</emphasis> and
1151 <emphasis>PORT</emphasis> will be <emphasis role="bold">5432</emphasis>.
1152 Of course, values for <emphasis>PASSWORD</emphasis> and
1153 <emphasis>DATABASENAME</emphasis> must match the values you used in
1154 <xref linkend="serversideinstallation-postgresqlcreateuser"/>.</para>
1155 <para>As the command executes, you may see warnings similar to:
1156 <literal>ERROR: schema SOMENAME does not exist</literal> (in fact,
1157 you may see one warning per schema) but they can be safely ignored.</para>
1158 <note>If you are entering the above command on a single line, do not
1159 include the <literal>\</literal> (backslash) characters. If you are using
1160 the <command>bash</command> shell, these should only be used at the end of
1161 a line at a <command>bash</command> prompt to indicate that the command is
1162 continued on the next line.</note>
1167 <title>Configure the Apache web server</title>
1169 <primary>web server</primary>
1170 <secondary>Apache</secondary>
1172 <para>In this step you will configure the Apache web server to support Evergreen
1174 <para>First, you must enable some built-in Apache modules and install some
1175 additional Apache configuration files. Then you will create a new Security
1176 Certificate. Finally, you must make several changes to the Apache configuration
1180 <title>Enable the required Apache Modules</title>
1181 <para>As the <systemitem class="username">root</systemitem>
1182 user, enable some modules in the Apache server, then copy the
1183 new configuration files to the Apache server directories:</para>
1185 <primary>Apache modules</primary>
1190 a2enmod ssl # enable mod_ssl
1191 a2enmod rewrite # enable mod_rewrite
1192 a2enmod expires # enable mod_expires</userinput>
1194 <para>As the commands execute, you may see warnings similar to:
1195 <literal>Module SOMEMODULE already enabled</literal> but you can
1196 safely ignore them.</para>
1199 <title>Copy Apache configuration files</title>
1200 <para>You must copy the Apache configuration files from the
1201 Evergreen installation directory to the Apache directory. As the
1202 <systemitem class="username">root</systemitem> user, perform the
1203 following commands:</para>
1207 cd /home/opensrf/Evergreen-ILS-1.6.1.6
1208 cp Open-ILS/examples/apache/eg.conf /etc/apache2/sites-available/
1209 cp Open-ILS/examples/apache/eg_vhost.conf /etc/apache2/
1210 cp Open-ILS/examples/apache/startup.pl /etc/apache2/</userinput>
1213 <step xml:id="serversideinstallation-createsslcertificate">
1214 <title>Create a Security Certificate</title>
1215 <para>In this step you will create a new Security Certificate (SSL Key)
1216 for the Apache server using the <command>openssl</command> command. For a
1217 public production server you must configure or purchase a signed SSL
1218 certificate, but for now you can just use a self-signed certificate and
1219 accept the warnings in the Staff Client and browser during testing and
1220 development. As the <systemitem class="username">root</systemitem> user,
1221 perform the following commands:</para>
1225 mkdir /etc/apache2/ssl
1227 openssl req -new -x509 -days 365 -nodes -out server.crt -keyout server.key</userinput>
1229 <para>You will be prompted for several items of information; enter
1230 the appropriate information for each item. The new files
1231 <filename>server.crt</filename> and <filename>server.key</filename> will
1232 be created in the directory
1233 <filename class="directory">/etc/apache2/ssl</filename> .</para>
1234 <note>This step generates a self-signed SSL certificate. You must install
1235 a proper SSL certificate for a public production system to avoid warning
1236 messages when users login to their account through the OPAC or when staff
1237 login through the Staff Client. For further information on
1238 installing a proper SSL certificate, see
1239 <xref linkend="serversideinstallation-ssl"/>.</note>
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>
1252 replace the line:</para>
1253 <literal>Allow from 10.0.0.0/8</literal>
1254 <para>with the line:</para>
1255 <literal>Allow from all</literal>
1256 <warning>This change allows access to your configuration
1257 CGI scripts from any workstation on any network. This is
1258 only a temporary change to expedite testing and should be
1259 removed after you have finished and successfully tested
1260 the Evergreen installation. See
1261 <xref linkend="serversideinstallation-postinstallation"/>
1262 for further details on removing this change after the
1263 Evergreen installation is complete.
1267 <para>Comment out the line:</para>
1268 <literal>Listen 443</literal>
1269 <para>since it conflicts with the same declaration in
1270 the configuration file:
1271 <filename>/etc/apache2/ports.conf</filename>. Note that
1272 <systemitem class="osname">Debian </systemitem> users
1273 should not do this since the conflict does not apply to
1274 that operating system.</para>
1277 <para>The following updates are needed to allow the logs
1278 to function properly, but it may break other Apache
1279 applications on your server:</para>
1281 <systemitem class="osname">Linux</systemitem> distributions
1282 <systemitem class="osname">Ubuntu Hardy</systemitem> or
1283 <systemitem class="osname">Debian Etch</systemitem>, as
1284 the <systemitem class="username">root</systemitem> user,
1285 edit the Apache configuration file
1286 <filename>/etc/apache2/apache2.conf</filename> and change
1287 the line <literal>User www-data</literal> to <literal>User
1288 opensrf</literal>.</para>
1290 <systemitem class="osname">Linux</systemitem> distributions
1291 <systemitem class="osname">Ubuntu Karmic</systemitem>,
1292 <systemitem class="osname">Ubuntu Lucid</systemitem> or
1293 <systemitem class="osname">Debian Lenny</systemitem>, as
1294 the <systemitem class="username">root</systemitem> user,
1295 edit the Apache configuration file and change the lines:</para>
1298 export APACHE_RUN_USER=www-data
1299 export APACHE_RUN_GROUP=www-data</userinput>
1301 <para>to instead read:</para>
1304 export APACHE_RUN_USER=opensrf
1305 export APACHE_RUN_GROUP=opensrf</userinput>
1310 <systemitem class="username">root</systemitem> user,
1311 edit the Apache configuration file
1312 <filename>/etc/apache2/apache2.conf</filename> and
1313 modify the value for <literal>KeepAliveTimeout</literal>
1314 and <literal>MaxKeepAliveRequests</literal> to match
1315 the following:</para>
1319 MaxKeepAliveRequests 100</userinput>
1323 <para>Further configuration changes to Apache may be
1324 necessary for busy systems. These changes increase the
1325 number of Apache server processes that are started to
1326 support additional browser connections.</para>
1328 <systemitem class="username">root</systemitem> user,
1329 edit the Apache configuration file
1330 <filename>/etc/apache2/apache2.conf</filename>, locate
1331 and modify the section related to <emphasis>prefork
1332 configuration</emphasis> to suit the load on your
1334 <programlisting language="xml"><![CDATA[
1335 <IfModule mpm_prefork_module>
1340 MaxRequestsPerChild 10000
1342 ]]></programlisting>
1347 <title>Enable the Evergreen web site</title>
1348 <para>Finally, you must enable the Evergreen web site. As the
1349 <systemitem class="username">root</systemitem> user, execute the
1350 following Apache configuration commands to disable the default
1351 <emphasis>It Works</emphasis> web page and enable the Evergreen
1352 web site, and then restart the Apache server:</para>
1356 # disable/enable web sites
1359 # restart the server
1360 /etc/init.d/apache2 reload</userinput>
1365 <step xml:id="serversideinstallation-opensrf-config">
1366 <title>Update the OpenSRF Configuration File</title>
1367 <para>As the <systemitem class="username">opensrf</systemitem> user, edit the
1368 OpenSRF configuration file <filename>/openils/conf/opensrf_core.xml</filename>
1369 to update the Jabber usernames and passwords, and to specify the domain from
1370 which we will accept and to which we will make connections.</para>
1371 <para>If you are installing Evergreen on a single server and using the
1372 <systemitem class="domainname">private.localhost</systemitem> /
1373 <systemitem class="domainname">public.localhost</systemitem> domains,
1374 these will already be set to the correct values. Otherwise, search and replace
1375 to match your customized values.</para>
1376 <para>The left-hand side of <xref linkend="serversideinstallation-xpath-table-2"/>
1377 shows common XPath syntax to indicate the approximate position within the XML
1378 file that needs changes. The right-hand side of the table shows the replacement
1380 <table xml:id="serversideinstallation-xpath-table-2">
1381 <?dbfo keep-together="always" ?>
1382 <title>Sample XPath syntax for editing "opensrf_core.xml"</title>
1383 <tgroup align="left" cols="2" colsep="1" rowsep="1">
1384 <colspec colname="Xpath" colnum="1" colwidth="1.6*"/>
1385 <colspec colname="Value" colnum="2" colwidth="2.0*"/>
1388 <entry>XPath location</entry>
1389 <entry>Value</entry>
1394 <entry>/config/opensrf/username</entry>
1396 <systemitem class="username">opensrf</systemitem>
1400 <entry>/config/opensrf/passwd </entry>
1401 <entry><systemitem class="domainname">private.localhost</systemitem>
1403 <systemitem class="username">opensrf</systemitem> user
1407 <entry>/config/gateway/username</entry>
1409 <systemitem class="username">opensrf</systemitem>
1413 <entry>/config/gateway/passwd</entry>
1414 <entry><systemitem class="domainname">public.localhost</systemitem>
1416 <systemitem class="username">opensrf</systemitem> user
1420 <entry>/config/routers/router/transport/username,
1421 first entry where server == public.localhost</entry>
1423 <systemitem class="username">router</systemitem>
1427 <entry>/config/routers/router/transport/password,
1428 first entry where server == public.localhost</entry>
1429 <entry><systemitem class="domainname">public.localhost</systemitem>
1431 <systemitem class="username">router</systemitem> user
1435 <entry>/config/routers/router/transport/username,
1436 second entry where server == private.localhost</entry>
1438 <systemitem class="username">router</systemitem>
1442 <entry>/config/routers/router/transport/password,
1443 second entry where server == private.localhost</entry>
1444 <entry><systemitem class="domainname">private.localhost</systemitem>
1446 <systemitem class="username">router</systemitem> user
1453 <step performance="optional">
1454 <title>(OPTIONAL) Create Configuration Files for Users Needing <command>srfsh</command></title>
1455 <para>When OpenSRF was installed in <xref linkend="serversideinstallation-opensrf"/>, the
1456 software installation automatically created a utility named <command>srfsh</command> (surf
1457 shell). This is a command line diagnostic tool for testing and interacting with
1458 OpenSRF. It will be used in a future step to complete and test the Evergreen installation.
1459 Earlier in <xref linkend="serversideinstallation-srfsh"/> you also created a configuration
1460 file <filename>~/.srfsh.xml</filename> for each user that might need to use the utility.
1461 See <xref linkend="serversideinstallation-testing"/> for further information.</para>
1463 <step xml:id="serversideinstallation-opensrf-env">
1464 <title>Modify the OpenSRF Environment</title>
1465 <para>In this step you will make some minor modifications to the OpenSRF environment:</para>
1468 <para>Modify the permissions in the directory
1469 <filename class="directory">/openils/var/cgi-bin</filename>
1470 to make the files executable:</para>
1473 # as the opensrf user:
1474 chmod 755 /openils/var/cgi-bin/*.cgi</userinput>
1478 <para>As the <systemitem class="username">opensrf</systemitem> user,
1479 modify the shell configuration file <filename>~/.bashrc</filename> for
1480 user <systemitem class="username">opensrf</systemitem> by adding a Perl
1481 environmental variable, then execute the shell configuration file to load
1482 the new variables into your current environment.</para>
1483 <note>In a multi-server environment, you must add any
1484 modifications to <filename>~/.bashrc</filename> to the top of the file
1485 <emphasis>before</emphasis> the line <literal>[ -z "$PS1" ] &&
1486 return </literal>. This will allow headless (scripted) logins to load the
1487 correct environment.</note>
1490 # as the opensrf user:
1491 echo "export PERL5LIB=/openils/lib/perl5:\$PERL5LIB" >> ~/.bashrc
1492 . ~/.bashrc</userinput>
1497 <step performance="optional">
1498 <title>(OPTIONAL) Enable and Disable Language Localizations</title>
1499 <para>You can load translations such as Armenian (hy-AM), Canadian French
1500 (fr-CA), and others into the database to complete the translations available in
1501 the OPAC and Staff Client. For further information, see
1502 <xref linkend="languagesandlocalization"/>.</para>
1506 <section xml:id="serversideinstallation-starting">
1507 <title>Starting Evergreen</title>
1508 <para>In this section you will learn how to start the Evergreen services.
1509 For completeness, instructions for stopping Evergreen can be found later in
1510 <xref linkend="serversideinstallation-stopping"/>.</para>
1513 <para>As the <systemitem class="username">root</systemitem>
1514 user, start the <systemitem class="service">ejabberd</systemitem> and
1515 <systemitem class="service">memcached</systemitem> services as follows:</para>
1519 /etc/init.d/ejabberd start
1520 /etc/init.d/memcached start</userinput>
1524 <para>As the <systemitem class="username">opensrf</systemitem> user,
1525 start Evergreen as follows:</para>
1528 # as the opensrf user:
1529 osrf_ctl.sh -l -a start_all</userinput>
1531 <para>The flag <option>-l</option> forces Evergreen to use
1532 <systemitem class="domainname">localhost</systemitem> (your current system)
1533 as the hostname. The flag <option>-a start_all</option> starts the other
1534 OpenSRF <systemitem class="service">router</systemitem> ,
1535 <systemitem class="service">Perl</systemitem> , and
1536 <systemitem class="service">C</systemitem> services.</para>
1539 <para>You can also start Evergreen without the
1540 <option>-l</option> flag, but the <command>osrf_ctl.sh</command>
1541 utility must know the fully qualified domain name for the system
1542 on which it will execute. That hostname was probably specified
1543 in the configuration file <filename>opensrf.xml</filename> which
1544 you configured in a previous step.</para>
1547 <para>If you receive an error message similar to
1548 <emphasis>osrf_ctl.sh: command not found</emphasis>, then your
1549 environment variable <envar>PATH</envar> does not include the
1550 directory <filename class="directory">/openils/bin</filename>.
1551 As the <systemitem class="username">opensrf</systemitem> user,
1552 edit the configuration file <filename>~/.bashrc</filename> and
1553 add the following line:
1554 <literal>export PATH=$PATH:/openils/bin</literal></para>
1557 <para>If you receive an error message similar to <emphasis>Can't
1558 locate OpenSRF/System.pm in @INC ... BEGIN failed--compilation
1559 aborted</emphasis>, then your environment variable
1560 <emphasis role="bold">PERL5LIB</emphasis> does not include the
1561 directory <filename class="directory">/openils/lib/perl5</filename>.
1562 As the <systemitem class="username">opensrf</systemitem> user,
1563 edit the configuration file <filename>~/.bashrc</filename> and
1564 add the following line:
1565 <literal>export PERL5LIB=$PERL5LIB:/openils/lib/perl5</literal></para>
1570 <para>In this step you will generate the Web files needed by the Staff Client
1571 and catalog, and update the proximity of locations in the Organizational Unit
1572 tree (which allows <emphasis>Holds</emphasis> to work properly).</para>
1573 <para>You must do this the first time you start Evergreen and after making any
1574 changes to the library hierarchy.</para>
1575 <para>As the <systemitem class="username">opensrf</systemitem> user, execute the
1576 following command and review the results:</para>
1579 # as the opensrf user:
1581 ./autogen.sh -c /openils/conf/opensrf_core.xml -u</userinput>
1583 Updating Evergreen organization tree and IDL using '/openils/conf/opensrf_core.xml'
1584 Updating fieldmapper
1585 Updating web_fieldmapper
1587 removing OrgTree from the cache for locale hy-AM...
1588 removing OrgTree from the cache for locale cs-CZ...
1589 removing OrgTree from the cache for locale en-CA...
1590 removing OrgTree from the cache for locale en-US...
1591 removing OrgTree from the cache for locale fr-CA...
1592 removing OrgTree from the cache for locale ru-RU...
1593 Updating OrgTree HTML
1594 Updating locales selection HTML
1595 Updating Search Groups
1596 Refreshing proximity of org units
1597 Successfully updated the organization proximity
1598 Done</computeroutput>
1602 <para>As the <systemitem class="username">root</systemitem> user, restart the
1603 Apache Web server:</para>
1607 /etc/init.d/apache2 restart</userinput>
1609 <note>If the Apache Web server was running when you started the OpenSRF
1610 services, you might not be able to successfully log into the OPAC or Staff
1611 Client until the Apache Web server has been restarted.</note>
1615 <section xml:id="serversideinstallation-testing">
1616 <title>Testing Your Evergreen Installation</title>
1617 <para>This section describes several simple tests you can perform to verify that the Evergreen
1618 server-side software has been installed and configured properly and is running as
1620 <simplesect xml:id="serversideinstallation-testing-connections">
1621 <title>Testing Connections to Evergreen</title>
1622 <para>Once you have installed and started Evergreen, test your connection to Evergreen. Start the
1623 <command>srfsh</command> application and try logging onto the Evergreen server using the default
1624 administrator username and password. Following is sample output generated by executing
1625 <command>srfsh</command> after a successful Evergreen installation. For help with
1626 <command>srfsh</command> commands, type <userinput>help</userinput> at the prompt.
1627 As the <systemitem class="username">opensrf</systemitem> user,
1628 execute the following commands to test your Evergreen connection:</para>
1631 # as the opensrf user:
1632 /openils/bin/srfsh</userinput>
1634 srfsh% <userinput>login admin open-ils</userinput>
1635 Received Data: "250bf1518c7527a03249858687714376"
1636 ------------------------------------
1637 Request Completed Successfully
1638 Request Time in seconds: 0.045286
1639 ------------------------------------
1642 "textcode":"SUCCESS",
1645 "stacktrace":"oils_auth.c:304",
1647 "authtoken":"e5f9827cc0f93b503a1cc66bee6bdd1a",
1651 ------------------------------------
1652 Request Completed Successfully
1653 Request Time in seconds: 1.336568
1654 ------------------------------------</computeroutput>
1656 <para>If this does not work, try the following:</para>
1659 <para>As the <systemitem class="username">opensrf</systemitem> user, run the
1660 <filename>settings-tester.pl</filename> utility to review your Evergreen
1661 installation for any system configuration problems:</para>
1664 # as the opensrf user:
1666 ./Evergreen-ILS-1.6.1.6/Open-ILS/src/support-scripts/settings-tester.pl</userinput>
1668 <para>If the output of <command>settings-tester.pl</command> does not help you
1669 find the problem, please do not make any significant changes to your
1670 configuration.</para>
1673 <para>Follow the steps in the troubleshooting guide in
1674 <xref linkend="troubleshooting"/>.</para>
1677 <para>If you have followed the entire set of installation steps listed here
1678 closely, you are probably extremely close to a working system. Gather your
1679 configuration files and log files and contact the
1680 <ulink url="http://open-ils.org/listserv.php">Evergreen Development Mailing List</ulink>
1681 list for assistance before making any drastic changes to your system
1682 configuration.</para>
1686 <simplesect xml:id="serversideinstallation-running-staffclient">
1687 <title>Testing the Staff Client on Linux</title>
1688 <para>In this section you will confirm that a basic login on the Staff Client works
1690 <para>Run the Evergreen Staff Client on a Linux system by using the application
1691 <emphasis>XULRunner</emphasis> (installed automatically and by default with Firefox
1692 version 3.0 and later on Ubuntu and Debian distributions).</para>
1693 <para>As the <systemitem class="username">root</systemitem> user, start the Staff Client
1698 xulrunner /home/opensrf/Evergreen-ILS-1.6.1.6/Open-ILS/xul/staff_client/build/application.ini</userinput>
1700 <para>A login screen for the Staff Client similar to this should appear:</para>
1702 <alt>Logging into the Staff Client</alt>
1704 <imagedata fileref="../media/serversideinstallation-staffclient-running-1.png" format="PNG" scalefit="1" width="70%"/>
1707 <para>First, add the name of your Evergreen server to the field
1708 <literal>Hostname</literal> in the <literal>Server</literal> section. You will probably
1709 want to use <literal>127.0.0.1</literal>. After adding the server name, click Re-Test
1710 Server. You should now see the messages <literal>200:OK</literal> in the fields
1711 <literal>Status</literal> and <literal>Version</literal>.</para>
1712 <para>Because this is the initial run of the Staff Client, you will see a warning in the
1713 upper-right saying: <emphasis role="bold">Not yet configured for the specified
1714 server</emphasis>. To continue, you must assign a workstation name. Refer to
1715 <xref linkend="staffclientinstallation-workstationnames"/> for further details.</para>
1716 <para>Try to log into the Staff Client with the username <literal>admin</literal> and
1717 the password <literal>open-ils</literal>. If the login is successful, you will see the
1718 following screen:</para>
1720 <alt>Logging into the Staff Client</alt>
1722 <imagedata fileref="../media/serversideinstallation-staffclient-running-4.png" format="PNG" scalefit="1" width="70%"/>
1725 <para>Otherwise, you may need to click <guibutton>'Add SSL Exception'</guibutton> in the
1726 main window. You should see a popup window titled <literal>Add Security Exception</literal>:</para>
1728 <alt>Adding an SSL Exception in the Staff Client</alt>
1730 <imagedata fileref="../media/serversideinstallation-staffclient-running-2.png" format="PNG" scalefit="1" width="70%"/>
1733 <para>Click <guibutton>'Get Certificate'</guibutton>, then click <guibutton>'Confirm
1734 Security Exception'</guibutton>, then click <guibutton>'Re-Test Server'</guibutton> in the
1735 main window and try to log in again.</para>
1737 <simplesect xml:id="serversideinstallation-starting-apache-server">
1738 <title>Testing the Apache Web Server</title>
1739 <para>In this section you will test the Apache configuration file(s), then restart the
1740 Apache web server.</para>
1741 <para>As the <emphasis role="bold">root</emphasis> user, execute the following
1742 commands. Note the use of <emphasis>restart</emphasis> to force the new Evergreen
1743 modules to be reloaded even if the Apache server is already running. Any problems found
1744 with your configuration files should be displayed:</para>
1748 apache2ctl configtest && /etc/init.d/apache2 restart</userinput>
1751 <simplesect xml:id="serversideinstallation-stopping">
1752 <title>Stopping Evergreen</title>
1753 <para>In <xref linkend="serversideinstallation-starting"/> you learned how to start the
1754 Evergreen services. For completeness, following are instructions for stopping the
1755 Evergreen services.</para>
1756 <para>As the <systemitem class="username">opensrf</systemitem> user, stop all Evergreen
1757 services by using the following command:</para>
1760 # as the opensrf user
1761 # stop the server; use "-l" to force hostname to be "localhost"
1762 osrf_ctl.sh -l -a stop_all</userinput>
1764 <note>You can also stop Evergreen services <emphasis role="bold">without</emphasis> the
1765 <option>-l</option> flag, but the <command>osrf_ctl.sh</command> utility must know the
1766 fully qualified domain name for the system on which it will execute. That hostname may
1767 have been specified in the configuration file <filename>opensrf.xml</filename>, which
1768 you configured in a previous step.</note>
1771 <section xml:id="serversideinstallation-postinstallation">
1772 <title>Post-Installation Chores</title>
1773 <para>There are several additional steps you may need to complete after Evergreen has been
1774 successfully installed and tested. Some steps may not be needed (e.g., setting up support for
1777 <title>Remove temporary Apache configuration changes</title>
1778 <para>You modified the Apache configuration file
1779 <filename>/etc/apache2/sites-available/eg.conf</filename> in an earlier step as a
1780 temporary measure to expedite testing (see
1781 <xref linkend="serversideinstallation-modify-apache"/> for further information).
1782 Those changes must now be reversed in order to deny unwanted access to your
1783 CGI scripts from users on other public networks.</para>
1786 <emphasis>This temporary network update was done to expedite
1787 testing. You <emphasis role="bold">must</emphasis> correct
1788 this for a public production system.</emphasis>
1791 <para>As the <systemitem class="username">root</systemitem> user, edit the configuration
1792 file again and comment out the line <literal>Allow from all</literal> and uncomment the
1793 line <literal>Allow from 10.0.0.0/8</literal>, then change it to match your network
1794 address scheme.</para>
1796 <section xml:id="serversideinstallation-ssl">
1797 <title>Configure a permanent SSL key</title>
1798 <para>You used the command <command>openssl</command> in an earlier step to
1799 temporarily create a new SSL key for the Apache server (see
1800 <xref linkend="serversideinstallation-createsslcertificate"/> for further
1801 information). This self-signed security certificate was adequate during
1802 testing and development, but will continue to generate warnings in the Staff
1803 Client and browser. For a public production server you should configure or
1804 purchase a signed SSL certificate.</para>
1805 <para>There are several open source software solutions that provide schemes to
1806 generate and maintain public key security certificates for your library
1807 system. Some popular projects are listed below; please review them for
1808 background information on why you need such a system and how you can provide
1812 <ulink url="http://www.openca.org/projects/openca/">http://www.openca.org/projects/openca/</ulink>
1815 <ulink url="http://sourceforge.net/projects/ejbca/">http://sourceforge.net/projects/ejbca/</ulink>
1818 <ulink url="http://pki.fedoraproject.org">http://pki.fedoraproject.org</ulink>
1823 <emphasis>The temporary SSL key was only created to expedite
1824 testing. You should install a proper SSL certificate for a public
1825 production system.</emphasis>
1830 <title>(OPTIONAL) Set Up Support For Reports</title>
1831 <para>Evergreen reports are extremely powerful but require some simple configuration.
1832 See <xref linkend="report_starting_reporter_service"/> for information on starting and
1833 stopping the Reporter daemon processes.</para>
1836 <section xml:id="serversideinstallation-virtual">
1837 <title>Installing In Virtualized <systemitem class="osname">Linux</systemitem> Environments</title>
1838 <para>This section describes the installation of Evergreen software in so-called
1839 "virtualized" software environments running on the
1840 <systemitem class="osname">Microsoft Windows</systemitem> operating system.
1841 Evergreen software runs as a native application
1842 on any of several well-known x86 (32-bit) and x86-64 (64-bit)
1843 <systemitem class="osname">Linux</systemitem> distributions including
1844 <systemitem class="osname">Ubuntu</systemitem> and
1845 <systemitem class="osname">Debian</systemitem>, but will not run directly on
1846 the <systemitem class="osname">Microsoft Windows</systemitem> operating system.
1847 Instead, Evergreen executes within an encapsulated virtual
1848 <systemitem class="osname">Linux</systemitem> "guest" installation,
1849 which itself executes directly on <systemitem class="osname">Windows</systemitem>.
1850 The <systemitem class="osname">Linux</systemitem> environment is fully emulated
1851 and acts (within limits) just as if it were executing on a real standalone system.</para>
1852 <para>This technique of emulating a <systemitem class="osname">Linux</systemitem>
1853 environment on a <systemitem class="osname">Windows</systemitem> host is a practical
1854 way to install and run an Evergreen system if it is not possible to dedicate a
1855 physical machine solely as a <systemitem class="osname">Linux</systemitem> host, but
1856 the architecture is not recommended for large scale systems. There are performance
1857 limitations to running Evergreen in a virtualized environment, since the
1858 virtualization application itself consumes memory and contributes to the CPU load on
1859 the <systemitem class="osname">Windows</systemitem> host system. The emulated
1860 Evergreen environment will execute more slowly than if it were a standalone system.
1861 However, it is still a reasonable architecture for smaller experimental systems or as
1862 a proof of concept.</para>
1864 <title>Installing Virtualization Software</title>
1865 <para>As described above, Evergreen can be installed on top of an emulated
1866 <systemitem class="osname">Linux</systemitem> environment which, in turn,
1867 is installed on top of a software application such as
1868 <application>"VirtualBox"</application> or <application>"VMware"</application>
1869 executing on <systemitem class="osname">Windows</systemitem>.
1870 This section contains step-by-step examples on installing popular virtualization
1871 applications on a <systemitem class="osname">Windows</systemitem> host system.
1872 Following this section are further descriptions of installing
1873 <systemitem class="osname">Linux</systemitem> and Evergreen systems on top
1874 of that virtualization software.</para>
1875 <section xml:id="serversideinstallation-virtual-vbox-install">
1876 <title>Installing <application>"VirtualBox"</application> Virtualization Software</title>
1877 <para>This section reviews installation of the
1878 <application>"VirtualBox"</application> application on
1879 <systemitem class="osname">WindowsXP Professional (SP3)</systemitem>.
1880 Download the latest version of the
1881 <application>VirtualBox</application> from the official website:
1882 <ulink url="http://www.virtualbox.org/wiki/Downloads">
1883 http://www.virtualbox.org/wiki/Downloads</ulink>,
1884 then run the executable file. Continue with the steps shown in the
1885 next five figures until the software has been successfully
1886 installed. The following example shows the installation of VirtualBox
1887 version 3.8.2 .</para>
1889 <title>Starting the Windows installation of <application>VirtualBox</application></title>
1892 <imagedata fileref="../media/serversideinstallation-virtual-vbox-install-1.png" scalefit="0" width="70%"/>
1897 <title>Welcome to <application>VirtualBox</application> setup wizard</title>
1900 <imagedata fileref="../media/serversideinstallation-virtual-vbox-install-2.png" scalefit="0" width="70%"/>
1905 <title>Accept the license agreement</title>
1908 <imagedata fileref="../media/serversideinstallation-virtual-vbox-install-3.png" scalefit="0" width="70%"/>
1913 <title>Waiting for installation to complete</title>
1916 <imagedata fileref="../media/serversideinstallation-virtual-vbox-install-4.png" scalefit="0" width="70%"/>
1921 <title>Installation is complete; start <application>VirtualBox</application></title>
1924 <imagedata fileref="../media/serversideinstallation-virtual-vbox-install-5.png" scalefit="0" width="70%"/>
1928 <para>At this point, <application>VirtualBox</application> has been
1929 installed and started for the first time. Please continue with
1930 <xref linkend="serversideinstallation-virtual-install-linux-ev"/>
1931 for further instructions on the next step: installing the
1932 <systemitem class="osname">Linux</systemitem> / Evergreen distribution.</para>
1935 <title>Installing <application>"VMware"</application> Virtualization Software</title>
1936 <para>For instructions on installing <application>VMware</application>,
1937 visit the official website <ulink url="http://www.vmware.com/">
1938 http://www.vmware.com/</ulink>. Then continue with
1939 <xref linkend="serversideinstallation-virtual-install-linux-ev"/> for
1940 further instructions on the next step: installing the
1941 <systemitem class="osname">Linux</systemitem> / Evergreen distribution.</para>
1944 <section xml:id="serversideinstallation-virtual-install-linux-ev">
1945 <title>Installing <systemitem class="osname">Linux</systemitem>
1946 / Evergreen on Virtualization Software</title>
1947 <para>After the virtualization software is installed and running, there are
1948 two ways to continue with installing
1949 <systemitem class="osname">Linux</systemitem> and Evergreen software in the new
1950 virtualized environment:</para>
1953 <para>Download and install a prebuilt software image that
1955 <systemitem class="osname">Linux</systemitem> / Evergreen
1957 <xref linkend="serversideinstall-virtual-prebuilt"/> for
1961 <para>Manually install a
1962 <systemitem class="osname">Linux</systemitem> guest system,
1963 then manually install Evergreen on it (see
1964 <xref linkend="serversideinstall-virtual-manual"/> for
1968 <para>We review each method in the following sections.</para>
1969 <section xml:id="serversideinstall-virtual-prebuilt">
1970 <title>Download and install a prebuilt software image</title>
1971 <para>You can download a prebuilt software image that, when installed
1972 on your virtualization software, emulates a
1973 <systemitem class="osname">Linux</systemitem> guest system containing
1974 a running Evergreen distribution. The image is essentially a snapshot
1975 of a hard disk from a fully configured, functional
1976 <systemitem class="osname">Linux</systemitem> system with Evergreen
1977 already installed. It is even possible to install a software image
1978 that is preloaded with useful data, e.g., Gutenberg records.</para>
1979 <para>We recommend this approach if you wish to get Evergreen running
1980 quickly with minimal attention to configuration. After adjusting only
1981 a few configuration details you can have a working Evergreen system
1982 that integrates smoothly with the rest of your network. See
1983 <xref linkend="serversideinstall-virtual-versions"/> for a list of
1984 prebuilt software images that are currently available to download and
1986 <note>Evergreen servers and staff clients must match. For example, if
1987 you are running server version 1.4.0.1, you should use version 1.4.0.1
1988 of the staff client.</note>
1989 <note>DISCLAIMER: The following virtual images have been contributed
1990 by members of the Evergreen community for the purposes of testing,
1991 evaluation, training, and development.</note>
1992 <table xml:id="serversideinstall-virtual-versions">
1993 <?dbfo keep-together="always" ?>
1994 <title>Linux / Evergreen Virtual Images</title>
1995 <tgroup align="left" cols="4" colsep="1" rowsep="1">
1996 <colspec colname="Linux_version" colnum="1" colwidth="2*"/>
1997 <colspec colname="EV_version" colnum="2" colwidth="1*"/>
1998 <colspec colname="download_link" colnum="3" colwidth="1*"/>
1999 <colspec colname="comments" colnum="4" colwidth="3*"/>
2002 <entry>Linux Version</entry>
2003 <entry>Evergreen Version</entry>
2004 <entry>Image</entry>
2005 <entry>Comments</entry>
2010 <entry>Debian "Lenny" (5.0)</entry>
2011 <entry>1.6.1.4</entry>
2012 <entry><ulink url="http://www.open-ils.org/~denials/Evergreen_1_6_1_4_Lenny.zip">
2013 download</ulink></entry>
2014 <entry>VirtualBox image (no preloaded data)</entry>
2017 <entry>Debian "Lenny" (5.0)</entry>
2018 <entry>1.6.0.1</entry>
2019 <entry><ulink url="http://www.open-ils.org/~denials/Evergreen1601_DebianLenny.zip">
2020 download</ulink></entry>
2021 <entry>VirtualBox image (no preloaded data)</entry>
2024 <entry>Ubuntu "Karmic Koala" (9.10)</entry>
2025 <entry>1.6.0.0</entry>
2026 <entry><ulink url="http://www.open-ils.org/~denials/Evergreen-1600-Karmic.zip">
2027 download</ulink></entry>
2028 <entry>VirtualBox image (no preloaded data)</entry>
2031 <entry>Ubuntu "Hardy Heron" (8.04)</entry>
2032 <entry>1.2.3.1</entry>
2033 <entry><ulink url="http://open-ils.org/~denials/Ubuntu804.zip">
2034 download</ulink></entry>
2035 <entry>VirtualBox image (no preloaded data)</entry>
2038 <entry>Debian Etch (4.0)</entry>
2039 <entry>1.2.2.3</entry>
2040 <entry><ulink url="http://evergreen-ils.org/~denials/Evergreen_Debian_1.2.2.3.zip">
2041 download</ulink></entry>
2042 <entry>VMware image (preloaded with 13,000 Gutenberg records)</entry>
2045 <entry>Ubuntu "Gutsy Gibbon" (7.10)</entry>
2046 <entry>1.2.1.4</entry>
2047 <entry><ulink url="http://www.open-ils.org/downloads/vmware/Evergreen_1.2.1.4_on_Ubuntu_7.10.zip">
2048 download</ulink></entry>
2049 <entry>VMware image, contributed by
2050 <ulink url="http://library.calvin.edu/">
2051 the Hekman Library, Calvin College</ulink></entry>
2054 <entry>Gentoo</entry>
2055 <entry>1.1.5</entry>
2057 <ulink url="http://www.open-ils.org/~denials/Evergreen_1.1.5_Gentoo_x86.zip">
2060 <entry>VMware image on Gentoo, courtesy of
2061 <ulink url="http://coffeecode.net/">Dan Scott</ulink>,
2062 <ulink url="http://laurentian.ca/library">Laurentian University</ulink>
2063 (file size is 1.1GB)</entry>
2068 <para>For the following example, we have already installed the
2069 <application>VirtualBox</application> application (see
2070 <xref linkend="serversideinstallation-virtual-vbox-install"/> for details).
2071 Continue with the steps as shown; refer to the accompanying figures for further
2075 <para>Start VirtualBox for the first time and select
2077 <guimenu>File</guimenu>
2078 <guimenuitem>VirtualBox Media Manager</guimenuitem>
2079 <guimenuitem>Add</guimenuitem>
2081 to locate the prebuilt software image just downloaded (the
2082 example shows it was extracted from the original
2083 <literal>.ZIP</literal> file into a temporary directory
2084 <literal>C:\temp</literal>). See
2085 <xref linkend="serversideinstallation-virtual-vm-install-2"/>
2089 <para>After selecting the file, click
2090 <guibutton>Open</guibutton> to import it (see
2091 <xref linkend="serversideinstallation-virtual-vm-install-3"/>
2092 for details).</para>
2095 <para>Then click <guibutton>OK</guibutton> to save the
2096 selection and return to the VirtualBox Media Manager (see
2097 <xref linkend="serversideinstallation-virtual-vm-install-4"/>
2098 for details).</para>
2101 <para>Click <guibutton>New</guibutton> to start the "Virtual
2102 Machine Wizard", then <guibutton>Next</guibutton> to continue
2103 and create a new virtual machine (VM)
2104 <xref linkend="serversideinstallation-virtual-vm-install-5"/>).</para>
2107 <para>Create a new name for the VM and set the operating
2108 system type, then click <guibutton>Next</guibutton> (see
2109 <xref linkend="serversideinstallation-virtual-vm-install-6"/>).</para>
2112 <para>Set the memory size (we chose the default value of
2113 512Mb), then click <guibutton>Next</guibutton> (see
2114 <xref linkend="serversideinstallation-virtual-vm-install-7"/>).</para>
2117 <para>Edit the Virtual Hard Disk configuration settings; click
2118 the radio boxes "Boot Hard Disk" and "Use existing hard disk"
2119 and ensure that the disk name "Evergreen1601_DebianLenny.vmdk"
2120 is selected. Click <guibutton>Finish</guibutton> to finish the
2122 <xref linkend="serversideinstallation-virtual-vm-install-8"/>).</para>
2125 <para>Install the <application>VirtualBox Guest
2126 Additions</application> (really a required upgrade to
2130 <para>Return to VirtualBox and see the summary of the VM just created
2131 (see <xref linkend="serversideinstallation-virtual-vm-install-9"/>
2132 and <xref linkend="serversideinstallation-virtual-vm-install-10"/>).
2133 Click <guibutton>Start</guibutton> to boot the new VM, then
2134 log in with username <literal>root</literal> and
2135 password <literal>evergreen</literal> to continue.</para>
2138 <para>At this point you have a running
2139 <systemitem class="osname">Linux</systemitem> / Evergreen system.
2140 If you need to modify the Evergreen configuration in any way, review
2141 the sectons of the standard Evergreen installation instructions in
2142 <xref linkend="serversideinstallation-ubuntudebian"/> that deal with
2143 configuration.</para>
2144 <figure xml:id="serversideinstallation-virtual-vm-install-2">
2145 <title>Starting <application>VirtualBox</application> for the first time</title>
2148 <imagedata fileref="../media/serversideinstallation-virtual-vm-install-2.png" scalefit="0" width="60%"/>
2152 <figure xml:id="serversideinstallation-virtual-vm-install-3">
2153 <title>Selecting the software image in Virtual Media Manager</title>
2156 <imagedata fileref="../media/serversideinstallation-virtual-vm-install-3.png" scalefit="0" width="60%"/>
2160 <figure xml:id="serversideinstallation-virtual-vm-install-4">
2161 <title>New software image added to <application>VirtualBox</application></title>
2164 <imagedata fileref="../media/serversideinstallation-virtual-vm-install-4.png" scalefit="0" width="40%"/>
2168 <figure xml:id="serversideinstallation-virtual-vm-install-5">
2169 <title>Creating a new VM</title>
2172 <imagedata fileref="../media/serversideinstallation-virtual-vm-install-5.png" scalefit="0" width="50%"/>
2176 <figure xml:id="serversideinstallation-virtual-vm-install-6">
2177 <title>Setting the VM name and OS type</title>
2180 <imagedata fileref="../media/serversideinstallation-virtual-vm-install-6.png" scalefit="0" width="50%"/>
2184 <figure xml:id="serversideinstallation-virtual-vm-install-7">
2185 <title>Setting memory size</title>
2188 <imagedata fileref="../media/serversideinstallation-virtual-vm-install-7.png" scalefit="0" width="50%"/>
2192 <figure xml:id="serversideinstallation-virtual-vm-install-8">
2193 <title>Setting up the Virtual Hard Disk</title>
2196 <imagedata fileref="../media/serversideinstallation-virtual-vm-install-8.png" scalefit="0" width="50%"/>
2200 <figure xml:id="serversideinstallation-virtual-vm-install-9">
2201 <title>Finishing definition of new VM</title>
2204 <imagedata fileref="../media/serversideinstallation-virtual-vm-install-9.png" scalefit="0" width="50%"/>
2209 <figure xml:id="serversideinstallation-virtual-vm-install-10">
2210 <title>Summary of the new VM</title>
2213 <imagedata fileref="../media/serversideinstallation-virtual-vm-install-10.png" scalefit="0" width="50%"/>
2218 <section xml:id="serversideinstall-virtual-manual">
2219 <title>Manually install <systemitem class="osname">Linux</systemitem> and Evergreen</title>
2220 <para>Instead of installing a pre-built, pre-configured virtual image
2221 of <systemitem class="osname">Linux</systemitem> containing the
2222 Evergreen software, you could also manually install a
2223 <systemitem class="osname">Linux</systemitem> guest system, then install
2224 Evergreen from scratch on that system.</para>
2225 <para>We recommend this approach if you need to specially configure
2226 either the <systemitem class="osname">Linux</systemitem> system or
2227 Evergreen itself. This will require a detailed review of both
2228 <systemitem class="osname">Linux</systemitem> and Evergreen
2229 configuration details. You are essentially doing a normal Evergreen
2230 installation on a <systemitem class="osname">Linux</systemitem>
2231 system; it just happens that
2232 <systemitem class="osname">Linux</systemitem> is running within a
2233 virtualized environment on a <systemitem class="osname">Windows</systemitem>
2234 system. See <xref linkend="serversideinstallation-ubuntudebian"/> for
2235 information on the normal Evergreen installation, then continue with this
2237 <para>For the following example, we have already installed the
2238 <application>VirtualBox</application> application (see
2239 <xref linkend="serversideinstallation-virtual-vbox-install"/> for details).
2240 Continue with the steps as shown; refer to the accompanying figures
2241 for further information:</para>
2244 <para>Download and install an appropriate version of the
2245 standard <systemitem class="osname">Ubuntu</systemitem> software
2246 distribution on <application>"VirtualBox"</application>.</para>
2249 <para>Start (boot) <systemitem class="osname">Ubuntu</systemitem>.</para>
2252 <para>Install Evergreen on the
2253 <systemitem class="osname">Ubuntu</systemitem> system.</para>
2258 <title>Summary</title>
2259 <para>Whether you install a pre-built, pre-configured virtual image of
2260 <systemitem class="osname">Linux</systemitem> already containing the
2261 Evergreen software (see <xref linkend="serversideinstall-virtual-prebuilt"/>),
2262 or you install a plain virtual
2263 image <systemitem class="osname">Linux</systemitem> and then install
2264 Evergreen from scratch (see <xref linkend="serversideinstall-virtual-manual"/>),
2265 your <systemitem class="osname">Windows</systemitem> system is now hosting
2266 an <systemitem class="osname">Ubuntu</systemitem> system, which itself is
2267 hosting the Evergreen distribution. So far as Evergreen is concerned,
2268 it is happily executing in a standard
2269 <systemitem class="osname">Ubuntu</systemitem> environment and should
2270 behave as if it were executing on a standalone
2271 <systemitem class="osname">Ubuntu</systemitem> system.</para>