]> git.evergreen-ils.org Git - working/Evergreen.git/blob - 1.6/admin/serversideinstallation.xml
2160988ebf5e82f21993699370fd86b12407f715
[working/Evergreen.git] / 1.6 / admin / serversideinstallation.xml
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">
3         <info>
4                 <title>Server-side Installation of Evergreen Software</title>
5                 <abstract>
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>
9                 </abstract>
10         </info>
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
14         system.</para>
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
32         listed here:</para>
33         <table xml:id="serversideinstall-software-dependencies">
34                 <title>Evergreen Software Dependencies</title>
35                 <indexterm>
36                         <primary>Evergreen software dependencies</primary>
37                 </indexterm>
38                 <tgroup align="left" cols="3" colsep="1" rowsep="1">
39                         <colspec colname="Evergreen" colnum="1" colwidth="1.0*"/>
40                         <colspec colname="OpenSRF" colnum="2" colwidth="1.0*"/>
41                         <colspec colname="PostgreSQL" colnum="3" colwidth="1.0*"/>
42                         <thead>
43                                 <row>
44                                         <entry>Evergreen</entry>
45                                         <entry>OpenSRF</entry>
46                                         <entry>PostgreSQL</entry>
47                                 </row>
48                         </thead>
49                         <tbody>
50                                 <row>
51                                         <entry>1.6.1.x</entry>
52                                         <entry>1.4.0</entry>
53                                         <entry>8.2 / 8.3</entry>
54                                 </row>
55                                 <row>
56                                         <entry>1.6.0.x</entry>
57                                         <entry>1.2</entry>
58                                         <entry>8.2 / 8.3</entry>
59                                 </row>
60                                 <row>
61                                         <entry>1.4.x</entry>
62                                         <entry>1.0</entry>
63                                         <entry>8.1 / 8.2</entry>
64                                 </row>
65                                 <row>
66                                         <entry>1.2.x</entry>
67                                         <entry>0.9</entry>
68                                         <entry>8.1 / 8.2</entry>
69                                 </row>
70                         </tbody>
71                 </tgroup>
72         </table>
73         <section xml:id="serversideinstallation-all">
74                 <title>Installing Server-Side Software</title>
75                 <para>This section describes the installation of the major components of Evergreen server-side software.</para>
76                 <para>As far as possible, you should perform the following steps in the exact order given since the
77                 success of many steps relies on the successful completion of earlier steps. You should make backup
78                 copies of files and environments when you are instructed to do so. In the event of installation problems
79                 those copies can allow you to back out of a step gracefully and resume the installation from a known
80                 state. See <xref linkend="backingup"/> for further information.</para>
81                 <para>Of course, after you successfully complete and test the entire Evergreen installation you should
82                 take a final snapshot backup of your system(s). This can be the first in the series of regularly
83                 scheduled system backups that you should probably also begin.</para>
84                 <section xml:id="serversideinstallation-opensrf">
85                         <indexterm>
86                                 <primary>OpenSRF</primary>
87                                 <secondary>installation</secondary>
88                         </indexterm>
89                         <title>Installing OpenSRF 1.4.x On <systemitem class="osname">Ubuntu</systemitem> or
90                                 <systemitem class="osname">Debian</systemitem></title>
91                         <indexterm>
92                                 <primary>Linux</primary>
93                                 <secondary>Debian</secondary>
94                         </indexterm>
95                         <indexterm>
96                                 <primary>Linux</primary>
97                                 <secondary>Ubuntu</secondary>
98                         </indexterm>
99                         <para>This section describes the installation of the latest version of the Open Service Request
100                         Framework (OpenSRF), a major component of the Evergreen server-side software, on 
101                         <systemitem class="osname">Ubuntu</systemitem> or <systemitem class="osname">Debian</systemitem>
102                         systems. Evergreen software is integrated with and depends on the OpenSRF software
103                         system.</para>
104                         <para>Follow the steps outlined here and run the specified tests to ensure that OpenSRF is
105                         properly installed and configured. Do <emphasis><emphasis role="bold">not</emphasis></emphasis>
106                         continue with any further Evergreen installation steps
107                         until you have verified that OpenSRF has been successfully installed and tested.</para>
108                         <note>
109                                 <para>The following steps have been tested on the x86 (32-bit) and x86-64 (64-bit)
110                                 platforms. OpenSRF 1.4.0 has been tested on <systemitem class="osname">Debian Etch
111                                 (4.0)</systemitem>, <systemitem class="osname">Debian Lenny (5.0)</systemitem> and
112                                 <systemitem class="osname">Ubuntu Lucid Lynx (10.04)</systemitem>.</para>
113                                 <para>In the following instructions, you are asked to perform certain steps as 
114                                 either the <systemitem class="username">root</systemitem> user, the 
115                                 <systemitem class="username">opensrf</systemitem> user, or the 
116                                 <systemitem class="username">postgres</systemitem> user.</para>
117                                 <itemizedlist>
118                                         <listitem>
119                                                 <para><systemitem class="osname">Debian</systemitem> -- To become the
120                                                 <systemitem class="username">root</systemitem> user, issue the command
121                                                 <command>su -</command> and enter the password of the
122                                                 <systemitem class="username">root</systemitem> user.</para>
123                                         </listitem>
124                                         <listitem>
125                                                 <para><systemitem class="osname">Ubuntu</systemitem> -- To become the
126                                                 <systemitem class="username">root</systemitem> user, issue the command
127                                                 <command>sudo su -</command> and enter the password of the 
128                                                 <systemitem class="username">root</systemitem> user.</para>
129                                         </listitem>
130                                 </itemizedlist>
131                                 <para>To switch from the <systemitem class="username">root</systemitem> user to a
132                                 different user, issue the command <command>su - USERNAME</command>. For example, to
133                                 switch from the <systemitem class="username">root</systemitem> user to the 
134                                 <systemitem class="username">opensrf</systemitem> user, issue the command 
135                                 <command>su - opensrf</command>. Once you have become a non-root user, to become 
136                                 the <systemitem class="username">root</systemitem> user again, simply issue the command
137                                 <command>exit</command>.</para>
138                         </note>
139                         <procedure>
140                                 <step>
141                                         <title>Add New <systemitem class="username">opensrf</systemitem> User</title>
142                                         <para>As the <systemitem class="username">root</systemitem> user, add the
143                                         <systemitem class="username">opensrf</systemitem> user to the system.
144                                         In the following example, the default shell for the 
145                                         <systemitem class="username">opensrf</systemitem> user is automatically set
146                                         to <command>/bin/bash</command> to inherit a reasonable environment:</para>
147                                         <screen>
148                                                 <prompt># as the root user:</prompt>
149                                                 <userinput>useradd -m -s /bin/bash opensrf</userinput>
150                                                 <userinput>passwd opensrf</userinput>
151                                         </screen>
152                                 </step>
153                                 <step>
154                                         <title>Download and Unpack Latest OpenSRF Version</title>
155                                         <indexterm>
156                                                 <primary>OpenSRF</primary>
157                                                 <secondary>download</secondary>
158                                         </indexterm>
159                                         <para>The latest version of OpenSRF can be found here:
160                                         <ulink url="http://evergreen-ils.org/downloads/OpenSRF-1.4.0.tar.gz"></ulink> .
161                                         As the <systemitem class="username">opensrf</systemitem> user, change to
162                                         the directory <filename class="directory">/home/opensrf</filename> then download
163                                         and extract OpenSRF. The new subdirectory
164                                         <filename class="directory">/home/opensrf/OpenSRF-1.4.0</filename> will be created:</para>
165                                         <screen>
166                                                 <prompt># as the opensrf user:</prompt>
167                                                 <userinput>cd /home/opensrf</userinput>
168                                                 <userinput>wget http://evergreen-ils.org/downloads/OpenSRF-1.4.0.tar.gz</userinput>
169                                                 <userinput>tar zxf OpenSRF-1.4.0.tar.gz</userinput>
170                                         </screen>
171                                 </step>
172                                 <step>
173                                         <title>Install Prerequisites to Build OpenSRF</title>
174                                         <para>In this section you will install and configure a set of prerequisites that will be
175                                         used to build OpenSRF. In a following step you will actually build the OpenSRF software 
176                                         using the <command>make</command> utility.</para>
177                                         <para>As the <systemitem class="username">root</systemitem> user, enter the commands show
178                                         below to build the prerequisites from the software distribution that you just downloaded
179                                         and unpacked. Remember to replace <emphasis>[DISTRIBUTION]</emphasis> in the following
180                                         example with the keyword corresponding to the name of one of the
181                                         <systemitem class="osname">Linux</systemitem> distributions listed in the following
182                                         distribution keywords table <xref linkend="serversideinstallation-keywords-opensrf"/> . 
183                                         For example, to install the prerequisites for Ubuntu version 10.04 (Lucid Lynx) you would
184                                         enter this command: <command>make -f src/extras/Makefile.install ubuntu-lucid</command> .</para>
185                                         <screen>
186                                                 <prompt># as the root user:</prompt>
187                                                 <userinput>cd /home/opensrf/OpenSRF-1.4.0</userinput>
188                                                 <userinput>make -f src/extras/Makefile.install [DISTRIBUTION]</userinput>
189                                         </screen>
190                                         <table xml:id="serversideinstallation-keywords-opensrf">
191                                                 <title>Keyword Targets for OpenSRF <application>"make"</application> Command</title>
192                                                 <tgroup align="left" cols="2" colsep="1" rowsep="1">
193                                                         <colspec colnum="1" colwidth="1.0*"/>
194                                                         <colspec colnum="2" colwidth="3.0*"/>
195                                                         <thead>
196                                                                 <row>
197                                                                         <entry>Keyword</entry>
198                                                                         <entry>Linux Version</entry>
199                                                                 </row>
200                                                         </thead>
201                                                         <tbody>
202                                                                 <row>
203                                                                         <entry>debian-etch</entry>
204                                                                         <entry>Debian "Etch" (4.0)</entry>
205                                                                 </row>
206                                                                 <row>
207                                                                         <entry>debian-lenny</entry>
208                                                                         <entry>Debian "Lenny" (5.0)</entry>
209                                                                 </row>
210                                                                 <row>
211                                                                         <entry>ubuntu-hardy</entry>
212                                                                         <entry>Ubuntu "Hardy Heron" (8.04)</entry>
213                                                                 </row>
214                                                                 <row>
215                                                                         <entry>ubuntu-karmic</entry>
216                                                                         <entry>Ubuntu "Karmic Koala" (9.10)</entry>
217                                                                 </row>
218                                                                 <row>
219                                                                         <entry>ubuntu-lucid</entry>
220                                                                         <entry>Ubuntu "Lucid Lynx" (10.04)</entry>
221                                                                 </row>
222                                                                 <row>
223                                                                         <entry>fedora13</entry>
224                                                                         <entry>Fedora "Goddard" (13)</entry>
225                                                                 </row>
226                                                                 <row>
227                                                                         <entry>centos</entry>
228                                                                         <entry>Centos</entry>
229                                                                 </row>
230                                                                 <row>
231                                                                         <entry>rhel</entry>
232                                                                         <entry>RHEL</entry>
233                                                                 </row>
234                                                                 <row>
235                                                                         <entry>gentoo</entry>
236                                                                         <entry>Gentoo</entry>
237                                                                 </row>
238                                                         </tbody>
239                                                 </tgroup>
240                                         </table>
241                                         <para>This will install a number of packages on the system that are required by OpenSRF,
242                                         including some Perl modules from CPAN. You can say <literal>No</literal> to the initial
243                                         CPAN configuration prompt to allow it to automatically configure itself to download and
244                                         install Perl modules from CPAN. The CPAN installer will ask you a number of times whether
245                                         it should install prerequisite modules - say <literal>Yes</literal>.</para>
246                                 </step>
247                                 <step>
248                                         <title>Build OpenSRF</title>
249                                         <para>In this section you will configure, build and install the OpenSRF
250                                         components that support other Evergreen services.</para>
251                                         <substeps>
252                                                 <step>
253                                                         <title>Configure OpenSRF</title>
254                                                         <indexterm>
255                                                                 <primary>OpenSRF</primary>
256                                                                 <secondary>configure</secondary>
257                                                         </indexterm>
258                                                         <para>As the <systemitem class="username">opensrf</systemitem>
259                                                         user, return to the new OpenSRF build directory and use the
260                                                         <command>configure</command> utility to prepare for the next
261                                                         step of compiling and linking the software. If you wish to
262                                                         include support for Python and Java, add the configuration
263                                                         options <option>--enable-python</option> and
264                                                         <option>--enable-java</option>, respectively:</para>
265                                                         <screen>
266                                                                 <prompt># as the opensrf user:</prompt>
267                                                                 <userinput>cd /home/opensrf/OpenSRF-1.4.0</userinput>
268                                                                 <userinput>./configure --prefix=/openils --sysconfdir=/openils/conf</userinput>
269                                                                 <userinput>make</userinput>
270                                                         </screen>
271                                                         <para>This step will take several minutes to complete.</para>
272                                                 </step>
273                                                 <step>
274                                                         <title>Compile, Link and Install OpenSRF</title>
275                                                         <para>As the <systemitem class="username">root</systemitem>
276                                                         user, return to the new OpenSRF build directory and use the
277                                                         <command>make</command> utility to compile, link and install
278                                                         OpenSRF:</para>
279                                                         <screen>
280                                                                 <prompt># as the root user:</prompt>
281                                                                 <userinput>cd /home/opensrf/OpenSRF-1.4.0</userinput>
282                                                                 <userinput>make install</userinput>
283                                                         </screen>
284                                                         <para>This step will take several minutes to complete.</para>
285                                                 </step>
286                                                 <step>
287                                                         <title>Update the System Dynamic Library Path</title>
288                                                         <para>You must update the system dynamic library path to force
289                                                         your system to recognize the newly installed libraries. As the
290                                                         <systemitem class="username">root</systemitem> user, do this by
291                                                         creating the new file
292                                                         <filename>/etc/ld.so.conf.d/osrf.conf</filename> containing a
293                                                         new library path, then run the command
294                                                         <command>ldconfig</command> to automatically read the file and
295                                                         modify the system dynamic library path:</para>
296                                                         <screen>
297                                                                 <prompt># as the root user:</prompt>
298                                                                 <userinput>echo "/openils/lib" > /etc/ld.so.conf.d/osrf.conf</userinput>
299                                                                 <userinput>ldconfig</userinput>
300                                                         </screen>
301                                                 </step>
302                                                 <step xml:id="serversideinstallation-definedomains">
303                                                         <title>Define Public and Private OpenSRF Domains</title>
304                                                         <para>For security purposes, OpenSRF uses Jabber domains to separate services
305                                                         into public and private realms. On a single-server system the easiest way to
306                                                         define public and private OpenSRF domains is to define separate host names by 
307                                                         adding entries to the file <filename>/etc/hosts</filename>.</para>
308                                                         <para>In the following steps we will use the example domains
309                                                         <systemitem class="domainname">public.localhost</systemitem> for the public
310                                                         domain and <systemitem class="domainname">private.localhost</systemitem> 
311                                                         for the private domain. In an upcoming step, you will configure two special
312                                                         <systemitem class="service">ejabberd</systemitem> users
313                                                         to handle communications for these two domains.</para>
314                                                         <para>As the <systemitem class="username">root</systemitem> user, edit the file
315                                                         <filename>/etc/hosts</filename> and add the following example domains:</para>
316                                                         <indexterm>
317                                                                 <primary>Jabber</primary>
318                                                         </indexterm>
319                                                         <screen>
320                                                                 <prompt># as the root user:</prompt>
321                                                                 <userinput>127.0.1.2  public.localhost   public</userinput>
322                                                                 <userinput>127.0.1.3  private.localhost  private</userinput>
323                                                         </screen>
324                                                 </step>
325                                                 <step>
326                                                         <title>Change File Ownerships</title>
327                                                         <para>Finally, as the <systemitem class="username">root</systemitem>
328                                                         user, change the ownership of all files installed in the
329                                                         directory <filename class="directory">/openils</filename> to the
330                                                         user <systemitem class="username">opensrf</systemitem>:</para>
331                                                         <screen>
332                                                                 <prompt># as the root user:</prompt>
333                                                                 <userinput>chown -R opensrf:opensrf /openils</userinput>
334                                                         </screen>
335                                                 </step>
336                                         </substeps>
337                                 </step>
338                                 <step xml:id="stop-ejabberd-service">
339                                         <title>Stop the <systemitem class="service">ejabberd</systemitem> Service</title>
340                                         <indexterm>
341                                                 <primary>ejabberd</primary>
342                                         </indexterm>
343                                         <para>Before continuing with configuration of <systemitem class="service">ejabberd</systemitem>
344                                         you must stop that service. As the <systemitem class="username">root</systemitem> user,
345                                         execute the following command to stop the service:</para>
346                                         <screen>
347                                                 <prompt># as the root user:</prompt>
348                                                 <userinput>/etc/init.d/ejabberd stop</userinput>
349                                         </screen>
350                                         <para>If <systemitem class="service">ejabberd</systemitem> reports that it 
351                                         is already stopped, there may have been a problem when it started back
352                                         in the installation step. If there are any remaining daemon processes such as
353                                         <systemitem class="daemon">beam</systemitem> or
354                                         <systemitem class="daemon">epmd</systemitem> 
355                                         you may need to perform the following commands to kill them:</para>
356                                         <screen>
357                                                 <prompt># as the root user:</prompt>
358                                                 <userinput>epmd -kill</userinput>
359                                                 <userinput>killall beam; killall beam.smp</userinput>
360                                                 <userinput>rm /var/lib/ejabberd/*</userinput>
361                                                 <userinput>echo 'ERLANG_NODE=ejabberd@localhost' >> /etc/default/ejabberd</userinput>
362                                         </screen>
363                                 </step>
364                                 <step>
365                                         <title>Edit the <systemitem class="service">ejabberd</systemitem> configuration</title>
366                                         <para>You must make several configuration changes for the
367                                         <systemitem class="service">ejabberd</systemitem> service before
368                                         it is started again.
369                                         As the <systemitem class="username">root</systemitem> user, edit the file
370                                         <filename>/etc/ejabberd/ejabberd.cfg</filename> and make the following changes:</para>
371                                         <substeps>
372                                                 <step>
373                                                         <para>Change the line:</para>
374                                                         <screen>
375                                                                 <prompt>{hosts, ["localhost"]}.</prompt>
376                                                         </screen>
377                                                         <para>to instead read:</para>
378                                                         <screen>
379                                                                 <userinput>{hosts, ["localhost", "private.localhost", "public.localhost"]}.</userinput>
380                                                         </screen>
381                                                 </step>
382                                                 <step>
383                                                         <para>Change the line:</para>
384                                                         <screen>
385                                                                 <prompt>{max_user_sessions, 10}</prompt>
386                                                         </screen>
387                                                         <para>to instead read:</para>
388                                                         <screen>
389                                                                 <userinput>{max_user_sessions, 10000}</userinput>
390                                                         </screen>
391                                                         <para/>
392                                                         <para>If the line looks something like this:</para>
393                                                         <screen>
394                                                                 <prompt>{access, max_user_sessions, [{10, all}]}</prompt>
395                                                         </screen>
396                                                         <para>then change it to instead read:</para>
397                                                         <screen>
398                                                                 <userinput>{access, max_user_sessions, [{10000, all}]}</userinput>
399                                                         </screen>
400                                                 </step>
401                                                 <step>
402                                                         <para>Change all three occurrences of:</para>
403                                                         <screen>
404                                                                 <prompt>max_stanza_size</prompt>
405                                                         </screen>
406                                                         <para>to instead read:</para>
407                                                         <screen>
408                                                                 <userinput>2000000</userinput>
409                                                         </screen>
410                                                 </step>
411                                                 <step>
412                                                         <para>Change both occurrences of:</para>
413                                                         <screen>
414                                                                 <prompt>maxrate</prompt>
415                                                         </screen>
416                                                         <para>to instead read:</para>
417                                                         <screen>
418                                                                 <userinput>500000</userinput>
419                                                         </screen>
420                                                 </step>
421                                                 <step>
422                                                         <para>Comment out the line:</para>
423                                                         <screen>
424                                                                 <prompt>{mod_offline, []}</prompt>
425                                                         </screen>
426                                                         <para>by placing two <literal>%</literal> comment signs in front
427                                                         so it instead reads:</para>
428                                                         <screen>
429                                                                 <userinput>%%{mod_offline, []}</userinput>
430                                                         </screen>
431                                                 </step>
432                                         </substeps>
433                                 </step>
434                                 <step xml:id="serversideinstallation-opensrf-continued">
435                                         <title>Restart the <systemitem class="service">ejabberd</systemitem> service</title>
436                                         <para>As the <systemitem class="username">root</systemitem> user, restart the
437                                         <systemitem class="service">ejabberd</systemitem> service to test the
438                                         configuration changes and to register your users:</para>
439                                         <screen>
440                                                 <prompt># as the root user:</prompt>
441                                                 <userinput>/etc/init.d/ejabberd start</userinput>
442                                         </screen>
443                                 </step>
444                                 <step>
445                                         <title>Register <systemitem class="username">router</systemitem> and
446                                                 <systemitem class="username">opensrf</systemitem> as
447                                                 <systemitem class="service">ejabberd</systemitem> users</title>
448                                         <para>The two <systemitem class="service">ejabberd</systemitem> users 
449                                         <systemitem class="username">router</systemitem> and 
450                                         <systemitem class="username">opensrf</systemitem> must be registered 
451                                         and configured to manage OpenSRF router service and communications 
452                                         for the two domains <literal>public.localhost</literal> and
453                                         <literal>private.localhost</literal> that you added to the file
454                                         <filename>/etc/hosts</filename> in a previous step
455                                         (see <xref linkend="serversideinstallation-definedomains"/>).
456                                         The users include:</para>
457                                         <itemizedlist>
458                                                 <listitem>
459                                                         <para>the <systemitem class="username">router</systemitem> user,
460                                                         to whom all requests to connect to an OpenSRF service will be
461                                                         routed;</para>
462                                                 </listitem>
463                                                 <listitem>
464                                                         <para>the <systemitem class="username">opensrf</systemitem> user,
465                                                         which clients use to connect to OpenSRF services (you may name
466                                                         the user anything you like, but we use
467                                                         <literal>opensrf</literal> in these examples)</para>
468                                                 </listitem>
469                                         </itemizedlist>
470                                         <para>As the <systemitem class="username">root</systemitem> user, execute the
471                                         <command>ejabberdctl</command> utility as shown below to register and create passwords
472                                         for the users <systemitem class="username">router</systemitem> and
473                                         <systemitem class="username">opensrf</systemitem> on each domain:</para>
474                                         <screen>
475                                                 <prompt># as the root user:</prompt>
476                                                 <prompt># Note: the syntax for registering a user with ejabberdctl is:</prompt>
477                                                 <prompt>#    ejabberdctl register USER DOMAIN PASSWORD</prompt>
478                                                 <userinput>ejabberdctl register router  private.localhost NEWPASSWORD</userinput>
479                                                 <userinput>ejabberdctl register router  public.localhost  NEWPASSWORD</userinput>
480                                                 <userinput>ejabberdctl register opensrf private.localhost NEWPASSWORD</userinput>
481                                                 <userinput>ejabberdctl register opensrf public.localhost  NEWPASSWORD</userinput>
482                                         </screen>
483                                         <para>Note that the users <systemitem class="username">router</systemitem> and
484                                         <systemitem class="username">opensrf</systemitem> and their respective passwords 
485                                         will be used again in <xref linkend="serversideinstallation-passwords"/> when
486                                         we modify the OpenSRF configuration file <filename>/openils/conf/opensrf_core.xml</filename> .</para>
487                                 </step>
488                                 <step xml:id="serversideinstallation-opensrf-createconfig">
489                                         <title>Create OpenSRF configuration files</title>
490                                         <para>As the <systemitem class="username">opensrf</systemitem> user, 
491                                         execute the following commands to create the new configuration files
492                                         <filename>/openils/conf/opensrf_core.xml</filename> and
493                                         <filename>/openils/conf/opensrf.xml</filename> from the example templates:</para>
494                                         <screen>
495                                                 <prompt># as the opensrf user:</prompt>
496                                                 <userinput>cd /openils/conf</userinput>
497                                                 <userinput>cp opensrf.xml.example      opensrf.xml</userinput>
498                                                 <userinput>cp opensrf_core.xml.example opensrf_core.xml</userinput>
499                                         </screen>
500                                 </step>
501                                 <step xml:id="serversideinstallation-passwords">
502                                         <title>Update usernames and passwords in the OpenSRF configuration file</title>
503                                         <para>As the <systemitem class="username">opensrf</systemitem> user, edit the
504                                         OpenSRF configuration file <filename>/openils/conf/opensrf_core.xml</filename>
505                                         and update the usernames and passwords to match the values shown in the
506                                         following table. The left-hand side of <xref linkend="serversideinstallation-xpath-table-1"/>
507                                         shows common XPath syntax to indicate the approximate position within the XML
508                                         file that needs changes. The right-hand side of the table shows the replacement
509                                         values:</para>
510                                         <table xml:id="serversideinstallation-xpath-table-1">
511                                                 <title>Sample XPath syntax for editing "opensrf_core.xml"</title>
512                                                 <tgroup align="left" cols="2" colsep="1" rowsep="1">
513                                                         <colspec colname="Xpath" colnum="1" colwidth="1.6*"/>
514                                                         <colspec colname="Value" colnum="2" colwidth="2.0*"/>
515                                                         <thead>
516                                                                 <row>
517                                                                         <entry>XPath location</entry>
518                                                                         <entry>Value</entry>
519                                                                 </row>
520                                                         </thead>
521                                                         <tbody>
522                                                                 <row>
523                                                                         <entry>/config/opensrf/username</entry>
524                                                                         <entry>
525                                                                                 <systemitem class="username">opensrf</systemitem>
526                                                                         </entry>
527                                                                 </row>
528                                                                 <row>
529                                                                         <entry>/config/opensrf/passwd </entry>
530                                                                         <entry><systemitem class="domainname">private.localhost</systemitem>
531                                                                         password for
532                                                                         <systemitem class="username">opensrf</systemitem> user
533                                                                         </entry>
534                                                                 </row>
535                                                                 <row>
536                                                                         <entry>/config/gateway/username</entry>
537                                                                         <entry>
538                                                                                 <systemitem class="username">opensrf</systemitem>
539                                                                         </entry>
540                                                                 </row>
541                                                                 <row>
542                                                                         <entry>/config/gateway/passwd</entry>
543                                                                         <entry><systemitem class="domainname">public.localhost</systemitem>
544                                                                         password for
545                                                                         <systemitem class="username">opensrf</systemitem> user
546                                                                         </entry>
547                                                                 </row>
548                                                                 <row>
549                                                                         <entry>/config/routers/router/transport/username, 
550                                                                         first entry where server == public.localhost</entry>
551                                                                         <entry>
552                                                                                 <systemitem class="username">router</systemitem>
553                                                                         </entry>
554                                                                 </row>
555                                                                 <row>
556                                                                         <entry>/config/routers/router/transport/password,
557                                                                         first entry where server == public.localhost</entry>
558                                                                         <entry><systemitem class="domainname">public.localhost</systemitem>
559                                                                         password for
560                                                                         <systemitem class="username">router</systemitem> user
561                                                                         </entry>
562                                                                 </row>
563                                                                 <row>
564                                                                         <entry>/config/routers/router/transport/username,
565                                                                         second entry where server == private.localhost</entry>
566                                                                         <entry>
567                                                                                 <systemitem class="username">router</systemitem>
568                                                                         </entry>
569                                                                 </row>
570                                                                 <row>
571                                                                         <entry>/config/routers/router/transport/password,
572                                                                         second entry where server == private.localhost</entry>
573                                                                         <entry><systemitem class="domainname">private.localhost</systemitem>
574                                                                         password for
575                                                                         <systemitem class="username">router</systemitem> user
576                                                                         </entry>
577                                                                 </row>
578                                                         </tbody>
579                                                 </tgroup>
580                                         </table>
581                                         <para>You may also need to modify the file to specify the domains from which 
582                                         <systemitem class="service">OpenSRF</systemitem> will accept connections,
583                                         and to which it will make connections.
584                                         If you are installing <application>OpenSRF</application> on a single server
585                                         and using the <systemitem class="domainname">private.localhost</systemitem> and
586                                         <systemitem class="domainname">public.localhost</systemitem> domains, 
587                                         these will already be set to the correct values. Otherwise, search and replace
588                                         to match values for your own systems.</para>
589                                 </step>
590                                 <step>
591                                         <title>Set location of the persistent database</title>
592                                         <para>As the <systemitem class="username">opensrf</systemitem> user, edit the
593                                         file <filename>/openils/conf/opensrf.xml</filename>, then find and modify the 
594                                         element <literal>dbfile</literal> (near the end of the file) to set the 
595                                         location of the persistent database. Change the default line:</para>
596                                         <screen>
597                                                 <prompt>/openils/var/persist.db</prompt>
598                                         </screen>
599                                         <para>to instead read:</para>
600                                         <screen>
601                                                 <userinput>/tmp/persist.db</userinput>
602                                         </screen>
603                                         <para>Following is a sample modification of that portion of the file:</para>
604                                         <programlisting language="xml"><![CDATA[
605 <!-- Example of an app-specific setting override -->
606 <opensrf.persist>
607   <app_settings>
608     <dbfile>/tmp/persist.db</dbfile>
609   </app_settings>
610 </opensrf.persist>
611 ]]></programlisting>
612                                 </step>
613                                 <step xml:id="serversideinstallation-srfsh">
614                                         <title>Create configuration files for users needing <command>srfsh</command></title>
615                                         <para>In this section you will set up a special configuration file for each user
616                                         who will need to run the <command>srfsh</command> (pronounced <emphasis>surf
617                                         shell</emphasis>) utility.</para>
618                                         <indexterm>
619                                                 <primary>srfsh</primary>
620                                         </indexterm>
621                                         <para>The software installation will automatically create the utility
622                                         <command>srfsh</command> (surf shell), a command line diagnostic tool for
623                                         testing and interacting with <application>OpenSRF</application>. It will be used
624                                         in a future step to complete and test the Evergreen installation. See 
625                                         <xref linkend="serversideinstallation-testing"/> for further information.</para>
626                                         <para>As the <systemitem class="username">root</systemitem> user, copy the
627                                         sample configuration file <filename>/openils/conf/srfsh.xml.example</filename>
628                                         to the home directory of each user who will use <command>srfsh</command>. 
629                                         For instance, do the following for the 
630                                         <systemitem class="username">opensrf</systemitem> user:</para>
631                                         <screen>
632                                                 <prompt># as the root user:</prompt>
633                                                 <userinput>cp /openils/conf/srfsh.xml.example  /home/opensrf/.srfsh.xml</userinput>
634                                         </screen>
635                                         <para>Edit each user's file <filename>~/.srfsh.xml</filename> and make the
636                                         following changes:</para>
637                                         <itemizedlist>
638                                                 <listitem>
639                                                         <para>Modify <literal>domain</literal> to be the router hostname
640                                                         (following our domain examples,
641                                                         <systemitem class="domainname">private.localhost</systemitem> will give
642                                                         <command>srfsh</command> access to all OpenSRF services, while
643                                                         <systemitem class="domainname">public.localhost</systemitem>
644                                                         will only allow access to those OpenSRF services that are
645                                                         publicly exposed).</para>
646                                                 </listitem>
647                                                 <listitem>
648                                                         <para>Modify <literal>username</literal> and
649                                                         <literal>password</literal> to match the
650                                                         <literal>opensrf</literal> Jabber user for the chosen
651                                                         domain</para>
652                                                 </listitem>
653                                                 <listitem>
654                                                         <para>Modify <literal>logfile</literal> to be the full path for
655                                                         a log file to which the user has write access</para>
656                                                 </listitem>
657                                                 <listitem>
658                                                         <para>Modify <literal>loglevel</literal> as needed for testing</para>
659                                                 </listitem>
660                                                 <listitem>
661                                                         <para>Change the owner of the file to match the owner of the home directory</para>
662                                                 </listitem>
663                                         </itemizedlist>
664                                         <para>Following is a sample of the file:</para>
665                                         <programlisting language="xml"><![CDATA[
666 <?xml version="1.0"?>
667 <!-- This file follows the standard bootstrap config file layout -->
668 <!-- found in opensrf_core.xml -->
669 <srfsh>
670 <router_name>router</router_name>
671 <domain>private.localhost</domain>
672 <username>opensrf</username>
673 <passwd>SOMEPASSWORD</passwd>
674 <port>5222</port>
675 <logfile>/tmp/srfsh.log</logfile>
676 <!-- 0 None, 1 Error, 2 Warning, 3 Info, 4 debug, 5 Internal (Nasty) -->
677 <loglevel>4</loglevel>
678 </srfsh>
679 ]]></programlisting>
680                                 </step>
681                                 <step>
682                                         <title>Modify the environmental variable <envar>PATH</envar> for the
683                                                 <systemitem class="username">opensrf</systemitem> user</title>
684                                         <para>As the <systemitem class="username">opensrf</systemitem> user, modify the
685                                         environmental variable <envar>PATH</envar> by adding a new file path to the
686                                         <systemitem class="username">opensrf</systemitem> user's shell configuration
687                                         file <filename>~/.bashrc</filename>:</para>
688                                         <screen>
689                                                 <prompt># as the opensrf user:</prompt>
690                                                 <userinput>echo "export PATH=/openils/bin:\$PATH" >> ~/.bashrc</userinput>
691                                         </screen>
692                                 </step>
693                                 <step>
694                                         <title>Start OpenSRF</title>
695                                         <para>As the <systemitem class="username">root</systemitem> user, start the
696                                         <systemitem class="service">ejabberd</systemitem> and 
697                                         <systemitem class="service">memcached</systemitem> services:</para>
698                                         <screen>
699                                                 <prompt># as the root user:</prompt>
700                                                 <userinput>/etc/init.d/ejabberd start</userinput>
701                                                 <userinput>/etc/init.d/memcached start</userinput>
702                                         </screen>
703                                         <para>As the <systemitem class="username">opensrf</systemitem> user,
704                                         start OpenSRF as follows:</para>
705                                         <screen>
706                                                 <prompt># as the opensrf user:</prompt>
707                                                 <userinput>osrf_ctl.sh -l -a start_all</userinput>
708                                         </screen>
709                                         <para>The flag <option>-l</option> forces Evergreen to use 
710                                         <systemitem class="domainname">localhost</systemitem> (your current system) 
711                                         as the hostname. The flag <option>-a start_all</option>  starts the other 
712                                         OpenSRF <systemitem class="service">router</systemitem> , 
713                                         <systemitem class="service">Perl</systemitem> , and
714                                         <systemitem class="service">C</systemitem> services.</para>
715                                         <itemizedlist>
716                                                 <listitem>
717                                                         <para>You can also start Evergreen without the
718                                                         <option>-l</option> flag, but the <command>osrf_ctl.sh</command>
719                                                         utility must know the fully qualified domain name for the system
720                                                         on which it will execute. That hostname was probably specified
721                                                         in the configuration file <filename>opensrf.xml</filename> which
722                                                         you configured in a previous step.</para>
723                                                 </listitem>
724                                                 <listitem>
725                                                         <para>If you receive an error message similar to
726                                                         <emphasis>osrf_ctl.sh: command not found</emphasis>, then your
727                                                         environment variable <envar>PATH</envar> does not include the
728                                                         directory <filename class="directory">/openils/bin</filename>.
729                                                         As the <systemitem class="username">opensrf</systemitem> user,
730                                                         edit the configuration file <filename>~/.bashrc</filename> and
731                                                         add the following line: 
732                                                         <literal>export PATH=$PATH:/openils/bin</literal></para>
733                                                 </listitem>
734                                         </itemizedlist>
735                                 </step>
736                                 <step>
737                                         <title>Test connections to OpenSRF</title>
738                                         <para>Once you have installed and started OpenSRF, as the 
739                                         <systemitem class="username">root</systemitem> user, test your connection to 
740                                         <systemitem class="service">OpenSRF</systemitem> using the <command>srfsh</command> 
741                                         utility and trying to call the <command>add</command> method on the OpenSRF 
742                                         <systemitem class="service">math</systemitem> service:</para>
743                                         <screen>
744                                                 <prompt># as the root user:</prompt>
745                                                 <userinput>/openils/bin/srfsh</userinput>
746                                                 <computeroutput>srfsh# <userinput>request opensrf.math add 2 2</userinput></computeroutput>
747                                                 <computeroutput>Received Data: 4</computeroutput>
748                                                 <computeroutput>------------------------------------</computeroutput>
749                                                 <computeroutput>Request Completed Successfully</computeroutput>
750                                                 <computeroutput>Request Time in seconds: 0.007519</computeroutput>
751                                                 <computeroutput>------------------------------------</computeroutput>
752                                         </screen>
753                                         <para>For other <command>srfsh</command> commands, type in
754                                         <userinput>help</userinput> at the prompt.</para>
755                                 </step>
756                                 <step>
757                                         <title>Stop OpenSRF</title>
758                                         <para>After OpenSRF has started, you can stop it at any time by using the
759                                         <command>osrf_ctl.sh</command> again. As the 
760                                         <systemitem class="username">opensrf</systemitem> 
761                                         user, stop OpenSRF as follows:</para>
762                                         <screen>
763                                                 <prompt># as the opensrf user:</prompt>
764                                                 <userinput>osrf_ctl.sh -l -a stop_all</userinput>
765                                         </screen>
766                                 </step>
767                         </procedure>
768                 </section>
769                 <section xml:id="serversideinstallation-ubuntudebian">
770                         <title>Installing Evergreen 1.6.1.x On <systemitem class="osname">Ubuntu</systemitem> or
771                                 <systemitem class="osname">Debian</systemitem></title>
772                         <indexterm>
773                                 <primary>Linux</primary>
774                                 <secondary>Debian</secondary>
775                         </indexterm>
776                         <indexterm>
777                                 <primary>Linux</primary>
778                                 <secondary>Ubuntu</secondary>
779                         </indexterm>
780                         <para>This section outlines the installation process for the latest stable version of
781                         Evergreen.</para>
782                         <para>In this section you will download, unpack, install, configure and test the Evergreen
783                         system, including the Evergreen server and the PostgreSQL database system. You will make several
784                         configuration changes and adjustments to the software, including updates to configure the system
785                         for your own locale, and some updates needed to work around a few known issues.</para>
786                         <note>
787                                 <para>The following steps have been tested on the x86 (32-bit) and x86-64 (64-bit)
788                                 architectures. There may be differences between the Desktop and Server editions of
789                                 <systemitem class="osname">Ubuntu</systemitem>. These instructions assume the Server
790                                 edition.</para>
791                                 <para>In the following instructions, you are asked to perform certain steps as 
792                                 either the <systemitem class="username">root</systemitem> user, the 
793                                 <systemitem class="username">opensrf</systemitem> user, or the 
794                                 <systemitem class="username">postgres</systemitem> user.</para>
795                                 <itemizedlist>
796                                         <listitem>
797                                                 <para><systemitem class="osname">Debian</systemitem> -- To become the
798                                                 <systemitem class="username">root</systemitem> user, issue the command
799                                                 <command>su -</command> and enter the password of the 
800                                                 <systemitem class="username">root</systemitem> user.</para>
801                                         </listitem>
802                                         <listitem>
803                                                 <para><systemitem class="osname">Ubuntu</systemitem> -- To become the
804                                                 <systemitem class="username">root</systemitem> user, issue the command
805                                                 <command>sudo su -</command> and enter the password of the 
806                                                 <systemitem class="username">root</systemitem> user.</para>
807                                         </listitem>
808                                 </itemizedlist>
809                                 <para>To switch from the <systemitem class="username">root</systemitem> user to a
810                                 different user, issue the command <command>su - USERNAME</command>. For example, to
811                                 switch from the <systemitem class="username">root</systemitem> user to the 
812                                 <systemitem class="username">opensrf</systemitem> user, issue the command 
813                                 <command>su - opensrf</command>. Once you have become a non-root user, to become the
814                                 <systemitem class="username">root</systemitem> user again, simply issue the command
815                                 <command>exit</command>.</para>
816                         </note>
817                         <procedure>
818                                 <step>
819                                         <title>Install OpenSRF</title>
820                                         <para>Evergreen software is integrated with and depends on the Open Service
821                                         Request Framework (OpenSRF) software system. For further information on
822                                         installing, configuring and testing OpenSRF, see 
823                                         <xref linkend="serversideinstallation-opensrf"/>.</para>
824                                         <para>Follow the steps outlined in that section and run the specified tests to
825                                         ensure that OpenSRF is properly installed and configured. Do 
826                                         <emphasis><emphasis role="bold">not</emphasis></emphasis> continue with
827                                         any further Evergreen installation steps until you have verified that OpenSRF
828                                         has been successfully installed and tested.</para>
829                                 </step>
830                                 <step>
831                                         <title>Download and Unpack Latest Evergreen Version</title>
832                                         <para>The latest version of Evergreen can be found here:
833                                         <ulink url="http://evergreen-ils.org/downloads/Evergreen-ILS-1.6.1.2.tar.gz"></ulink> .
834                                         As the <systemitem class="username">opensrf</systemitem> user, change to
835                                         the directory <filename class="directory">/home/opensrf</filename> then download
836                                         and extract Evergreen. The new subdirectory
837                                         <filename class="directory">/home/opensrf/Evergreen-ILS-1.6.1.2</filename> will be created:</para>
838                                         <screen>
839                                                 <prompt># as the opensrf user:</prompt>
840                                                 <userinput>cd /home/opensrf</userinput>
841                                                 <userinput>wget http://evergreen-ils.org/downloads/Evergreen-ILS-1.6.1.2.tar.gz</userinput>
842                                                 <userinput>tar zxf Evergreen-ILS-1.6.1.2.tar.gz</userinput>
843                                         </screen>
844                                 </step>
845                                 <step xml:id="serversideinstallation-installprereq">
846                                         <title>Install Prerequisites to Build Evergreen</title>
847                                         <para>In this section you will install and configure a set of prerequisites that will be
848                                         used later in <xref linkend="serversideinstallation-configure"/> and 
849                                         <xref linkend="serversideinstallation-compile"/> to build the Evergreen software 
850                                         using the <command>make</command> utility.</para>
851                                         <para>As the <systemitem class="username">root</systemitem> user, enter the commands show
852                                         below to build the prerequisites from the software distribution that you just downloaded
853                                         and unpacked. Remember to replace <emphasis>[DISTRIBUTION]</emphasis> in the following
854                                         example with the keyword corresponding to the name of one of the 
855                                         <systemitem class="osname">Linux</systemitem> distributions listed in the following
856                                         distribution keywords table <xref linkend="serversideinstallation-keywords-evergreen"/> .
857                                         For example, to install the prerequisites for Ubuntu version 9.10 (Karmic Koala) you would
858                                         enter this command: <command>make -f Open-ILS/src/extras/Makefile.install
859                                         ubuntu-karmic</command>.</para>
860                                         <screen>
861                                                 <prompt># as the root user:</prompt>
862                                                 <userinput>cd /home/opensrf/Evergreen-ILS-1.6.1.2</userinput>
863                                                 <userinput>make -f Open-ILS/src/extras/Makefile.install [DISTRIBUTION]</userinput>
864                                         </screen>
865                                         <table xml:id="serversideinstallation-keywords-evergreen">
866                                                 <title>Keyword Targets for Evergreen <application>"make"</application> Command</title>
867                                                 <tgroup align="left" cols="2" colsep="1" rowsep="1">
868                                                         <colspec colnum="1" colwidth="1.0*"/>
869                                                         <colspec colnum="2" colwidth="3.0*"/>
870                                                         <thead>
871                                                                 <row>
872                                                                         <entry>Keyword</entry>
873                                                                         <entry>Linux Version</entry>
874                                                                 </row>
875                                                         </thead>
876                                                         <tbody>
877                                                                 <row>
878                                                                         <entry>debian-etch</entry>
879                                                                         <entry>Debian "Etch" (4.0)</entry>
880                                                                 </row>
881                                                                 <row>
882                                                                         <entry>debian-lenny</entry>
883                                                                         <entry>Debian "Lenny" (5.0)</entry>
884                                                                 </row>
885                                                                 <row>
886                                                                         <entry>ubuntu-hardy</entry>
887                                                                         <entry>Ubuntu "Hardy Heron" (8.04)</entry>
888                                                                 </row>
889                                                                 <row>
890                                                                         <entry>ubuntu-intrepid</entry>
891                                                                         <entry>Ubuntu "Intrepid Ibex" (8.10)</entry>
892                                                                 </row>
893                                                                 <row>
894                                                                         <entry>ubuntu-karmic</entry>
895                                                                         <entry>Ubuntu "Karmic Koala" (9.10)</entry>
896                                                                 </row>
897                                                                 <row>
898                                                                         <entry>ubuntu-karmic</entry>
899                                                                         <entry>Ubuntu "Lucid Lynx" (10.04)</entry>
900                                                                 </row>
901                                                                 <row>
902                                                                         <entry>centos</entry>
903                                                                         <entry>Centos</entry>
904                                                                 </row>
905                                                                 <row>
906                                                                         <entry>rhel</entry>
907                                                                         <entry>RHEL</entry>
908                                                                 </row>
909                                                                 <row>
910                                                                         <entry>gentoo</entry>
911                                                                         <entry>Gentoo</entry>
912                                                                 </row>
913                                                         </tbody>
914                                                 </tgroup>
915                                         </table>
916                                 </step>
917                                 <step performance="optional" xml:id="serversideinstallation-postgresql-default">
918                                         <title>(OPTIONAL) Install the PostgreSQL Server</title>
919                                         <indexterm>
920                                                 <primary>databases</primary>
921                                                 <secondary>PostgreSQL</secondary>
922                                         </indexterm>
923                                         <para>Since the PostgreSQL server is usually a standalone server in multi-server
924                                         production systems, the prerequisite installer Makefile in the previous section
925                                         (see <xref linkend="serversideinstallation-installprereq"/>)
926                                         does not automatically install PostgreSQL. You must install the PostgreSQL server
927                                         yourself, either on the same system as Evergreen itself or on another system.
928                                         If your PostgreSQL server is on a different system, just skip this step.
929                                         If your PostgreSQL server will be on the same system as your Evergreen
930                                         software, then install the required PostgreSQL server packages as follows.
931                                         For further information on manually installing PostgreSQL, visit the official
932                                         <link xl:href="http://www.postgresql.org/">PostgreSQL Site</link>.</para>
933                                         <para>For <systemitem class="osname">Debian Lenny</systemitem> and 
934                                         <systemitem class="osname">Ubuntu Hardy (8.04)</systemitem>, execute these commands:</para>
935                                         <screen>
936                                                 <prompt># as the root user:</prompt>
937                                                 <userinput>cd /home/opensrf/Evergreen-ILS-1.6.1.2</userinput>
938                                                 <userinput>make -f Open-ILS/src/extras/Makefile.install install_pgsql_server_debs_83</userinput>
939                                         </screen>
940                                         <para>For <systemitem class="osname">Ubuntu Karmic (9.10)</systemitem> and
941                                         <systemitem class="osname">Ubuntu Lucid (10.04)</systemitem>, execute these commands:</para>
942                                         <screen>
943                                                 <prompt># as the root user:</prompt>
944                                                 <userinput>cd /home/opensrf/Evergreen-ILS-1.6.1.2</userinput>
945                                                 <userinput>make -f Open-ILS/src/extras/Makefile.install install_pgsql_server_debs_84</userinput>
946                                         </screen>
947                                         <note>
948                                                 <para>PostgreSQL versions 8.3 or 8.4 are the recommended versions to work 
949                                                 with Evergreen 1.6.1.2 . If you have an older version of PostgreSQL, you 
950                                                 should upgrade before installing Evergreen. To find the running version of
951                                                 PostgreSQL, as the <systemitem class="username">postgres</systemitem> 
952                                                 user execute the command <command>psql</command>, then type 
953                                                 <userinput>SELECT version();</userinput> to get detailed information 
954                                                 about your version of PostgreSQL.</para>
955                                         </note>
956                                 </step>
957                                 <step performance="optional">
958                                         <title>Install Perl Modules on PostgreSQL Server</title>
959                                         <para>If PostgreSQL is running on the same system as your Evergreen software,
960                                         then the Perl modules will automatically be available. Just skip this step.
961                                         Otherwise, continue if your PostgreSQL server is running on another system.</para>
962                                         <para>You will need to install several Perl modules on the other system. As the
963                                         <systemitem class="username">root</systemitem> user install the following Perl
964                                         modules:</para>
965                                         <screen>
966                                                 <prompt># as the root user:</prompt>
967                                                 <prompt># first, ensure the gcc compiler is installed:</prompt>
968                                                 <userinput>apt-get install gcc</userinput>
969                                                 <prompt># then install the Perl modules:</prompt>
970                                                 <userinput>perl -MCPAN -e shell</userinput>
971                                                 <computeroutput>cpan></computeroutput>
972                                                 <userinput>install JSON::XS</userinput>
973                                                 <computeroutput>cpan></computeroutput>
974                                                 <userinput>install MARC::Record</userinput>
975                                                 <computeroutput>cpan></computeroutput>
976                                                 <userinput>install MARC::File::XML</userinput>
977                                         </screen>
978                                         <para>For more information on installing Perl Modules vist the official
979                                         <link xl:href="http://www.cpan.org/">CPAN</link> site.</para>
980                                         <indexterm>
981                                                 <primary>Perl</primary>
982                                                 <secondary>CPAN</secondary>
983                                         </indexterm>
984                                 </step>
985                                 <step>
986                                         <title>Update the System Dynamic Library Path</title>
987                                         <para>You must update the system dynamic library path to force your system to recognize
988                                         the newly installed libraries. As the <systemitem class="username">root</systemitem> user,
989                                         do this by creating the new file <filename>/etc/ld.so.conf.d/osrf.conf</filename>
990                                         containing a new library path, then run the command <command>ldconfig</command> to
991                                         automatically read the file and modify the system dynamic library path:</para>
992                                         <screen>
993                                                 <prompt># as the root user:</prompt>
994                                                 <userinput>echo "/usr/local/lib"     >> /etc/ld.so.conf.d/osrf.conf</userinput>
995                                                 <userinput>echo "/usr/local/lib/dbd" >> /etc/ld.so.conf.d/osrf.conf</userinput>
996                                                 <userinput>ldconfig</userinput>
997                                         </screen>
998                                 </step>
999                                 <step performance="optional">
1000                                         <title>Restart the PostgreSQL Server</title>
1001                                         <para>If PostgreSQL is running on the same system as the rest of Evergreen, as
1002                                         the <systemitem class="username">root</systemitem> user you must restart
1003                                         PostgreSQL to re-read the new library paths just configured. If PostgreSQL is
1004                                         running on another system, you may skip this step.
1005                                         As the <systemitem class="username">opensrf</systemitem> user,
1006                                         execute the following command, where
1007                                         <literal>[PGSQL_VERSION]</literal> is your installed PostgreSQL version
1008                                         (e.g. <literal>8.3</literal>):</para>
1009                                         <screen>
1010                                                 <prompt># as the opensrf user:</prompt>
1011                                                 <userinput>/etc/init.d/postgresql-[PGSQL_VERSION] restart</userinput>
1012                                         </screen>
1013                                 </step>
1014                                 <step xml:id="serversideinstallation-configure">
1015                                         <title>Configure Evergreen</title>
1016                                         <para>In this step you will use the <command>configure</command> and
1017                                         <command>make</command> utilities to configure Evergreen so it can be compiled
1018                                         and linked later in <xref linkend="serversideinstallation-compile"/>.</para>
1019                                         <para>As the <systemitem class="username">opensrf</systemitem> user, return to
1020                                         the Evergreen build directory and execute these commands:</para>
1021                                         <screen>
1022                                                 <prompt># as the opensrf user:</prompt>
1023                                                 <userinput>cd /home/opensrf/Evergreen-ILS-1.6.1.2</userinput>
1024                                                 <userinput>./configure --prefix=/openils --sysconfdir=/openils/conf</userinput>
1025                                                 <userinput>make</userinput>
1026                                         </screen>
1027                                 </step>
1028                                 <step xml:id="serversideinstallation-compile">
1029                                         <title>Compile, Link and Install Evergreen</title>
1030                                         <para>In this step you will actually compile, link and install Evergreen and the 
1031                                         default Evergreen Staff Client.</para>
1032                                         <para>As the <systemitem class="username">root</systemitem> user, return to the
1033                                         Evergreen build directory and use the <command>make</command> utility as shown below:</para>
1034                                         <screen>
1035                                                 <prompt># as the root user:</prompt>
1036                                                 <userinput>cd /home/opensrf/Evergreen-ILS-1.6.1.2</userinput>
1037                                                 <userinput>make STAFF_CLIENT_BUILD_ID=rel_1_6_1_2 install</userinput>
1038                                         </screen>
1039                                         <para>The Staff Client will also be automatically built, but you must remember
1040                                         to set the variable <envar>STAFF_CLIENT_BUILD_ID</envar> to match the version of the Staff
1041                                         Client you will use to connect to the Evergreen server. For further information on manually
1042                                         building the Staff Client, see 
1043                                         <xref linkend="staffclientinstallation-building-staffclient"/>.</para>
1044                                         <para>The above commands will create a new subdirectory
1045                                         <filename class="directory">/openils/var/web/xul/rel_1_6_1_2</filename> 
1046                                         containing the Staff Client.</para>
1047                                         <para>To complete the Staff Client installation, as the
1048                                         <systemitem class="username">root</systemitem> user execute the following commands to
1049                                         create a symbolic link named <emphasis>server</emphasis> in the head of the Staff Client
1050                                         directory <filename class="directory">/openils/var/web/xul</filename> that points to the
1051                                         subdirectory <filename class="directory">/server</filename> of the new Staff Client
1052                                         build:</para>
1053                                         <screen>
1054                                                 <prompt># as the root user:</prompt>
1055                                                 <userinput>cd /openils/var/web/xul</userinput>
1056                                                 <userinput>ln -sf rel_1_6_1_2/server server</userinput>
1057                                         </screen>
1058                                 </step>
1059                                 <step>
1060                                         <title>Copy the OpenSRF Configuration Files</title>
1061                                         <para>In this step you will replace some OpenSRF configuration files that you set up in
1062                                         <xref linkend="serversideinstallation-opensrf-createconfig"/> when you installed and
1063                                         tested OpenSRF.</para>
1064                                         <para>You must copy several example OpenSRF configuration files into place after first
1065                                         creating backup copies for troubleshooting purposes, then change all the file ownerships
1066                                         to <systemitem class="username">opensrf</systemitem>.  
1067                                         As the <systemitem class="username">root</systemitem> user, execute the following
1068                                         commands:</para>
1069                                         <screen>
1070                                                 <prompt># as the root user:</prompt>
1071                                                 <userinput>cd /openils/conf</userinput>
1072                                                 <userinput>cp opensrf.xml             opensrf.xml.BAK</userinput>
1073                                                 <userinput>cp opensrf_core.xml   opensrf_core.xml.BAK</userinput>
1074                                                 <userinput>cp opensrf.xml.example      opensrf.xml</userinput>
1075                                                 <userinput>cp opensrf_core.xml.example opensrf_core.xml</userinput>
1076                                                 <userinput>cp oils_web.xml.example     oils_web.xml</userinput>
1077                                                 <userinput>chown -R opensrf:opensrf /openils/</userinput>
1078                                         </screen>
1079                                 </step>
1080                                 <step>
1081                                         <title>Create and Configure PostgreSQL Database</title>
1082                                         <indexterm>
1083                                                 <primary>databases</primary>
1084                                                 <secondary>PostgreSQL</secondary>
1085                                         </indexterm>
1086                                         <para>In this step you will create the Evergreen database. In the commands
1087                                         below, remember to adjust the path of the <emphasis role="bold">contrib</emphasis>
1088                                         repository to match your PostgreSQL server
1089                                         layout. For example, if you built PostgreSQL from source the path would be
1090                                         <filename class="directory">/usr/local/share/contrib</filename>; if you
1091                                         installed the PostgreSQL 8.3 server packages on <systemitem class="osname">Ubuntu 8.04</systemitem>,
1092                                         the path would be 
1093                                         <systemitem class="directory">/usr/share/postgresql/8.3/contrib/</systemitem>.</para>
1094                                         <substeps>
1095                                                 <step>
1096                                                         <para>
1097                                                                 <emphasis role="bold">Create and configure the database</emphasis>
1098                                                         </para>
1099                                                         <para>As the <systemitem class="username">postgres</systemitem>
1100                                                         user on the PostgreSQL system create the PostgreSQL database,
1101                                                         then set some internal paths:</para>
1102                                                         <screen>
1103                                                                 <prompt># as the postgres user:</prompt>
1104                                                                 <userinput>createdb evergreen -E UTF8 -T template0</userinput>
1105                                                                 <userinput>createlang plperl   evergreen</userinput>
1106                                                                 <userinput>createlang plperlu  evergreen</userinput>
1107                                                                 <userinput>createlang plpgsql  evergreen</userinput>
1108                                                         </screen>
1109                                                         <para>Continue as the <systemitem class="username">postgres</systemitem> user
1110                                                         and execute the SQL scripts as shown below, adjusting the paths as needed, where
1111                                                         <literal>[PGSQL_VERSION]</literal> is your installed PostgreSQL
1112                                                         version (e.g. <literal>8.3</literal>).</para>
1113                                                         <screen>
1114                                                                 <prompt># as the postgres user:</prompt>
1115                                                                 <userinput>psql -f /usr/share/postgresql/[PGSQL_VERSION]/contrib/tablefunc.sql evergreen</userinput>
1116                                                                 <userinput>psql -f /usr/share/postgresql/[PGSQL_VERSION]/contrib/tsearch2.sql  evergreen</userinput>
1117                                                                 <userinput>psql -f /usr/share/postgresql/[PGSQL_VERSION]/contrib/pgxml.sql     evergreen</userinput>
1118                                                         </screen>
1119                                                 </step>
1120                                                 <step xml:id="serversideinstallation-postgresqlcreateuser">
1121                                                         <title>Create <systemitem class="username">evergreen</systemitem> PostgreSQL user</title>
1122                                                         <para>As the <systemitem class="username">postgres</systemitem>
1123                                                         user on the PostgreSQL system, create a new PostgreSQL user
1124                                                         named <systemitem class="username">evergreen</systemitem> and
1125                                                         assign a password:</para>
1126                                                         <screen>
1127                                                                 <prompt># as the postgres user:</prompt>
1128                                                                 <userinput>createuser -P -s evergreen</userinput>
1129                                                                 <computeroutput>Enter password for new role: <userinput>MYNEWPASSWORD</userinput></computeroutput>
1130                                                                 <computeroutput>Enter it again: <userinput>MYNEWPASSWORD</userinput></computeroutput>
1131                                                         </screen>
1132                                                 </step>
1133                                                 <step>
1134                                                         <title>Create database schema</title>
1135                                                         <para>In this step you will create the database schema and configure your
1136                                                         system with the corresponding database authentication details for the
1137                                                         <emphasis>evergreen</emphasis> database user that you just created in
1138                                                         <xref linkend="serversideinstallation-postgresqlcreateuser"/>.</para>
1139                                                         <para>As the <systemitem class="username">root</systemitem> user, enter
1140                                                         the following commands and replace <emphasis>HOSTNAME, PORT,
1141                                                         PASSWORD</emphasis> and <emphasis>DATABASENAME</emphasis> with appropriate
1142                                                         values:</para>
1143                                                         <screen>
1144                                                                 <prompt># as the root user:</prompt>
1145                                                                 <userinput>cd /home/opensrf/Evergreen-ILS-1.6.1.2</userinput>
1146                                                                 <userinput>perl Open-ILS/src/support-scripts/eg_db_config.pl --update-config \</userinput>
1147                                                                 <userinput>  --service all --create-schema --create-bootstrap --create-offline \</userinput>
1148                                                                 <userinput>  --hostname HOSTNAME --port PORT \</userinput>
1149                                                                 <userinput>  --user evergreen --password PASSWORD --database DATABASENAME</userinput>
1150                                                         </screen>
1151                                                         <para>On most systems, <emphasis>HOSTNAME</emphasis> will be
1152                                                         <emphasis role="bold">localhost</emphasis> and
1153                                                         <emphasis>PORT</emphasis> will be <emphasis role="bold">5432</emphasis>.
1154                                                         Of course, values for <emphasis>PASSWORD</emphasis> and
1155                                                         <emphasis>DATABASENAME</emphasis> must match the values you used in 
1156                                                         <xref linkend="serversideinstallation-postgresqlcreateuser"/>.</para>
1157                                                         <para>As the command executes, you may see warnings similar to:
1158                                                         <literal>ERROR: schema SOMENAME does not exist</literal> (in fact,
1159                                                         you may see one warning per schema) but they can be safely ignored.</para>
1160                                                         <note>
1161                                                                 <para>If you are entering the above command on a single line, do
1162                                                                 not include the <literal>\</literal> (backslash) characters. If
1163                                                                 you are using the <command>bash</command> shell, these should only
1164                                                                 be used at the end of a line at a <command>bash</command> prompt
1165                                                                 to indicate that the command is continued on the next line.</para>
1166                                                         </note>
1167                                                 </step>
1168                                         </substeps>
1169                                 </step>
1170                                 <step>
1171                                         <title>Configure the Apache web server</title>
1172                                         <indexterm>
1173                                                 <primary>web server</primary>
1174                                                 <secondary>Apache</secondary>
1175                                         </indexterm>
1176                                         <para>In this step you will configure the Apache web server to support Evergreen
1177                                         software.</para>
1178                                         <para>First, you must enable some built-in Apache modules and install some
1179                                         additional Apache configuration files. Then you will create a new Security
1180                                         Certificate. Finally, you must make several changes to the Apache configuration
1181                                         file.</para>
1182                                         <substeps>
1183                                                 <step>
1184                                                         <title>Enable the required Apache Modules</title>
1185                                                         <para>As the <systemitem class="username">root</systemitem>
1186                                                         user, enable some modules in the Apache server, then copy the
1187                                                         new configuration files to the Apache server directories:</para>
1188                                                         <indexterm>
1189                                                                 <primary>Apache modules</primary>
1190                                                         </indexterm>
1191                                                         <screen>
1192                                                                 <prompt># as the root user:</prompt>
1193                                                                 <userinput>a2enmod ssl     # enable mod_ssl</userinput>
1194                                                                 <userinput>a2enmod rewrite # enable mod_rewrite</userinput>
1195                                                                 <userinput>a2enmod expires # enable mod_expires</userinput>
1196                                                         </screen>
1197                                                         <para>As the commands execute, you may see warnings similar to:
1198                                                         <literal>Module SOMEMODULE already enabled</literal> but you can
1199                                                         safely ignore them.</para>
1200                                                 </step>
1201                                                 <step>
1202                                                         <title>Copy Apache configuration files</title>
1203                                                         <para>You must copy the Apache configuration files from the
1204                                                         Evergreen installation directory to the Apache directory. As the
1205                                                         <systemitem class="username">root</systemitem> user, perform the
1206                                                         following commands:</para>
1207                                                         <screen>
1208                                                                 <prompt># as the root user:</prompt>
1209                                                                 <userinput>cd /home/opensrf/Evergreen-ILS-1.6.1.2</userinput>
1210                                                                 <userinput>cp Open-ILS/examples/apache/eg.conf  /etc/apache2/sites-available/</userinput>
1211                                                                 <userinput>cp Open-ILS/examples/apache/eg_vhost.conf  /etc/apache2/</userinput>
1212                                                                 <userinput>cp Open-ILS/examples/apache/startup.pl     /etc/apache2/</userinput>
1213                                                         </screen>
1214                                                 </step>
1215                                                 <step xml:id="serversideinstallation-createsslcertificate">
1216                                                         <title>Create a Security Certificate</title>
1217                                                         <para>In this step you will create a new Security Certificate (SSL Key)
1218                                                         for the Apache server using the <command>openssl</command> command. For a
1219                                                         public production server you must configure or purchase a signed SSL
1220                                                         certificate, but for now you can just use a self-signed certificate and
1221                                                         accept the warnings in the Staff Client and browser during testing and
1222                                                         development. As the <systemitem class="username">root</systemitem> user,
1223                                                         perform the following commands:</para>
1224                                                         <screen>
1225                                                                 <prompt># as the root user:</prompt>
1226                                                                 <userinput>mkdir /etc/apache2/ssl</userinput>
1227                                                                 <userinput>cd /etc/apache2/ssl</userinput>
1228                                                                 <userinput>openssl req -new -x509 -days 365 -nodes -out server.crt -keyout server.key</userinput>
1229                                                         </screen>
1230                                                         <para>You will be prompted for several items of information; enter
1231                                                         the appropriate information for each item. The new files
1232                                                         <filename>server.crt</filename> and <filename>server.key</filename> will
1233                                                         be created in the directory 
1234                                                         <filename class="directory">/etc/apache2/ssl</filename> .</para>
1235                                                         <note>
1236                                                                 <para>This step generates a self-signed SSL
1237                                                                 certificate. You must install a proper SSL certificate
1238                                                                 for a public production system to avoid warning messages
1239                                                                 when users login to their account through the OPAC or
1240                                                                 when staff login through the Staff Client.</para>
1241                                                                 <para>For further information on installing a proper SSL
1242                                                                 certificate, see <xref linkend="serversideinstallation-ssl"/>.</para>
1243                                                         </note>
1244                                                 </step>
1245                                                 <step xml:id="serversideinstallation-modify-apache">
1246                                                         <title>Update Apache configuration file</title>
1247                                                         <para>You must make several changes to the new Apache
1248                                                         configuration file
1249                                                         <filename>/etc/apache2/sites-available/eg.conf</filename> . 
1250                                                         As the <systemitem class="username">root</systemitem> user,
1251                                                         edit the file and make the following changes:</para>
1252                                                         <itemizedlist>
1253                                                                 <listitem>
1254                                                                         <para>In the section
1255                                                                         <literal>&lt;Directory "/openils/var/cgi-bin"></literal>
1256                                                                         replace this line:
1257                                                                         <literal>Allow from 10.0.0.0/8</literal> 
1258                                                                         with this line: <literal>Allow from all</literal>.</para>
1259                                                                         <warning>This change allows access to your configuration
1260                                                                         CGI scripts from any workstation on any network. This is
1261                                                                         only a temporary change to expedite testing and should be
1262                                                                         removed after you have finished and successfully tested
1263                                                                         the Evergreen installation. See 
1264                                                                         <xref linkend="serversideinstallation-postinstallation"/> 
1265                                                                         for further details on removing this change after the
1266                                                                         Evergreen installation is complete.
1267                                                                         </warning>
1268                                                                 </listitem>
1269                                                                 <listitem>
1270                                                                         <para>Comment out the line <literal>Listen 443</literal>,
1271                                                                         since it conflicts with the same declaration in the
1272                                                                         configuration file:
1273                                                                         <filename>/etc/apache2/ports.conf</filename>.  Note that
1274                                                                         <systemitem class="osname">Debian </systemitem> users
1275                                                                         should not do this since the conflict does not apply to
1276                                                                         that operating system.</para>
1277                                                                 </listitem>
1278                                                                 <listitem>
1279                                                                         <para>The following updates are needed to allow the logs
1280                                                                         to function properly, but it may break other Apache
1281                                                                         applications on your server:</para>
1282                                                                         <para>For the 
1283                                                                         <systemitem class="osname">Linux</systemitem> distributions
1284                                                                         <systemitem class="osname">Ubuntu Hardy</systemitem> or
1285                                                                         <systemitem class="osname">Debian Etch</systemitem>, as
1286                                                                         the <systemitem class="username">root</systemitem> user,
1287                                                                         edit the Apache configuration file
1288                                                                         <filename>/etc/apache2/apache2.conf</filename> and change
1289                                                                         the line <literal>User www-data</literal> to <literal>User
1290                                                                         opensrf</literal>.</para>
1291                                                                         <para>For the
1292                                                                         <systemitem class="osname">Linux</systemitem> distributions
1293                                                                         <systemitem class="osname">Ubuntu Karmic</systemitem>,
1294                                                                         <systemitem class="osname">Ubuntu Lucid</systemitem> or
1295                                                                         <systemitem class="osname">Debian Lenny</systemitem>, as
1296                                                                         the <systemitem class="username">root</systemitem> user,
1297                                                                         edit the Apache configuration file and change these
1298                                                                         lines:</para>
1299                                                                         <screen>
1300                                                                                 <prompt># as the root user:</prompt>
1301                                                                                 <userinput>export APACHE_RUN_USER=www-data</userinput>
1302                                                                                 <userinput>export APACHE_RUN_GROUP=www-data</userinput>
1303                                                                         </screen>
1304                                                                         <para>to instead read:</para>
1305                                                                         <screen>
1306                                                                                 <prompt># as the root user:</prompt>
1307                                                                                 <userinput>export APACHE_RUN_USER=opensrf</userinput>
1308                                                                                 <userinput>export APACHE_RUN_GROUP=opensrf</userinput>
1309                                                                         </screen>
1310                                                                 </listitem>
1311                                                                 <listitem>
1312                                                                         <para>As the 
1313                                                                         <systemitem class="username">root</systemitem> user,
1314                                                                         edit the Apache configuration file
1315                                                                         <filename>/etc/apache2/apache2.conf</filename> and
1316                                                                         modify the values for <literal>KeepAliveTimeout</literal>
1317                                                                         and <literal>MaxKeepAliveRequests</literal> to match
1318                                                                         the following:</para>
1319                                                                         <screen>
1320                                                                                 <prompt># as the root user:</prompt>
1321                                                                                 <userinput>KeepAliveTimeout       1</userinput>
1322                                                                                 <userinput>MaxKeepAliveRequests 100</userinput>
1323                                                                         </screen>
1324                                                                 </listitem>
1325                                                                 <listitem>
1326                                                                         <para>Further configuration changes to Apache may be
1327                                                                         necessary for busy systems. These changes increase the
1328                                                                         number of Apache server processes that are started to
1329                                                                         support additional browser connections.</para>
1330                                                                         <para>As the 
1331                                                                         <systemitem class="username">root</systemitem> user, 
1332                                                                         edit the Apache configuration file
1333                                                                         <filename>/etc/apache2/apache2.conf</filename>, locate 
1334                                                                         and modify the section related to <emphasis>prefork
1335                                                                         configuration</emphasis> to suit the load on your
1336                                                                         system:</para>
1337                                                                         <programlisting language="xml"><![CDATA[
1338 <IfModule mpm_prefork_module>
1339    StartServers    20
1340    MinSpareServers       5
1341    MaxSpareServers      15
1342    MaxClients       150
1343    MaxRequestsPerChild 10000
1344 </IfModule>
1345 ]]></programlisting>
1346                                                                 </listitem>
1347                                                         </itemizedlist>
1348                                                 </step>
1349                                                 <step>
1350                                                         <title>Enable the Evergreen web site</title>
1351                                                         <para>Finally, you must enable the Evergreen web site. As the
1352                                                         <systemitem class="username">root</systemitem> user, execute the
1353                                                         following Apache configuration commands to disable the default
1354                                                         <emphasis>It Works</emphasis> web page and enable the Evergreen
1355                                                         web site, and then restart the Apache server:</para>
1356                                                         <screen>
1357                                                                 <prompt># as the root user:</prompt>
1358                                                                 <prompt># disable/enable web sites</prompt>
1359                                                                 <userinput>a2dissite default</userinput>
1360                                                                 <userinput>a2ensite eg.conf</userinput>
1361                                                                 <prompt># restart the server</prompt>
1362                                                                 <userinput>/etc/init.d/apache2 reload</userinput>
1363                                                         </screen>
1364                                                 </step>
1365                                         </substeps>
1366                                 </step>
1367                                 <step xml:id="serversideinstallation-opensrf-config">
1368                                         <title>Update the OpenSRF Configuration File</title>
1369                                         <para>As the <systemitem class="username">opensrf</systemitem> user, edit the
1370                                         OpenSRF configuration file <filename>/openils/conf/opensrf_core.xml</filename>
1371                                         to update the Jabber usernames and passwords, and to specify the domain from
1372                                         which we will accept and to which we will make connections.</para>
1373                                         <para>If you are installing Evergreen on a single server and using the
1374                                         <systemitem class="domainname">private.localhost</systemitem> / 
1375                                         <systemitem class="domainname">public.localhost</systemitem> domains, 
1376                                         these will already be set to the correct values. Otherwise, search and replace
1377                                         to match your customized values.</para>
1378                                         <para>The left-hand side of  <xref linkend="serversideinstallation-xpath-table-2"/>
1379                                         shows common XPath syntax to indicate the approximate position within the XML
1380                                         file that needs changes. The right-hand side of the table shows the replacement
1381                                         values:</para>
1382                                         <table xml:id="serversideinstallation-xpath-table-2">
1383                                                 <title>Sample XPath syntax for editing "opensrf_core.xml"</title>
1384                                                 <tgroup align="left" cols="2" colsep="1" rowsep="1">
1385                                                         <colspec colname="Xpath" colnum="1" colwidth="1.6*"/>
1386                                                         <colspec colname="Value" colnum="2" colwidth="2.0*"/>
1387                                                         <thead>
1388                                                                 <row>
1389                                                                         <entry>XPath location</entry>
1390                                                                         <entry>Value</entry>
1391                                                                 </row>
1392                                                         </thead>
1393                                                         <tbody>
1394                                                                 <row>
1395                                                                         <entry>/config/opensrf/username</entry>
1396                                                                         <entry>
1397                                                                                 <systemitem class="username">opensrf</systemitem>
1398                                                                         </entry>
1399                                                                 </row>
1400                                                                 <row>
1401                                                                         <entry>/config/opensrf/passwd </entry>
1402                                                                         <entry><systemitem class="domainname">private.localhost</systemitem>
1403                                                                         password for
1404                                                                         <systemitem class="username">opensrf</systemitem> user
1405                                                                         </entry>
1406                                                                 </row>
1407                                                                 <row>
1408                                                                         <entry>/config/gateway/username</entry>
1409                                                                         <entry>
1410                                                                                 <systemitem class="username">opensrf</systemitem>
1411                                                                         </entry>
1412                                                                 </row>
1413                                                                 <row>
1414                                                                         <entry>/config/gateway/passwd</entry>
1415                                                                         <entry><systemitem class="domainname">public.localhost</systemitem>
1416                                                                         password for
1417                                                                         <systemitem class="username">opensrf</systemitem> user
1418                                                                         </entry>
1419                                                                 </row>
1420                                                                 <row>
1421                                                                         <entry>/config/routers/router/transport/username,
1422                                                                         first entry where server == public.localhost</entry>
1423                                                                         <entry>
1424                                                                                 <systemitem class="username">router</systemitem>
1425                                                                         </entry>
1426                                                                 </row>
1427                                                                 <row>
1428                                                                         <entry>/config/routers/router/transport/password,
1429                                                                         first entry where server == public.localhost</entry>
1430                                                                         <entry><systemitem class="domainname">public.localhost</systemitem>
1431                                                                         password for
1432                                                                         <systemitem class="username">router</systemitem> user
1433                                                                         </entry>
1434                                                                 </row>
1435                                                                 <row>
1436                                                                         <entry>/config/routers/router/transport/username,
1437                                                                         second entry where server == private.localhost</entry>
1438                                                                         <entry>
1439                                                                                 <systemitem class="username">router</systemitem>
1440                                                                         </entry>
1441                                                                 </row>
1442                                                                 <row>
1443                                                                         <entry>/config/routers/router/transport/password,
1444                                                                         second entry where server == private.localhost</entry>
1445                                                                         <entry><systemitem class="domainname">private.localhost</systemitem>
1446                                                                         password for
1447                                                                         <systemitem class="username">router</systemitem> user
1448                                                                         </entry>
1449                                                                 </row>
1450                                                         </tbody>
1451                                                 </tgroup>
1452                                         </table>
1453                                 </step>
1454                                 <step performance="optional">
1455                                         <title>(OPTIONAL) Create Configuration Files for Users Needing <command>srfsh</command></title>
1456                                         <para>When OpenSRF was installed in <xref linkend="serversideinstallation-opensrf"/>, the
1457                                         software installation automatically created a utility named <command>srfsh</command> (surf
1458                                         shell). This is a command line diagnostic tool for testing and interacting with
1459                                         OpenSRF. It will be used in a future step to complete and test the Evergreen installation.
1460                                         Earlier in <xref linkend="serversideinstallation-srfsh"/> you also created a configuration 
1461                                         file <filename>~/.srfsh.xml</filename> for each user that might need to use the utility.
1462                                         See <xref linkend="serversideinstallation-testing"/> for further information.</para>
1463                                 </step>
1464                                 <step xml:id="serversideinstallation-opensrf-env">
1465                                         <title>Modify the OpenSRF Environment</title>
1466                                         <para>As the <systemitem class="username">opensrf</systemitem> user,
1467                                         modify the shell configuration file <filename>~/.bashrc</filename> for
1468                                         user <systemitem class="username">opensrf</systemitem> by adding a Perl environmental
1469                                         variable, then execute the shell configuration file to load the new variables into
1470                                         your current environment.</para>
1471                                         <note>
1472                                                 <para>
1473                                                         <emphasis>In a multi-server environment, you must add any
1474                                                         modifications to <filename>~/.bashrc</filename> to the top of
1475                                                         the file <emphasis>before</emphasis> the line 
1476                                                         <literal>[ -z "$PS1" ] &amp;&amp; return </literal>.
1477                                                         This will allow headless (scripted) logins to load the correct
1478                                                         environment.</emphasis>
1479                                                 </para>
1480                                         </note>
1481                                         <screen>
1482                                                 <prompt># as the opensrf user:</prompt>
1483                                                 <userinput>echo "export PERL5LIB=/openils/lib/perl5:\$PERL5LIB" >> ~/.bashrc</userinput>
1484                                                 <userinput>. ~/.bashrc</userinput>
1485                                         </screen>
1486                                 </step>
1487                                 <step performance="optional">
1488                                         <title>(OPTIONAL) Enable and Disable Language Localizations</title>
1489                                         <para>You can load translations such as Armenian (hy-AM), Canadian French
1490                                         (fr-CA), and others into the database to complete the translations available in
1491                                         the OPAC and Staff Client. For further information, see
1492                                         <xref linkend="enabling_and_disabling_localization"/>.</para>
1493                                 </step>
1494                         </procedure>
1495                 </section>
1496                 <section xml:id="serversideinstallation-starting">
1497                         <title>Starting Evergreen</title>
1498                         <procedure>
1499                                 <step>
1500                                         <para>As the <systemitem class="username">root</systemitem>
1501                                         user, start the <systemitem class="service">ejabberd</systemitem> and 
1502                                         <systemitem class="service">memcached</systemitem> services as follows:</para>
1503                                         <screen>
1504                                                 <prompt># as the root user:</prompt>
1505                                                 <userinput>/etc/init.d/ejabberd start</userinput>
1506                                                 <userinput>/etc/init.d/memcached start</userinput>
1507                                         </screen>
1508                                 </step>
1509                                 <step>
1510                                         <para>As the <systemitem class="username">opensrf</systemitem> user,
1511                                         start Evergreen as follows:</para>
1512                                         <screen>
1513                                                 <prompt># as the opensrf user:</prompt>
1514                                                 <userinput>osrf_ctl.sh -l -a start_all</userinput>
1515                                         </screen>
1516                                         <para>The flag <option>-l</option> forces Evergreen to use 
1517                                         <systemitem class="domainname">localhost</systemitem> (your current system) 
1518                                         as the hostname. The flag <option>-a start_all</option>  starts the other 
1519                                         OpenSRF <systemitem class="service">router</systemitem> , 
1520                                         <systemitem class="service">Perl</systemitem> , and
1521                                         <systemitem class="service">C</systemitem> services.</para>
1522                                         <itemizedlist>
1523                                                 <listitem>
1524                                                         <para>You can also start Evergreen without the
1525                                                         <option>-l</option> flag, but the <command>osrf_ctl.sh</command>
1526                                                         utility must know the fully qualified domain name for the system
1527                                                         on which it will execute. That hostname was probably specified
1528                                                         in the configuration file <filename>opensrf.xml</filename> which
1529                                                         you configured in a previous step.</para>
1530                                                 </listitem>
1531                                                 <listitem>
1532                                                         <para>If you receive an error message similar to
1533                                                         <emphasis>osrf_ctl.sh: command not found</emphasis>, then your
1534                                                         environment variable <envar>PATH</envar> does not include the
1535                                                         directory <filename class="directory">/openils/bin</filename>.
1536                                                         As the <systemitem class="username">opensrf</systemitem> user,
1537                                                         edit the configuration file <filename>~/.bashrc</filename> and
1538                                                         add the following line: 
1539                                                         <literal>export PATH=$PATH:/openils/bin</literal></para>
1540                                                 </listitem>
1541                                                 <listitem>
1542                                                         <para>If you receive an error message similar to <emphasis>Can't
1543                                                         locate OpenSRF/System.pm in @INC ... BEGIN failed--compilation
1544                                                         aborted</emphasis>, then your environment variable 
1545                                                         <emphasis role="bold">PERL5LIB</emphasis> does not include the 
1546                                                         directory <filename class="directory">/openils/lib/perl5</filename>.
1547                                                         As the <systemitem class="username">opensrf</systemitem> user, 
1548                                                         edit the configuration file <filename>~/.bashrc</filename> and
1549                                                         add the following line: 
1550                                                         <literal>export PERL5LIB=$PERL5LIB:/openils/lib/perl5</literal></para>
1551                                                 </listitem>
1552                                         </itemizedlist>
1553                                 </step>
1554                                 <step>
1555                                         <para>In this step you will generate the Web files needed by the Staff Client
1556                                         and catalog, and calculate the proximity of locations in the Organizational Unit
1557                                         tree (which allows <emphasis>Holds</emphasis> to work properly). You must do
1558                                         this the first time you start Evergreen and after making any changes to the
1559                                         library hierarchy. As the <systemitem class="username">opensrf</systemitem>
1560                                         user, execute the following commands:</para>
1561                                         <screen>
1562                                                 <prompt># as the opensrf user:</prompt>
1563                                                 <userinput>cd /openils/bin</userinput>
1564                                                 <userinput>./autogen.sh -c /openils/conf/opensrf_core.xml -u</userinput>
1565                                                 <computeroutput>Updating Evergreen organization tree and IDL using '/openils/conf/opensrf_core.xml'</computeroutput>
1566                                                 <computeroutput>Updating fieldmapper</computeroutput>
1567                                         </screen>
1568                                 </step>
1569                                 <step>
1570                                         <para>As the <systemitem class="username">root</systemitem> user, restart the
1571                                         Apache Web server:</para>
1572                                         <screen>
1573                                                 <prompt># as the root user:</prompt>
1574                                                 <userinput>/etc/init.d/apache2 restart</userinput>
1575                                         </screen>
1576                                         <note>
1577                                                 <para>If the Apache Web server was running when you started the OpenSRF
1578                                                 services, you might not be able to successfully log into the OPAC or
1579                                                 Staff Client until the Apache Web server has been restarted.</para>
1580                                         </note>
1581                                 </step>
1582                         </procedure>
1583                 </section>
1584                 <section xml:id="serversideinstallation-testing">
1585                         <title>Testing Your Evergreen Installation</title>
1586                         <para>This section describes several simple tests you can perform to verify that the Evergreen
1587                         server-side software has been installed and configured properly and is running as
1588                         expected.</para>
1589                         <simplesect xml:id="serversideinstallation-testing-connections">
1590                                 <title>Testing Connections to Evergreen</title>
1591                                 <para>Once you have installed and started Evergreen, test your connection to Evergreen. Start the
1592                                 <command>srfsh</command> application and try logging onto the Evergreen server using the default
1593                                 administrator username and password. Following is sample output generated by executing
1594                                 <command>srfsh</command> after a successful Evergreen installation. For help with
1595                                 <command>srfsh</command> commands, type <userinput>help</userinput> at the prompt.
1596                                 As the <systemitem class="username">opensrf</systemitem> user,
1597                                 execute the following commands to test your Evergreen connection:</para>
1598                                 <screen>
1599                                         <prompt># as the opensrf user:</prompt>
1600                                         <userinput>/openils/bin/srfsh</userinput>
1601                                         <computeroutput>srfsh%</computeroutput>
1602                                         <userinput>login admin open-ils</userinput>
1603                                         <computeroutput>Received Data: "250bf1518c7527a03249858687714376"</computeroutput>
1604                                         <computeroutput>------------------------------------</computeroutput>
1605                                         <computeroutput>Request Completed Successfully</computeroutput>
1606                                         <computeroutput>Request Time in seconds: 0.045286</computeroutput>
1607                                         <computeroutput>------------------------------------</computeroutput>
1608                                         <computeroutput>Received Data: {</computeroutput>
1609                                         <computeroutput>   "ilsevent":0,</computeroutput>
1610                                         <computeroutput>   "textcode":"SUCCESS",</computeroutput>
1611                                         <computeroutput>   "desc":" ",</computeroutput>
1612                                         <computeroutput>   "pid":21616,</computeroutput>
1613                                         <computeroutput>   "stacktrace":"oils_auth.c:304",</computeroutput>
1614                                         <computeroutput>   "payload":{</computeroutput>
1615                                         <computeroutput>      "authtoken":"e5f9827cc0f93b503a1cc66bee6bdd1a",</computeroutput>
1616                                         <computeroutput>      "authtime":420</computeroutput>
1617                                         <computeroutput>   }</computeroutput>
1618                                         <computeroutput>}</computeroutput>
1619                                         <computeroutput>------------------------------------</computeroutput>
1620                                         <computeroutput>Request Completed Successfully</computeroutput>
1621                                         <computeroutput>Request Time in seconds: 1.336568</computeroutput>
1622                                         <computeroutput>------------------------------------</computeroutput>
1623                                 </screen>
1624                                 <para>If this does not work, try the following:</para>
1625                                 <itemizedlist>
1626                                         <listitem>
1627                                                 <para>As the <systemitem class="username">opensrf</systemitem> user, run the
1628                                                 <filename>settings-tester.pl</filename> utility to review your Evergreen
1629                                                 installation for any system configuration problems:</para>
1630                                                 <screen>
1631                                                         <prompt># as the opensrf user:</prompt>
1632                                                         <userinput>cd /home/opensrf</userinput>
1633                                                         <userinput>./Evergreen-ILS-1.6.1.2/Open-ILS/src/support-scripts/settings-tester.pl</userinput>
1634                                                 </screen>
1635                                                 <para>If the output of <command>settings-tester.pl</command> does not help you
1636                                                 find the problem, please do not make any significant changes to your
1637                                                 configuration.</para>
1638                                         </listitem>
1639                                         <listitem>
1640                                                 <para>Follow the steps in the troubleshooting guide in 
1641                                                 <xref linkend="troubleshooting"/>.</para>
1642                                         </listitem>
1643                                         <listitem>
1644                                                 <para>If you have followed the entire set of installation steps listed here
1645                                                 closely, you are probably extremely close to a working system. Gather your
1646                                                 configuration files and log files and contact the 
1647                                                 <ulink url="http://open-ils.org/listserv.php">Evergreen Development Mailing List</ulink>
1648                                                 list for assistance before making any drastic changes to your system
1649                                                 configuration.</para>
1650                                         </listitem>
1651                                 </itemizedlist>
1652                         </simplesect>
1653                 </section>
1654                 <section xml:id="serversideinstallation-postinstallation">
1655                         <title>Post-Installation Chores</title>
1656                         <para>There are several additional steps you may need to complete after Evergreen has been
1657                         successfully installed and tested. Some steps may not be needed (e.g., setting up support for
1658                         Reports).</para>
1659                         <section>
1660                                 <title>Remove temporary Apache configuration changes</title>
1661                                 <para>You modified the Apache configuration file
1662                                 <filename>/etc/apache2/sites-available/eg.conf</filename> in an earlier step as a
1663                                 temporary measure to expedite testing (see 
1664                                 <xref linkend="serversideinstallation-modify-apache"/> for further information).
1665                                 Those changes must now be reversed in order to deny unwanted access to your 
1666                                 CGI scripts from users on other public networks.</para>
1667                                 <warning>
1668                                         <para>
1669                                                 <emphasis>This temporary network update was done to expedite
1670                                                 testing. You <emphasis role="bold"> must</emphasis> correct
1671                                                 this for a public production system.</emphasis>
1672                                         </para>
1673                                 </warning>
1674                                 <para>As the <systemitem class="username">root</systemitem> user, edit the configuration
1675                                 file again and comment out the line <literal>Allow from all</literal> and uncomment the
1676                                 line <literal>Allow from 10.0.0.0/8</literal>, then change it to match your network
1677                                 address scheme.</para>
1678                         </section>
1679                         <section xml:id="serversideinstallation-ssl">
1680                                 <title>Configure a permanent SSL key</title>
1681                                 <para>In a previous step (see <xref linkend="serversideinstallation-createsslcertificate"/>)
1682                                 you used the command <command>openssl</command> to temporarily
1683                                 create a new SSL key for the Apache server. This self-signed security certificate was adequate
1684                                 during testing and development, but will continue to generate warnings in the Staff Client 
1685                                 and browser. For a public production server you should configure or purchase a signed SSL
1686                                 certificate.</para>
1687                                 <para>There are several open source software solutions that provide schemes to generate and
1688                                 maintain public key security certificates for your library system. Some popular projects are
1689                                 listed below; please review them for background information on why you need such a system and 
1690                                 how you can provide it:</para>
1691                                 <itemizedlist>
1692                                         <listitem>
1693                                                 <ulink url="http://www.openca.org/projects/openca/">http://www.openca.org/projects/openca/</ulink>
1694                                         </listitem>
1695                                         <listitem>
1696                                                 <ulink url="http://sourceforge.net/projects/ejbca/">http://sourceforge.net/projects/ejbca/</ulink>
1697                                         </listitem>
1698                                         <listitem>
1699                                                 <ulink url="http://pki.fedoraproject.org">http://pki.fedoraproject.org</ulink>
1700                                         </listitem>
1701                                 </itemizedlist>
1702                                 <warning>
1703                                         <para>
1704                                                 <emphasis>The temporary SSL key was only created to expedite
1705                                                 testing. You should install a proper SSL certificate for a public
1706                                                 production system.</emphasis>
1707                                         </para>
1708                                 </warning>
1709                         </section>
1710                         <section>
1711                                 <title>Set Up Support For Reports</title>
1712                                 <para>Evergreen reports are extremely powerful but require some simple configuration.
1713                                 This section describes starting and stopping the Reporter daemon processes.</para>
1714                                 <itemizedlist>
1715                                         <listitem>
1716                                                 <para>Starting the Reporter Daemon</para>
1717                                                 <para>Once the <systemitem class="daemon">open-ils.reporter</systemitem>
1718                                                 process is running and enabled on the gateway, you can start the
1719                                                 Reporter daemon. That process periodically checks for requests for new
1720                                                 or scheduled reports, then starts them as required.</para>
1721                                                 <para>As the <systemitem class="username">opensrf</systemitem> user,
1722                                                 start the Reporter daemon using the following command:</para>
1723                                                 <screen>
1724                                                         <prompt># as the opensrf user:</prompt>
1725                                                         <userinput>cd /home/opensrf/Evergreen-ILS-1.6.1.2/Open-ILS/src/reporter</userinput>
1726                                                         <userinput>./clark-kent.pl --daemon</userinput>
1727                                                 </screen>
1728                                                 <para>You can control how the <command>clark-kent.pl</command> utility behaves
1729                                                 by specifying any of several command-line options:</para>
1730                                                 <itemizedlist>
1731                                                         <listitem><option>--sleep=interval</option> : number of seconds
1732                                                         to sleep between checks for new reports to run; defaults to
1733                                                         <literal>10</literal></listitem>
1734                                                         <listitem><option>--lockfile=filename</option> : where to place
1735                                                         the lockfile for the process; defaults to
1736                                                         <filename>/tmp/reporter-LOCK</filename></listitem>
1737                                                         <listitem><option>--concurrency=integer</option> : number of
1738                                                         Reporter daemon processes to run; defaults to
1739                                                         <literal>1</literal></listitem>
1740                                                         <listitem><option>--bootstrap=filename</option> : OpenSRF
1741                                                         bootstrap configuration file; defaults to
1742                                                         <filename>/openils/conf/opensrf_core.xml</filename></listitem>
1743                                                 </itemizedlist>
1744                                         </listitem>
1745                                         <listitem>
1746                                                 <para>Stopping the Reporter Daemon</para>
1747                                                 <para>To stop the Reporter daemon, you must kill the process and remove
1748                                                 the lockfile. The daemon may have just a single associated process or
1749                                                 there may be several processes if the daemon was started with the optional
1750                                                 <literal>--concurrency</literal> switch. It will also have a lockfile
1751                                                 in the default location.</para>
1752                                                 <para>As the <systemitem class="username">opensrf</systemitem> user,
1753                                                 execute the following shell commands:</para>
1754                                                 <screen>
1755                                                         <prompt># as the root user:</prompt>
1756                                                         <prompt># find and kill the process ID number(s)</prompt>
1757                                                         <userinput>kill `ps wax | grep "Clark Kent" | grep -v grep | cut -b1-6`</userinput>
1758                                                         <prompt># remove the lock file</prompt>
1759                                                         <userinput>rm /tmp/reporter-LOCK</userinput>
1760                                                 </screen>
1761                                         </listitem>
1762                                 </itemizedlist>
1763                         </section>
1764                 </section>
1765                 <section xml:id="serversideinstallation-virtual">
1766                         <title>Installing In Virtualized <systemitem class="osname">Linux</systemitem> Environments</title>
1767                         <para>This section describes the installation of Evergreen software in so-called "virtualized"
1768                         software environments. Evergreen software runs as a native application on any of several
1769                         well-known x86 (32-bit) and x86-64 (64-bit) <systemitem class="osname">Linux</systemitem>
1770                         distributions including <systemitem class="osname">Ubuntu</systemitem> and 
1771                         <systemitem class="osname">Debian</systemitem> but it does not run as a native application 
1772                         on the <systemitem class="osname">Microsoft Windows</systemitem> operating system. 
1773                         However, it is possible to execute Evergreen on a <systemitem class="osname">Windows</systemitem> 
1774                         host system by running it within a virtual Linux-guest installation, which itself executes 
1775                         on the <systemitem class="osname">Windows</systemitem> system. 
1776                         The <systemitem class="osname">Linux</systemitem> environment is fully emulated and acts 
1777                         (within limits) just as if it were executing on a real standalone system.</para>
1778                         <para>This technique of emulating a <systemitem class="osname">Linux</systemitem> environment on
1779                         a <systemitem class="osname">Windows</systemitem> host is a practical way to install and run an
1780                         Evergreen system if it is not possible to dedicate a physical machine solely as a 
1781                         <systemitem class="osname">Linux</systemitem> host for Evergreen. This architecture is not
1782                         recommended for large scale systems since there are performance limitations to running Evergreen
1783                         in a virtualized environment. However, it is a reasonable architecture for smaller experimental
1784                         systems, as a proof of concept, or as a conference-room pilot.</para>
1785                         <simplesect>
1786                                 <title>Installing Virtualization Software</title>
1787                                 <para>As described above, Evergreen can be installed on top of an emulated
1788                                 <systemitem class="osname">Linux</systemitem> environment. The 
1789                                 <systemitem class="osname">Linux</systemitem> environment, in turn, is installed 
1790                                 on top of a software application such as <application>"VirtualBox"</application>,
1791                                 <application>"VMware"</application> or <application>"VirtualPC"</application> which must
1792                                 first be installed on the <systemitem class="osname">Windows</systemitem> system. This
1793                                 section contains step-by-step examples that show installing popular virtualization
1794                                 applications on a <systemitem class="osname">Windows</systemitem> host system. Following
1795                                 this section are further descriptions of installing 
1796                                 <systemitem class="osname">Linux</systemitem> and Evergreen systems using that 
1797                                 virtualization software.</para>
1798                                 <simplesect>
1799                                         <title>Installing <application>"VirtualBox"</application> Virtualization Software</title>
1800                                         <para>This section reviews installation of the
1801                                         <application>"VirtualBox"</application> application on 
1802                                         <systemitem class="osname">WindowsXP Professional (SP2)</systemitem>. 
1803                                         Download the latest edition of <application>VirtualBox</application> from their official website: 
1804                                         <link xl:href="http://virtualbox.org" xl:title="virtual box">http://virtualbox.org</link>
1805                                         and follow the on screen instructions to install the software.</para>
1806                                 </simplesect>
1807                                 <simplesect>
1808                                         <title>Installing VMware Virtualization Software</title>
1809                                         <indexterm>
1810                                                 <primary>virtualization software</primary>
1811                                                 <secondary>VMware</secondary>
1812                                         </indexterm>
1813                                         <para>This section reviews installation of the
1814                                         <application>"VMware"</application> application on
1815                                         <systemitem class="osname">WindowsXP Professional (SP2)</systemitem>. 
1816                                         Find and Download the free virtual machine software of from the VMware
1817                                         official website:
1818                                         <ulink url="http://downloads.vmware.com">http://downloads.vmware.com</ulink> 
1819                                         and follow the on-screen instructions.</para>
1820                                 </simplesect>
1821                         </simplesect>
1822                         <simplesect xml:id="serversideinstallation-virtual-install-linux-ev">
1823                                 <title>Installing <systemitem class="osname">Linux</systemitem> / 
1824                                                 Evergreen on Virtualization Software</title>
1825                                 <para>After the virtualization software is installed and running, there are two ways to
1826                                 continue with installing <systemitem class="osname">Linux</systemitem> and Evergreen
1827                                 software in the new virtualized environment:</para>
1828                                 <orderedlist>
1829                                         <listitem>
1830                                                 <para>Download and install a prebuilt software image that contains a
1831                                                 working <systemitem class="osname">Linux</systemitem> / Evergreen system
1832                                                 (see <xref linkend="serversideinstall-virtual-prebuilt"/> for
1833                                                 details)</para>
1834                                         </listitem>
1835                                         <listitem>
1836                                                 <para>Manually install a <systemitem class="osname">Linux</systemitem>
1837                                                 guest system, then manually install Evergreen on it.</para>
1838                                         </listitem>
1839                                 </orderedlist>
1840                                 <para>We review each method in the following sections.</para>
1841                                 <simplesect xml:id="serversideinstall-virtual-prebuilt">
1842                                         <title>Download and install a prebuilt software image</title>
1843                                         <para>You can download a prebuilt software image that, when installed with your
1844                                         virtualization software, emulates a 
1845                                         <systemitem class="osname">Linux</systemitem> guest system containing a running 
1846                                         Evergreen distribution. The image is essentially a snapshot of a hard disk from
1847                                         a fully configured, functional <systemitem class="osname">Linux</systemitem>
1848                                         system with Evergreen already installed.</para>
1849                                         <para>We recommend this approach if you wish to get Evergreen running quickly
1850                                         with minimal attention to configuration. After reviewing only a few
1851                                         configuration details you can have a working Evergreen system that integrates
1852                                         smoothly with the rest of your network. See 
1853                                         <xref linkend="serversideinstall-virtual-versions"/> for a list of prebuilt 
1854                                         software images that are currently available to download and install</para>
1855                                         <note>DISCLAIMER: The following virtual images have been contributed by members
1856                                         of the Evergreen community for the purposes of testing, evaluation, training,
1857                                         and development.</note>
1858                                         <table xml:id="serversideinstall-virtual-versions">
1859                                                 <title>Linux / Evergreen Virtual Images</title>
1860                                                 <tgroup align="left" cols="4" colsep="1" rowsep="1">
1861                                                         <colspec colnum="1" colwidth="1.0*"/>
1862                                                         <colspec colnum="2" colwidth="1.0*"/>
1863                                                         <colspec colnum="3" colwidth="3.0*"/>
1864                                                         <colspec colnum="4" colwidth="1.0*"/>
1865                                                         <thead>
1866                                                                 <row>
1867                                                                         <entry>Linux Version</entry>
1868                                                                         <entry>Evergreen Version</entry>
1869                                                                         <entry>Image</entry>
1870                                                                         <entry>Comments</entry>
1871                                                                 </row>
1872                                                         </thead>
1873                                                         <tbody>
1874                                                                 <row>
1875                                                                         <entry>Debian lenny (5.0)</entry>
1876                                                                         <entry>1.6.0.1</entry>
1877                                                                         <entry>
1878                                                                                 <ulink url="http://www.open-ils.org/~denials/Evergreen1601_DebianLenny.zip"> download </ulink>
1879                                                                         </entry>
1880                                                                         <entry>VirtualBox image</entry>
1881                                                                 </row>
1882                                                                 <row>
1883                                                                         <entry>Ubuntu karmic koala (9.10)</entry>
1884                                                                         <entry>1.6.0.0</entry>
1885                                                                         <entry>
1886                                                                                 <ulink url="http://www.open-ils.org/~denials/Evergreen-1600-Karmic.zip"> download </ulink>
1887                                                                         </entry>
1888                                                                         <entry>VirtualBox image</entry>
1889                                                                 </row>
1890                                                         </tbody>
1891                                                 </tgroup>
1892                                         </table>
1893                                         <procedure>
1894                                                 <title>VirtualBox Example</title>
1895                                                 <indexterm>
1896                                                         <primary>virtualization software</primary>
1897                                                         <secondary>VirtualBox</secondary>
1898                                                 </indexterm>
1899                                                 <step>
1900                                                         <para>Start VirtualBox for the first time and select
1901                                                         <menuchoice><guimenu>File</guimenu><guimenuitem>VirtualBox Media
1902                                                         Manager</guimenuitem><guimenuitem>Add</guimenuitem></menuchoice>
1903                                                         to locate the prebuilt software image just downloaded (the
1904                                                         example shows it was extracted from the original
1905                                                         <filename class="extension">zip</filename> file into a temporary directory
1906                                                         <filename class="directory">C:\temp</filename>).</para>
1907                                                 </step>
1908                                                 <step>
1909                                                         <para>After selecting the file, click <guibutton>Open</guibutton> to import it.</para>
1910                                                 </step>
1911                                                 <step>
1912                                                         <para>Then click <guibutton>OK</guibutton> to save the selection
1913                                                         and return to the VirtualBox Media Manager</para>
1914                                                 </step>
1915                                                 <step>
1916                                                         <para>Click <guibutton>New</guibutton>, then <guibutton>Next</guibutton> to continue
1917                                                         and create a new virtual machine (VM).</para>
1918                                                 </step>
1919                                                 <step>
1920                                                         <para>Create a new name for the VM and set the operating system
1921                                                         type, then click <guibutton>Next</guibutton>.</para>
1922                                                 </step>
1923                                                 <step>
1924                                                         <para>Set the memory size (at least 512Mb),
1925                                                         then click <guibutton>Next</guibutton>.</para>
1926                                                 </step>
1927                                                 <step>
1928                                                         <para>Edit the Virtual Hard Disk configuration settings; click
1929                                                         the radio boxes <guilabel>Boot Hard Disk</guilabel> and
1930                                                         <guilabel>Use existing hard disk</guilabel>
1931                                                         and ensure that the disk name <guilabel>Evergreen1601_DebianLenny.vmdk</guilabel>
1932                                                         is selected. Click <guibutton>Finish</guibutton> to finish the
1933                                                         setup.</para>
1934                                                 </step>
1935                                                 <step>
1936                                                         <para>Install the <application>VirtualBox Guest
1937                                                         Additions</application> (really a required upgrade to
1938                                                         VirtualBox)</para>
1939                                                 </step>
1940                                                 <step>
1941                                                         <para>Return to VirtualBox and see the summary of the VM just
1942                                                         created. Click <guibutton>Start</guibutton> to boot the new VM.</para>
1943                                                 </step>
1944                                                 <step>
1945                                                         <para>See the start of the <systemitem class="osname">Linux</systemitem>
1946                                                         boot sequence. Choose <guimenuitem>Debian Gnu/Linux, kernel
1947                                                         2.6.26-2-686</guimenuitem> from the startup menu and click
1948                                                         <guibutton>Enter</guibutton> to start 
1949                                                         <systemitem class="osname">Linux</systemitem> and Evergreen. 
1950                                                         After some delay you should see the command line prompt 
1951                                                         <prompt>debian-lenny login:</prompt>. Log in with username
1952                                                         <userinput>root</userinput> and password <userinput>evergreen</userinput>
1953                                                         to continue.</para>
1954                                                 </step>
1955                                         </procedure>
1956                                 </simplesect>
1957                         </simplesect>
1958                 </section>
1959         </section>
1960 </chapter>