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