Add upgrading instructions for 2.1.
authorrsoulliere <robert.soulliere@mohawkcollege.ca>
Wed, 30 Nov 2011 20:24:08 +0000 (15:24 -0500)
committerrsoulliere <robert.soulliere@mohawkcollege.ca>
Wed, 30 Nov 2011 20:24:08 +0000 (15:24 -0500)
admin/upgrading.xml [new file with mode: 0644]
root.xml

diff --git a/admin/upgrading.xml b/admin/upgrading.xml
new file mode 100644 (file)
index 0000000..086d471
--- /dev/null
@@ -0,0 +1,283 @@
+<?xml version='1.0' encoding='UTF-8'?>\r
+<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude"\r
+       xmlns:xl="http://www.w3.org/1999/xlink" version="5.0" xml:id="upgradingevergreen">\r
+       <info>\r
+               <title>Upgrading Evergreen to 2.1</title>\r
+               <abstract>\r
+                       <para>This Chapter will explain the step-by-step process of upgrading <application>Evergreen\r
+                       </application> to 2.1, including steps to upgrade <application>OpenSRF</application>. Before \r
+                       upgrading, it is important to carefully plan an upgrade strategy to minimize system downtime and \r
+                       service interruptions. All of the steps in this chapter are to be completed from the command line.</para>\r
+                       \r
+               </abstract>\r
+       </info>    \r
+               <para>Evergreen 2.0 has several software requirements:</para>\r
+               <itemizedlist>\r
+                       <listitem>PostgreSQL: Version 9.0 is the minimum supported version of PostgreSQL. </listitem>\r
+                       <listitem>Linux: Evergreen 2.0 has been tested on Debian Squeeze (6.0) and Ubuntu Lucid Lynx (10.04). If you are running an older version of \r
+                       these distributions, you may want to upgrade before installing Evergreen 2.1. For instructions on upgrading these distributions, visit the \r
+                       <ulink url="http://www.debian.org/releases/squeeze/">Debian</ulink> or <ulink url="https://help.ubuntu.com/community/LucidUpgrades">Ubuntu</ulink> websites.</listitem>\r
+               </itemizedlist>\r
+               <para>In the following instructions, you are asked to perform certain steps as either the <systemitem class="username">root</systemitem>  or \r
+               <systemitem class="username">opensrf</systemitem> user.</para>\r
+               <itemizedlist>\r
+                       <listitem>Debian: To become the <systemitem class="username">root</systemitem> user, issue the <command>su</command> command and enter the password of the \r
+                       <systemitem class="username">root</systemitem> user.</listitem>\r
+                       <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
+               </itemizedlist>\r
+               <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
+               <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
+               <para>In the following instructions, <filename class='directory'>/path/to/OpenSRF/</filename> represents the path to the OpenSRF source directory.</para>\r
+       \r
+               <procedure>\r
+                       <step>\r
+                               <para>Stop Evergreen and back up your data:</para>\r
+                               <substeps>\r
+                                       <step>\r
+                                               <para>As <systemitem class="username">root</systemitem>, stop the <application>Apache</application> \r
+                                               web server<indexterm><primary>web server</primary><secondary>Apache</secondary></indexterm>.</para>\r
+                                       </step>\r
+                                       <step>\r
+                                               <para>As the <systemitem class="username">opensrf</systemitem> user, stop all \r
+                                               <application>Evergreen</application>\r
+                                               and <application>OpenSRF</application> services:</para>\r
+                                               <screen><userinput>osrf_ctl.sh -l -a stop_all</userinput></screen>\r
+                                       </step>\r
+                                       <step>\r
+                                               <para>Back up of the <filename class='directory'>/openils</filename> \r
+                                               directory.</para>\r
+                                       </step>\r
+                                       <step>\r
+                                               <para>Back up the <application>evergreen\r
+                                               </application> database.</para>\r
+                                       </step>\r
+                               </substeps>\r
+                       </step>\r
+                       <step>\r
+                               <para>Upgrade OpenSRF to the latest edition.</para>\r
+                               <note><para>You may skip this step if the latest version of OpenSRF 2.0.x was previously installed.</para></note>\r
+                               <para>Download and install the latest version of Opensrf from the <ulink url="http://open-ils.org/opensrf.php">OpenSRF download page.</ulink></para>\r
+                       </step>\r
+                       <step>\r
+                               <para>As the <systemitem class="username">opensrf</systemitem> user, download and extract <application>Evergreen 2.1</application>\r
+                               </para>\r
+<screen><userinput>\r
+wget http://www.open-ils.org/downloads/Evergreen-ILS-2.1.1.tar.gz\r
+tar xzf Evergreen-ILS-2.1.1.tar.gz\r
+</userinput></screen>\r
+                               <note><para>For the latest edition of Evergreen 2.1, check the Evergreen download page at\r
+                               <ulink url="http://www.open-ils.org/downloads.php" /> and adjust upgrading instructions accordingly.</para></note>\r
+                       </step>\r
+                       <step>\r
+                               <para>As the <systemitem class="username">root</systemitem> user, install the prerequisites:</para> \r
+                               <screen><userinput>cd /home/opensrf/Evergreen-ILS-2.1.1</userinput></screen>    \r
+                               <para>On the next command, replace <option>[distribution]</option> with one of \r
+                               these values for your distribution of Debian or Ubuntu:</para>\r
+                               <itemizedlist>\r
+                                       \r
+                                       <listitem>\r
+                                               <para><option>debian-squeeze</option> for <systemitem class="osname">Debian Squeeze (6.0)</systemitem></para>\r
+                                       </listitem>\r
+                                       \r
+                                       <listitem>\r
+                                               <para><option>ubuntu-lucid</option> for  <systemitem class="osname">Ubuntu Lucid Lynx \r
+                                               (10.04)</systemitem></para>\r
+                                       </listitem>\r
+                               </itemizedlist>\r
+                               <screen><userinput>make -f Open-ILS/src/extras/Makefile.install <option>[distribution]</option></userinput></screen>\r
+                       </step>\r
+                       <step>\r
+                               <para>As the <systemitem class="username">opensrf</systemitem> user, configure and compile \r
+                               <application>Evergreen</application>:</para>\r
+                               <screen><userinput>cd /home/opensrf/Evergreen-ILS-2.1.1</userinput></screen>\r
+                               <screen><userinput>./configure --prefix=/openils --sysconfdir=/openils/conf</userinput></screen>\r
+                               <screen><userinput>make</userinput></screen>\r
+                       </step>\r
+                       <step>\r
+                               <para>As the <systemitem class="username">root</systemitem> user, install \r
+                               <application>Evergreen</application>:</para>\r
+                               <screen><userinput>make STAFF_CLIENT_BUILD_ID=rel_2_1_1 install</userinput></screen>\r
+                       </step>\r
+                       <step>\r
+                               <para>As the <emphasis>root</emphasis> user, change all files to be owned by the \r
+                               <emphasis>opensrf</emphasis> user and group:</para>\r
+                               <screen><userinput>chown -R opensrf:opensrf /openils</userinput></screen>\r
+                       </step>                                         \r
+                       <step>\r
+                               <para>As the <systemitem class="username">opensrf</systemitem> user, update configuration files:</para>\r
+<screen><userinput>\r
+cd /home/opensrf/Evergreen-ILS-2.1.1\r
+# and offline-config.pl for the offline staff client data uploader\r
+perl Open-ILS/src/support-scripts/eg_db_config.pl \\r
+  --create-offline --user evergreen --password evergreen \\r
+  --hostname localhost --port 5432 --database evergreen\r
+</userinput></screen>\r
+                       </step> \r
+\r
+                       <step>\r
+                               <para>As the <systemitem class="username">opensrf</systemitem> user, update server symlink in <filename class="directory">/openils/var/web/xul/</filename>:</para>\r
+<screen><userinput>\r
+cd /openils/var/web/xul/\r
+rm server\r
+ln -s rel_2_1_1/server\r
+</userinput></screen>\r
+                       </step>\r
+                       <step>\r
+                               <para>Change to the <application>Evergreen</application> installation \r
+                               directory:</para>\r
+<screen><userinput>cd /home/opensrf/Evergreen-ILS-2.1.1</userinput></screen>\r
+                       </step>\r
+\r
+                       <step>\r
+                               <para>Update the <database>evergreen</database> database:</para>\r
+                               <note><para>It is recommended that you <link linkend="backingup">back up your Evergreen database</link> in order to restore your data if \r
+                               anything goes wrong.</para></note>\r
+                               \r
+                               <para>If you were running Evergreen 2.0.x on PostgreSQL 8.4, you will need to upgrade to PostgreSQL 9.0:</para>\r
+                               <substeps>\r
+                                       <title>Upgrade to PostgreSQL 9.0</title>\r
+                                       <step>                                  \r
+                                               <para>Install the PostgreSQL 9.0 server packages following the \r
+                                               <link linkend="_creating_the_evergreen_database">installation instructions</link>. Pay close attention to the backports section.</para>\r
+                                       </step>\r
+                                       <step>                          \r
+                                               <para> Upgrade your existing PostgreSQL 8.4 cluster to a PostgreSQL 9.0 cluster by issuing the following commands as \r
+                                               <systemitem class="username">root</systemitem>:\r
+                                               </para>\r
+                                               <substeps>\r
+                                                       <step>\r
+                                                               <para>Blow away the default PostgreSQL 9.0 main cluster:</para>\r
+<screen><userinput>pg_dropcluster 9.0 main</userinput></screen> \r
+                                                       </step>\r
+                                                       <step>\r
+                                                               <para>Upgrade your production PostgreSQL 8.4 main cluster</para>\r
+<screen><userinput>pg_upgradecluster --stop 8.4 main</userinput></screen> \r
+                                                       </step>\r
+                                                       <step>\r
+                                                               <para>OPTIONAL: Blow away your old PostgreSQL 8.4 main cluster. If you don't do this, then you might need to \r
+                                                               update <filename>opensrf.xml</filename> with new port numbers (probably 5433)</para>\r
+<screen><userinput>pg_dropcluster 8.4 main</userinput></screen> \r
+                                                       </step>\r
+                                               </substeps>\r
+                                       </step>\r
+                                       <step>\r
+                                                       <para>Add the hstore PostgreSQL contrib module to your Evergreen database:</para>\r
+<screen><userinput>\r
+psql -U evergreen -h localhost -f /usr/share/postgresql/9.0/contrib/hstore.sql -d evergreen\r
+</userinput></screen> \r
+                                       </step>\r
+                               </substeps>\r
+                       </step>\r
+                       <step>\r
+                               <para>Upgrade Evergreen Schema.</para>\r
+                               <caution><para>Pay attention to error output as you run these scripts. You should do additional troubleshooting and error reporting to the  \r
+                               <ulink url="http://libmail.georgialibraries.org/mailman/listinfo/open-ils-dev"> Evergreen Developer List</ulink> if you encounter errors.\r
+                               </para></caution> \r
+<screen>\r
+<userinput>\r
+cd /home/opensrf/Evergreen-ILS-2.1.1\r
+psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/2.0-2.1-upgrade-db.sql evergreen\r
+psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/2.1.0-2.1.1-upgrade-db.sql evergreen\r
+</userinput>\r
+</screen>              \r
+                       </step>\r
+\r
+                       <step>\r
+                               <para>As the <systemitem class="username">opensrf</systemitem> user, \r
+                               copy <filename>/openils/conf/oils_web.xml.example</filename> to <filename>/openils/conf/oils_web.xml</filename>\r
+                               . (If upgrading from 1.6.1.x, <filename>oils_web.xml</filename> should already exist.)</para>\r
+                               <indexterm><primary>configuration files</primary><secondary>oils_web.xml</secondary></indexterm>\r
+                               <screen><userinput>cp /openils/conf/oils_web.xml.example /openils/conf/oils_web.xml</userinput></screen>\r
+                       </step>\r
+                       <step>\r
+                               <para>Update <filename>opensrf_core.xml</filename> and <filename>opensrf.xml</filename> by copying the new example files \r
+                               (<filename>/openils/conf/opensrf_core.xml.example</filename> and <filename>/openils/conf/opensrf.xml</filename>).</para>\r
+                               <indexterm><primary>configuration files</primary><secondary>opensrf.xml</secondary></indexterm>\r
+                               <screen><userinput>cp /openils/conf/opensrf_core.xml.example /openils/conf/opensrf_core.xml</userinput></screen>\r
+                               <indexterm><primary>configuration files</primary><secondary>opensrf_core.xml</secondary></indexterm>\r
+                               <screen><userinput>cp /openils/conf/opensrf.xml.example /openils/conf/opensrf.xml</userinput></screen>\r
+                               <caution><para>Copying these configuration files will remove any customizations you have made to them. Remember to redo your customizations after copying \r
+                               them.</para></caution>\r
+                       </step>\r
+                       <step>\r
+                               <substeps>\r
+                                       <title>Update Apache Files</title>\r
+                                       <caution>\r
+                                               <para>Copying these Apache configuration files will remove any customizations you have made to them. Remember to redo \r
+                                               your customizations after copying them. For example, if you purchased an SSL certificate, you \r
+                                               will need to edit <filename>eg.conf</filename> to point to the appropriate SSL certificate files.</para>\r
+                                               <indexterm><primary>SSL</primary><secondary>certificates</secondary></indexterm>\r
+                                       </caution> \r
+                                       <step>\r
+                                               <para>Update <filename>/etc/apache2/startup.pl</filename> by copying the example from \r
+                                               <filename>Open-ILS/examples/apache/startup.pl</filename>.\r
+                                               </para><indexterm><primary>configuration files</primary><secondary>startup.pl</secondary></indexterm>\r
+                                       </step>\r
+               \r
+                                       <step>\r
+                                               <para>Update /etc/apache2/eg_vhost.conf by copying the example from \r
+                                               Open-ILS/examples/apache/eg_vhost.conf.</para><indexterm><primary>configuration files</primary><secondary>eg_vhost.conf\r
+                                               </secondary></indexterm>\r
+                                       </step>\r
+                                       <step>\r
+                                       <para>Update <filename>/etc/apache2/sites-available/eg.conf</filename> by copying the example from <filename>Open-ILS/\r
+                                       examples/apache/eg.conf</filename>.</para><indexterm><primary>configuration files</primary><secondary>eg.conf</secondary></indexterm>\r
+                                       </step>\r
+                               </substeps>\r
+                       </step>\r
+                       <step>\r
+                               <para>Update <filename>opensrf.xml</filename> with the database connection info:</para>\r
+                               <para>If you are happy with the default settings in opensrf.xml.example, then:</para>\r
+<screen><userinput>\r
+cp -b /openils/conf/opensrf.xml.example /openils/conf/opensrf.xml\r
+perl Open-ILS/src/support-scripts/eg_db_config.pl --update-config --service all \\r
+  --database evergreen --host localhost --user evergreen --password evergreen\r
+</userinput></screen>\r
+                               <para>Otherwise, compare /openils/conf/opensrf.xml with /openils/conf/opensrf.xml and manually copy the new pieces into place \r
+                               in your existing opensrf.xml file</para>\r
+                       </step>\r
+                       <step>\r
+                               <para>As of Evergreen 2.1.1, the Perl modules are installed in the normal location on the system. To avoid conflicting versions, get the old versions of                                        Perl modules out of your PERL5LIB path. Issue the following command as the opensrf user:</para>\r
+<screen><userinput>\r
+mv /openils/lib/perl5 /openils/lib/perl5-2.0\r
+</userinput></screen>\r
+                       </step>\r
+               \r
+               </procedure>    \r
+       <simplesect xml:id="testing_after_upgrade">\r
+               <title>Restart Evergreen and Test</title>\r
+               <procedure>\r
+                       <step>\r
+                               <para>As the <systemitem class="username">opensrf</systemitem> user, start all \r
+                               <application>Evergreen</application> and <application>OpenSRF</application> \r
+                               services:</para>\r
+                               <screen><userinput>osrf_ctl.sh -l -a start_all</userinput></screen>\r
+                       </step>\r
+                       <step>\r
+                               <para>As the <systemitem class="username">opensrf</systemitem> user, run <command>autogen</command> to refresh the static \r
+                               organizational data files:</para><indexterm><primary>autogen</primary></indexterm>\r
+<screen><userinput>\r
+cd /openils/bin\r
+./autogen.sh -c /openils/conf/opensrf_core.xml -u\r
+</userinput></screen>\r
+                                       \r
+                       </step>\r
+                       <step>\r
+                               <para>Start <command>srfsh</command> and try logging in  using your <application>Evergreen</application>\r
+                               username and password:</para>\r
+<screen>\r
+<userinput>/openils/bin/srfsh</userinput>\r
+<prompt>srfsh%</prompt> <userinput>login <option>username</option> <option>password</option></userinput>\r
+</screen> \r
+                       </step> \r
+                       <step>\r
+                               <para>Start the <application>Apache</application> web server.</para>\r
+                       </step>\r
+               </procedure>\r
+               <note>\r
+                       <para>If you encounter errors, refer to the <link linkend="troubleshooting">troubleshooting \r
+                       section</link> of this documentation for tips \r
+                       on finding solutions and seeking further assistance from the Evergreen community.</para>  \r
+               </note>\r
+       </simplesect>\r
+</chapter>\r
index f710fba..0778a1d 100755 (executable)
--- a/root.xml
+++ b/root.xml
@@ -63,8 +63,8 @@
                </info>\r
                <xi:include href="admin/admin-intro.xml"/>      \r
                <xi:include href="admin/server_install.xml"/>\r
-               <!--<xi:include href="admin/AdminMisc.xml"/>\r
-               <xi:include href="admin/sip.xml"/>\r
+               <xi:include href="admin/upgrading.xml"/>\r
+               <!--<xi:include href="admin/sip.xml"/>\r
                <xi:include href="admin/z3950.xml"/>\r
                <xi:include href="admin/troubleshooting.xml"/>          \r
                <xi:include href="admin/actiontriggers.xml"/>\r