Upgrading evergreen reflect 1.6.2 updates.
[working/Evergreen.git] / 1.6 / admin / Upgrading-Evergreen_1.6.xml
1 <?xml version='1.0' encoding='UTF-8'?>\r
2 <chapter xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude"\r
3         xmlns:xl="http://www.w3.org/1999/xlink" version="5.0" xml:id="upgradingevergreen">\r
4         <info>\r
5                 <title>Upgrading Evergreen from 1.4 to 1.6.2</title>\r
6                 <abstract>\r
7                         <para>This Chapter will explain the step-by-step process of upgrading <application>Evergreen\r
8                         </application> from version 1.4 to 1.6.2, including steps to upgrade <application>OpenSRF</application>. Before \r
9                         upgrading, it is important to carefully plan an upgrade strategy to minimize system downtime and \r
10                         service interruptions. All of the steps in this chapter are to be completed from the command line.</para>\r
11                 </abstract>\r
12         </info>    \r
13                 <para>In the following instructions, you are asked to perform certain steps as either the <systemitem class="username">root</systemitem>  or <systemitem class="username">opensrf</systemitem> user.</para>\r
14                 <itemizedlist>\r
15                         <listitem>Debian: To become the <systemitem class="username">root</systemitem> user, issue the <command>su</command> command and enter the password of the \r
16                         <systemitem class="username">root</systemitem> user.</listitem>\r
17                         <listitem>Ubuntu: To become the <systemitem class="username">root</systemitem> user, issue the <command>sudo su</command> command and enter the password of your current user.</listitem>\r
18                 </itemizedlist>\r
19                 <para>To switch from the <systemitem class="username">root</systemitem> user to a different user, issue the <command>su - [user]</command> command; for example, \r
20                 <command>su - opensrf</command>. Once you have become a non-root user, to become the <systemitem class="username">root</systemitem> user again simply issue the exit command.</para> \r
21                 <para>In the following instructions, <filename class='directory'>/path/to/OpenSRF/</filename> represents the path to the OpenSRF source directory.</para>\r
22         <section xml:id="upgradingevergreen-stop_evergreen">\r
23                 <title>Stop Evergreen and back up data.</title>\r
24                 <procedure>\r
25                         <step>\r
26                                 <para>As <systemitem class="username">root</systemitem>, stop the <application>Apache</application> \r
27                                 web server<indexterm><primary>web server</primary><secondary>Apache</secondary></indexterm>.</para>\r
28                         </step>\r
29                         <step>\r
30                                 <para>As the <systemitem class="username">opensrf</systemitem> user, stop all \r
31                                 <application>Evergreen</application>\r
32                                 and <application>OpenSRF</application> services:</para>\r
33                                 <screen><userinput>osrf_ctl.sh -l -a stop_all</userinput></screen>\r
34                         </step>\r
35                         <step>\r
36                                 <para>Back up of the <filename class='directory'>/openils</filename> \r
37                                 directory.</para>\r
38                         </step>\r
39                         <step>\r
40                                 <para><link linkend="backingup">Back up the <application>evergreen\r
41                                 </application> database</link>.</para>\r
42                         </step>\r
43                 </procedure>\r
44         </section>\r
45         <section xml:id="upgradingevergreen-upgradingOpenSRF">\r
46                 <title>Upgrading OpenSRF to 1.6</title><indexterm><primary>OpenSRF</primary></indexterm>\r
47                 <procedure>\r
48                         <step>\r
49                                 <para>As the <systemitem class="username">opensrf</systemitem> user, download and extract the source files for <application>OpenSRF</application> \r
50                                 1.4:</para>\r
51 <screen><userinput>\r
52 wget http://open-ils.org/downloads/OpenSRF-1.6.2.tar.gz\r
53 tar xzf OpenSRF-1.4.0.tar.gz\r
54 </userinput></screen>\r
55                                 <para>A new directory OpenSRF-1.6.2 is created.</para>\r
56                                 <note><para>For the latest edition of OpenSRF, check the Evergreen download page at \r
57                                 <ulink url="http://www.open-ils.org/downloads.php" />.\r
58                                 </para></note>\r
59                         </step>\r
60                         <step>  \r
61                                 <para>As the <systemitem class="username">root</systemitem> user, install the software prerequisites using the automatic \r
62                                 prerequisite installer.</para> \r
63 <screen><userinput>\r
64 aptitude install make\r
65 cd /home/opensrf/OpenSRF-1.6.2\r
66 </userinput></screen>           \r
67                                 <para>Replace <option>[distribution]</option> below with the following value \r
68                                 for your distribution:</para>\r
69                                 <itemizedlist>\r
70                                         <listitem>\r
71                                                 <para><option>debian-etch</option> for <systemitem class="osname">Debian Etch (4.0)</systemitem>\r
72                                                 <indexterm><primary>Linux</primary><secondary>Debian</secondary></indexterm></para>\r
73                                         </listitem>\r
74                                         <listitem>\r
75                                                 <para><option>debian-lenny</option> for <systemitem class="osname">Debian Lenny (5.0)</systemitem></para>\r
76                                         </listitem>\r
77                                         <listitem>\r
78                                         <para><option>ubuntu-hardy</option> for <systemitem class="osname">Ubuntu Hardy Heron (8.04)</systemitem>\r
79                                         <indexterm><primary>Linux</primary><secondary>Ubuntu</secondary></indexterm></para>\r
80                                         </listitem>\r
81                                         <listitem>\r
82                                                 <para><option>ubuntu-intrepid</option> for <systemitem class="osname">Ubuntu Intrepid Ibex \r
83                                                 (8.10)</systemitem></para>\r
84                                         </listitem>\r
85                                         <listitem>\r
86                                                 <para><option>ubuntu-jaunty</option> for <systemitem class="osname">Ubuntu Jaunty Jackalope \r
87                                                 (9.04)</systemitem></para>\r
88                                         </listitem>\r
89                                         <listitem>\r
90                                                 <para><option>ubuntu-karmic</option> for <systemitem class="osname">Ubuntu Karmic Koala \r
91                                                 (9.10)</systemitem></para>\r
92                                         </listitem>\r
93                                         <listitem>\r
94                                                 <para><option>ubuntu-lucid</option> for <systemitem class="osname">Ubuntu Lucid Lynx\r
95                                                 (10.04)</systemitem></para>\r
96                                         </listitem>\r
97                                         <listitem>\r
98                                                 <para><option>centos</option> for <systemitem class="osname">CentOS 5</systemitem></para>\r
99                                         </listitem>\r
100                                 </itemizedlist>\r
101 <screen><userinput>\r
102 cd /path/to/OpenSRF\r
103 make -f src/extras/Makefile.install [distribution]\r
104 </userinput></screen>\r
105                                 <para>This will install a number of packages required by OpenSRF on your system, \r
106                                 including some Perl modules from <systemitem class="resource">CPAN</systemitem><indexterm><primary>Perl</primary><secondary>CPAN</secondary>\r
107                                 </indexterm>. You can type <userinput>no</userinput> to the initial <systemitem class="resource">CPAN</systemitem> \r
108                                 configuration prompt to allow it to automatically configure itself to download \r
109                                 and install Perl modules from <systemitem class="resource">CPAN</systemitem>. The <systemitem class="resource">CPAN</systemitem> installer will ask you a number of \r
110                                 times whether it should install prerequisite modules - type <userinput>yes</userinput>.</para>\r
111                         </step>\r
112                         <step>  \r
113                                 <para>As the <systemitem class="username">opensrf</systemitem> user, configure and compile OpenSRF:</para> \r
114                                 <note>You can include the <option>–enable-python</option> and <option>–enable-java</option> configure options if \r
115                                 you want to include support for Python<indexterm><primary>Python</primary></indexterm> and Java\r
116                                 <indexterm><primary>Java</primary></indexterm>, respectively.</note>\r
117 <screen><userinput>\r
118 cd /home/opensrf/OpenSRF-1.4.0\r
119 ./configure --prefix=/openils --sysconfdir=/openils/conf\r
120 make\r
121 </userinput></screen>           \r
122                         </step>\r
123                         <step>  \r
124                                 <para>As the <systemitem class="username">root</systemitem> user, return to your OpenSRF build directory and install \r
125                                 OpenSRF:</para>\r
126 <screen><userinput>\r
127 cd /home/opensrf/OpenSRF-1.6.2\r
128 make install\r
129 </userinput></screen>\r
130                         </step>\r
131                         <step>\r
132                                 <para>As the <systemitem class="username">root</systemitem> user, change the ownership of the installed files to the \r
133                                 <systemitem class="username">opensrf</systemitem> user:</para>\r
134                                 <screen><userinput>chown -R opensrf:opensrf /openils</userinput></screen>\r
135                         </step>\r
136                         <step>\r
137                                 <para>Restart and Test OpenSRF</para>\r
138 <screen><userinput>\r
139 osrf_ctl.sh -l -a start_all\r
140 /openils/bin/srfsh\r
141 srfsh#  request opensrf.math add 2 2\r
142 </userinput></screen>\r
143                                 <para>You should see output such as:</para>\r
144 <screen>\r
145 Received Data: 4\r
146 \r
147 ------------------------------------\r
148 Request Completed Successfully\r
149 Request Time in seconds: 0.007519\r
150 ------------------------------------\r
151 \r
152 srfsh#\r
153 </screen>       \r
154                                 <para>If test completed successfully move onto the next section. \r
155                                 Otherwise, refer to the <link linkend="troubleshooting">troubleshooting</link> chapter \r
156                                 of this documentation.</para> \r
157                         </step> \r
158                 </procedure>    \r
159         </section>\r
160         <section xml:id="upgradingevergreen-upgrading_from_1.4_to_1.6.2">\r
161                 <title>Upgrade <application>Evergreen</application> from 1.4 to 1.6.2</title>\r
162                 <procedure>\r
163                         <step>\r
164                                 <para>As the <systemitem class="username">opensrf</systemitem> user, download and extract <application>Evergreen 1.6.2.0</application>\r
165                                 </para>\r
166 <screen><userinput>\r
167 wget http://open-ils.org/downloads/Evergreen-ILS-1.6.2.0.tar.gz\r
168 tar xzf Evergreen-ILS-1.6.2.0.tar.gz\r
169 </userinput></screen>\r
170                                 <note><para>For the latest edition of Evergreen check the Evergreen download page at\r
171                                 <ulink url="http://www.open-ils.org/downloads.php" /> and adjust upgrading instructions accordingly.</para></note>\r
172                         </step>\r
173                         <step>\r
174                                 <para>As the <systemitem class="username">root</systemitem> user, install the prerequisites:</para> \r
175                                 <screen><userinput>cd /home/opensrf/Evergreen-ILS-1.6.2.0</userinput></screen>  \r
176                                 <para>On the next command, replace <option>[distribution]</option> with one of \r
177                                 these values for your distribution of Debian or Ubuntu:</para>\r
178                                 <itemizedlist>\r
179                                         <listitem>\r
180                                                 <para><option>debian-etch</option> for <systemitem class="osname">Debian Etch (4.0)</systemitem></para><indexterm><primary>Linux</primary><secondary>Debian</secondary></indexterm>\r
181                                         </listitem>\r
182                                         <listitem>\r
183                                                 <para><option>debian-lenny</option> for <systemitem class="osname">Debian Lenny (5.0)</systemitem></para>\r
184                                         </listitem>\r
185                                         <listitem>\r
186                                                 <para><option>ubuntu-hardy</option> for <systemitem class="osname">Ubuntu Hardy Heron \r
187                                                 (8.04)</systemitem></para><indexterm><primary>Linux</primary><secondary>Ubuntu</secondary></indexterm>\r
188                                         </listitem>\r
189                                         <listitem>\r
190                                                 <para><option>ubuntu-intrepid</option> for <systemitem class="osname">Ubuntu Intrepid Ibex \r
191                                                 (8.10)</systemitem></para>\r
192                                         </listitem>\r
193                                         <listitem>\r
194                                                 <para><option>ubuntu-jaunty</option> for <systemitem class="osname">Ubuntu Jaunty Jackalope \r
195                                                 (9.04)</systemitem></para>\r
196                                         </listitem>\r
197                                         <listitem>\r
198                                                 <para><option>ubuntu-karmic</option> for <systemitem class="osname">Ubuntu Karmic Koala \r
199                                                 (9.10)</systemitem> or <systemitem class="osname">Ubuntu Lucid Lynx \r
200                                                 (10.04)</systemitem></para>\r
201                                         </listitem>\r
202                                 </itemizedlist>\r
203                                 <screen><userinput>make -f Open-ILS/src/extras/Makefile.install <option>[distribution]</option></userinput></screen>\r
204                         </step>\r
205                         <step>\r
206                                 <para>As the <systemitem class="username">opensrf</systemitem> user, configure and compile \r
207                                 <application>Evergreen</application>:</para>\r
208                                 <screen><userinput>cd /home/opensrf/Evergreen-ILS-1.6.2.0</userinput></screen>\r
209                                 <screen><userinput>./configure --prefix=/openils --sysconfdir=/openils/conf</userinput></screen>\r
210                                 <screen><userinput>make</userinput></screen>\r
211                         </step>\r
212                         <step>\r
213                                 <para>As the <systemitem class="username">root</systemitem> user, install \r
214                                 <application>Evergreen</application>:</para>\r
215                                 <screen><userinput>make STAFF_CLIENT_BUILD_ID=rel_1_6_2_0 install</userinput></screen>\r
216                         </step>\r
217                         <step>\r
218                                 <para>Change to the <application>Evergreen</application> installation \r
219                                 directory:</para>\r
220                                 <screen><userinput>cd /home/opensrf/Evergreen-ILS-1.6.2.0</userinput></screen>\r
221                         </step>\r
222                         <step>\r
223                                 <para>As the <emphasis>root</emphasis> user, change all files to be owned by the \r
224                                 <emphasis>opensrf</emphasis> user and group:</para>\r
225                                 <screen><userinput>chown -R opensrf:opensrf /openils</userinput></screen>\r
226                         </step>                 \r
227                         <step>\r
228                                 <para>As the <systemitem class="username">root</systemitem> user, build <filename>live-db-setup.pl</filename> for the cgi-bin \r
229                                 bootstrapping scripts and <filename>offline-config.pl</filename> for the offline staff client data uploader:</para>\r
230 <screen><userinput>\r
231 cd /home/opensrf/Evergreen-ILS-1.6.2.0\r
232 perl Open-ILS/src/support-scripts/eg_db_config.pl --create-bootstrap --create-offline \ \r
233 --user evergreen --password evergreen --hostname localhost --port 5432 \\r
234 --database evergreen\r
235 </userinput></screen>\r
236                         </step>\r
237                         <step>\r
238                                 <para>As the <systemitem class="username">opensrf</systemitem> user, update server symlink in <filename class="directory">/openils/var/web/xul/</filename>:</para>\r
239 <screen><userinput>\r
240 cd /openils/var/web/xul/\r
241 rm server\r
242 ln -s rel_1_6_2_0/server\r
243 </userinput></screen>\r
244                         </step>\r
245                         <step>\r
246                                 <para>Update the Evergreen database:</para>\r
247                                 <note><para>it is recommended that you <link linkend="backingup">back up your Evergreen database</link> in order to restore your data if anything goes wrong.</para></note>\r
248 <screen>\r
249 <userinput>\r
250 psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/1.4.0.5-1.6.0.0-upgrade-db.sql evergreen\r
251 psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/1.6.0.0-1.6.0.1-upgrade-db.sql evergreen\r
252 psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/1.6.0.1-1.6.0.2-upgrade-db.sql evergreen\r
253 psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/1.6.0.2-1.6.0.3-upgrade-db.sql evergreen \r
254 psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/1.6.0.3-1.6.0.4-upgrade-db.sql evergreen\r
255 psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/1.6.0.4-1.6.1.0-upgrade-db.sql evergreen\r
256 psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/1.6.1.0-1.6.1.1-upgrade-db.sql evergreen\r
257 psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/1.6.1.1-1.6.1.2-upgrade-db.sql evergreen\r
258 psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/1.6.1.2-1.6.1.3-upgrade-db.sql evergreen\r
259 psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/1.6.1.3-1.6.1.4-upgrade-db.sql evergreen\r
260 psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/1.6.1.4-1.6.1.5-upgrade-db.sql evergreen\r
261 psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/1.6.1.1-1.6.2-upgrade-db.sql evergreen\r
262 </userinput>\r
263 </screen>       \r
264                         </step>\r
265                         <step>\r
266                                 <para>As the <systemitem class="username">opensrf</systemitem> user, \r
267                                 copy <filename>/openils/conf/oils_web.xml.example</filename> to <filename>/openils/conf/oils_web.xml</filename>\r
268                                 <indexterm><primary>configuration files</primary><secondary>oils_web.xml</secondary></indexterm>\r
269                                 (needed for acquisitions templates).</para>\r
270                                 <screen><userinput>cp /openils/conf/oils_web.xml.example /openils/conf/oils_web.xml</userinput></screen>\r
271                         </step>\r
272                         <step>\r
273                                 <para>Update <filename>opensrf_core.xml</filename> and <filename>opensrf.xml</filename> by copying the new example files \r
274                                 (<filename>/openils/conf/opensrf_core.xml.example</filename> and <filename>/openils/conf/opensrf.xml</filename>).</para>\r
275                                 <indexterm><primary>configuration files</primary><secondary>opensrf.xml</secondary></indexterm>\r
276                                 <screen><userinput>cp /openils/conf/opensrf_core.xml.example /openils/conf/opensrf_core.xml</userinput></screen>\r
277                                 <indexterm><primary>configuration files</primary><secondary>opensrf_core.xml</secondary></indexterm>\r
278                                 <screen><userinput>cp /openils/conf/opensrf.xml.example /openils/conf/opensrf.xml</userinput></screen>\r
279                         </step>\r
280                         <step>\r
281                                 <para>Update <filename>opensrf.xml</filename> with the database connection info:</para>\r
282 <screen><userinput>\r
283 perl Open-ILS/src/support-scripts/eg_db_config.pl --update-config --service all --user evergreen \\r
284 --password evergreen --hostname localhost --port 5432 --database evergreen\r
285 </userinput></screen>\r
286                         </step>\r
287                         <step>\r
288                                 <para>Update /etc/apache2/startup.pl by copying the example from \r
289                                 Open-ILS/examples/apache/startup.pl.</para><indexterm><primary>configuration files</primary><secondary>startup.pl</secondary></indexterm>\r
290                         </step>\r
291                         <step>\r
292                                 <para>Update /etc/apache2/eg_vhost.conf by copying the example from \r
293                                 Open-ILS/examples/apache/eg_vhost.conf.</para><indexterm><primary>configuration files</primary><secondary>eg_vhost.conf</secondary></indexterm>\r
294                         </step>\r
295                         <step>\r
296                         <para>Update /etc/apache2/sites-available/eg.conf by copying the example from Open-ILS/\r
297                         examples/apache/eg.conf.</para><indexterm><primary>configuration files</primary><secondary>eg.conf</secondary></indexterm>\r
298                         </step>\r
299                         <step>\r
300                                 <para>Recover customizations you have made to the <application>Apache</application><indexterm><primary>Apache</primary></indexterm> \r
301                                 configuration files. For example, if you purchased an SSL certificate, you \r
302                                 will need to edit <filename>eg.conf</filename> to point to the appropriate SSL certificate files.</para>\r
303                                 <indexterm><primary>SSL</primary><secondary>certificates</secondary></indexterm>\r
304                         </step> \r
305                 </procedure>    \r
306         </section>\r
307         <section xml:id="upgradingevergreen_1.6.0_to_1.6.2">\r
308                 <title>Upgrade <application>Evergreen</application>from 1.6.0 to 1.6.2</title>\r
309                 <procedure>\r
310                         <step>\r
311                                 <para>Follow steps 1-8 of the <link linkend="upgradingevergreen-upgrading_from_1.4_to_1.6.2">instructions for upgrading Evergreen from 1.4</link> \r
312                                 \r
313                         \r
314                         <step>\r
315                                 <para>Update the Evergreen database:</para>\r
316                                 <note><para>it is recommended that you <link linkend="backingup">back up your Evergreen database</link> in order to restore your data if anything goes wrong.</para></note>\r
317 <screen>\r
318 <userinput>\r
319 psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/1.6.0.4-1.6.1.0-upgrade-db.sql evergreen\r
320 psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/1.6.1.0-1.6.1.1-upgrade-db.sql evergreen\r
321 psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/1.6.1.1-1.6.1.2-upgrade-db.sql evergreen\r
322 psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/1.6.1.2-1.6.1.3-upgrade-db.sql evergreen\r
323 psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/1.6.1.3-1.6.1.4-upgrade-db.sql evergreen\r
324 psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/1.6.1.4-1.6.1.5-upgrade-db.sql evergreen\r
325 psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/1.6.1.1-1.6.2-upgrade-db.sql evergreen\r
326 </userinput>\r
327 </screen>       \r
328                         </step>\r
329                         <step>\r
330                                 <para>Follow steps 10-16 of the <link linkend="upgradingevergreen-upgrading_from_1.4_to_1.6.2">instructions for upgrading Evergreen from 1.4</link> \r
331                                 \r
332                         \r
333                         <step>\r
334                 </procedure>    \r
335         </section>\r
336         <section xml:id="upgradingevergreen_1.6.1 to_1.6.2">\r
337                 <title>Upgrade <application>Evergreen</application>from 1.6.1 to 1.6.2</title>\r
338                 <procedure>\r
339                         <step>\r
340                                 <para>Follow steps 1-8 of the <link linkend="upgradingevergreen-upgrading_from_1.4_to_1.6.2">instructions for upgrading Evergreen from 1.4</link> \r
341                                 \r
342                         \r
343                         <step>\r
344                                 <para>Update the Evergreen database:</para>\r
345                                 <note><para>it is recommended that you <link linkend="backingup">back up your Evergreen database</link> in order to restore your data if anything goes wrong.</para></note>\r
346 <screen>\r
347 <userinput>\r
348 psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/1.6.1.1-1.6.2-upgrade-db.sql evergreen\r
349 </userinput>\r
350 </screen>       \r
351                         </step>\r
352                         <step>\r
353                                 <para>Follow steps 10-16 of the <link linkend="upgradingevergreen-upgrading_from_1.4_to_1.6.2">instructions for upgrading Evergreen from 1.4</link> \r
354                                 \r
355                         \r
356                         <step>\r
357                 </procedure>    \r
358         </section>\r
359         <section xml:id="testing_after_upgrade">\r
360                 <title>Restart Evergreen and Test</title>\r
361                 <procedure>\r
362                         <step>\r
363                                 <para>As the <systemitem class="username">opensrf</systemitem> user, start all \r
364                                 <application>Evergreen</application> and <application>OpenSRF</application> \r
365                                 services:</para>\r
366                                 <screen><userinput>osrf_ctl.sh -l -a start_all</userinput></screen>\r
367                         </step>\r
368                         <step>\r
369                                 <para>As the <systemitem class="username">opensrf</systemitem> user, run <command>autogen</command> to refresh the static \r
370                                 organizational data files:</para><indexterm><primary>autogen</primary></indexterm>\r
371 <screen><userinput>\r
372 cd /openils/bin\r
373 ./autogen.sh -c /openils/conf/opensrf_core.xml -u\r
374 </userinput></screen>\r
375                                         \r
376                         </step>\r
377                         <step>\r
378                                 <para>Start <command>srfsh</command> and try logging in  using your <application>Evergreen</application>\r
379                                 username and password:</para>\r
380 <screen>\r
381 <userinput>/openils/bin/srfsh</userinput>\r
382 <prompt>srfsh%</prompt> <userinput>login <option>username</option> <option>password</option></userinput>\r
383 </screen> \r
384                         </step> \r
385                         <step>\r
386                                 <para>Start the <application>Apache</application> web server.</para>\r
387                         </step>\r
388                 </procedure>\r
389                 <note>\r
390                         <para>If you encounter errors, refer to the <link linkend="troubleshooting">troubleshooting \r
391                         section</link> of this documentation for tips \r
392                         on finding solutions and seeking further assistance from the Evergreen community.</para>  \r
393                 </note>\r
394         </section>\r
395         <section xml:id="upgrading_Postgresqlto8.4">\r
396                 <title>Upgrading PostgreSQL from 8.2 to 8.4</title>\r
397                 <para>Evergreen 1.6.2 supports PostgreSQL version 8.4 and it is recommended that you upgrade PostgreSQL when you upgrade Evergreen to 1.6.</para>\r
398                 <note><para>The order of the following steps is very important.</para></note><indexterm><primary>databases</primary><secondary>PostgreSQL</secondary></indexterm>\r
399                 <procedure>\r
400                         <step>\r
401                                 <para>As <systemitem class="username">opensrf</systemitem>, stop the evergreen and opensrf services:</para>\r
402                                 <screen><userinput>osrf_ctl.sh -l -a stop_all</userinput></screen>\r
403                         </step>                 \r
404                         <step>\r
405                                 <para><link linkend="backingup">Backup the Evergreen database data</link></para>\r
406                         </step>\r
407                         <step>\r
408                                 <para>Upgrade to Postgresql 8.4 by removing old version and installing Postgresql 8.4</para>\r
409                         </step>\r
410                         <step>                  \r
411                                 <para>Create an empty Evergreen database in postgresql 8.4 by issuing the following commands as the postgres user:</para>\r
412 <screen>\r
413 <userinput>\r
414 createdb -E UNICODE evergreen\r
415 createlang plperl   evergreen\r
416 createlang plperlu  evergreen\r
417 createlang plpgsql  evergreen\r
418 psql -f /usr/share/postgresql/8.4/contrib/tablefunc.sql evergreen\r
419 psql -f /usr/share/postgresql/8.4/contrib/tsearch2.sql evergreen\r
420 psql -f /usr/share/postgresql/8.4/contrib/pgxml.sql evergreen\r
421 </userinput>\r
422 </screen>               \r
423                         </step>\r
424                         <step>\r
425                                 <para>As the <systemitem class="username">postgres</systemitem> user on the PostgreSQL server, create a PostgreSQL user named <systemitem class="username">evergreen</systemitem> for the database cluster:</para>\r
426                                 <screen><userinput>createuser -P -s evergreen</userinput></screen>\r
427                                 <para>Enter the password for the new PostgreSQL superuser (<systemitem class="username">evergreen</systemitem>)</para>  \r
428                         </step>                 \r
429                         <step>\r
430                                 <para>Restore data from backup created in step 1.</para>\r
431                         </step>\r
432                         <step>\r
433                                 <para>To point tsearch2 to proper function names in 8.4, run the SQL script \r
434                                 <filename>/home/opensrf/Evergreen-ILS*/Open-ILS/src/sql/Pg/000.english.pg84.fts-config.sql</filename> using the <command>psql</command> command.</para>\r
435                                 <screen><userinput>cd /home/opensrf/Evergreen-ILS*</userinput></screen>\r
436                                 <screen><userinput>psql -f /Open-ILS/src/sql/Pg/000.english.pg84.fts-config.sql evergreen</userinput></screen>\r
437                         </step>\r
438                         <step>\r
439                                 <para><link linkend="upgraderestart">Restart Evergreen and OpenSRF services</link></para>\r
440                         </step>\r
441                         <step>\r
442                                 <para>For additional information regarding upgrading PostgreSQL, see the following documentation in PostgreSQL:</para>\r
443                                 <para><ulink url="http://www.postgresql.org/docs/8.4/static/install-upgrading.html" /></para>\r
444                                 <para><ulink url="http://www.postgresql.org/docs/8.4/interactive/textsearch-migration.html" /> \r
445                                 </para>\r
446                                 <para><ulink url="http://www.postgresql.org/docs/current/static/tsearch2.html#AEN102824" /></para>\r
447                         </step>\r
448                 </procedure>\r
449         </simplesect>\r
450 </chapter>\r