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