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