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