From f3f99b4e7b06c003c95fbaaa9429258636e104b6 Mon Sep 17 00:00:00 2001 From: rsoulliere Date: Wed, 30 Nov 2011 15:24:08 -0500 Subject: [PATCH] Add upgrading instructions for 2.1. --- admin/upgrading.xml | 283 ++++++++++++++++++++++++++++++++++++++++++++ root.xml | 4 +- 2 files changed, 285 insertions(+), 2 deletions(-) create mode 100644 admin/upgrading.xml diff --git a/admin/upgrading.xml b/admin/upgrading.xml new file mode 100644 index 0000000000..086d471780 --- /dev/null +++ b/admin/upgrading.xml @@ -0,0 +1,283 @@ + + + + Upgrading Evergreen to 2.1 + + This Chapter will explain the step-by-step process of upgrading Evergreen + to 2.1, including steps to upgrade OpenSRF. Before + upgrading, it is important to carefully plan an upgrade strategy to minimize system downtime and + service interruptions. All of the steps in this chapter are to be completed from the command line. + + + + Evergreen 2.0 has several software requirements: + + PostgreSQL: Version 9.0 is the minimum supported version of PostgreSQL. + 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 + these distributions, you may want to upgrade before installing Evergreen 2.1. For instructions on upgrading these distributions, visit the + Debian or Ubuntu websites. + + In the following instructions, you are asked to perform certain steps as either the root or + opensrf user. + + Debian: To become the root user, issue the su command and enter the password of the + root user. + Ubuntu: To become the root user, issue the sudo su command and enter the password of your current user. + + To switch from the root user to a different user, issue the su - [user] command; for example, + su - opensrf. Once you have become a non-root user, to become the root user again simply issue the exit command. + In the following instructions, /path/to/OpenSRF/ represents the path to the OpenSRF source directory. + + + + Stop Evergreen and back up your data: + + + As root, stop the Apache + web serverweb serverApache. + + + As the opensrf user, stop all + Evergreen + and OpenSRF services: + osrf_ctl.sh -l -a stop_all + + + Back up of the /openils + directory. + + + Back up the evergreen + database. + + + + + Upgrade OpenSRF to the latest edition. + You may skip this step if the latest version of OpenSRF 2.0.x was previously installed. + Download and install the latest version of Opensrf from the OpenSRF download page. + + + As the opensrf user, download and extract Evergreen 2.1 + + +wget http://www.open-ils.org/downloads/Evergreen-ILS-2.1.1.tar.gz +tar xzf Evergreen-ILS-2.1.1.tar.gz + + For the latest edition of Evergreen 2.1, check the Evergreen download page at + and adjust upgrading instructions accordingly. + + + As the root user, install the prerequisites: + cd /home/opensrf/Evergreen-ILS-2.1.1 + On the next command, replace with one of + these values for your distribution of Debian or Ubuntu: + + + + for Debian Squeeze (6.0) + + + + for Ubuntu Lucid Lynx + (10.04) + + + make -f Open-ILS/src/extras/Makefile.install + + + As the opensrf user, configure and compile + Evergreen: + cd /home/opensrf/Evergreen-ILS-2.1.1 + ./configure --prefix=/openils --sysconfdir=/openils/conf + make + + + As the root user, install + Evergreen: + make STAFF_CLIENT_BUILD_ID=rel_2_1_1 install + + + As the root user, change all files to be owned by the + opensrf user and group: + chown -R opensrf:opensrf /openils + + + As the opensrf user, update configuration files: + +cd /home/opensrf/Evergreen-ILS-2.1.1 +# and offline-config.pl for the offline staff client data uploader +perl Open-ILS/src/support-scripts/eg_db_config.pl \ + --create-offline --user evergreen --password evergreen \ + --hostname localhost --port 5432 --database evergreen + + + + + As the opensrf user, update server symlink in /openils/var/web/xul/: + +cd /openils/var/web/xul/ +rm server +ln -s rel_2_1_1/server + + + + Change to the Evergreen installation + directory: +cd /home/opensrf/Evergreen-ILS-2.1.1 + + + + Update the evergreen database: + It is recommended that you back up your Evergreen database in order to restore your data if + anything goes wrong. + + If you were running Evergreen 2.0.x on PostgreSQL 8.4, you will need to upgrade to PostgreSQL 9.0: + + Upgrade to PostgreSQL 9.0 + + Install the PostgreSQL 9.0 server packages following the + installation instructions. Pay close attention to the backports section. + + + Upgrade your existing PostgreSQL 8.4 cluster to a PostgreSQL 9.0 cluster by issuing the following commands as + root: + + + + Blow away the default PostgreSQL 9.0 main cluster: +pg_dropcluster 9.0 main + + + Upgrade your production PostgreSQL 8.4 main cluster +pg_upgradecluster --stop 8.4 main + + + OPTIONAL: Blow away your old PostgreSQL 8.4 main cluster. If you don't do this, then you might need to + update opensrf.xml with new port numbers (probably 5433) +pg_dropcluster 8.4 main + + + + + Add the hstore PostgreSQL contrib module to your Evergreen database: + +psql -U evergreen -h localhost -f /usr/share/postgresql/9.0/contrib/hstore.sql -d evergreen + + + + + + Upgrade Evergreen Schema. + Pay attention to error output as you run these scripts. You should do additional troubleshooting and error reporting to the + Evergreen Developer List if you encounter errors. + + + +cd /home/opensrf/Evergreen-ILS-2.1.1 +psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/2.0-2.1-upgrade-db.sql evergreen +psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/2.1.0-2.1.1-upgrade-db.sql evergreen + + + + + + As the opensrf user, + copy /openils/conf/oils_web.xml.example to /openils/conf/oils_web.xml + . (If upgrading from 1.6.1.x, oils_web.xml should already exist.) + configuration filesoils_web.xml + cp /openils/conf/oils_web.xml.example /openils/conf/oils_web.xml + + + Update opensrf_core.xml and opensrf.xml by copying the new example files + (/openils/conf/opensrf_core.xml.example and /openils/conf/opensrf.xml). + configuration filesopensrf.xml + cp /openils/conf/opensrf_core.xml.example /openils/conf/opensrf_core.xml + configuration filesopensrf_core.xml + cp /openils/conf/opensrf.xml.example /openils/conf/opensrf.xml + Copying these configuration files will remove any customizations you have made to them. Remember to redo your customizations after copying + them. + + + + Update Apache Files + + Copying these Apache configuration files will remove any customizations you have made to them. Remember to redo + your customizations after copying them. For example, if you purchased an SSL certificate, you + will need to edit eg.conf to point to the appropriate SSL certificate files. + SSLcertificates + + + Update /etc/apache2/startup.pl by copying the example from + Open-ILS/examples/apache/startup.pl. + configuration filesstartup.pl + + + + Update /etc/apache2/eg_vhost.conf by copying the example from + Open-ILS/examples/apache/eg_vhost.conf.configuration fileseg_vhost.conf + + + + Update /etc/apache2/sites-available/eg.conf by copying the example from Open-ILS/ + examples/apache/eg.conf.configuration fileseg.conf + + + + + Update opensrf.xml with the database connection info: + If you are happy with the default settings in opensrf.xml.example, then: + +cp -b /openils/conf/opensrf.xml.example /openils/conf/opensrf.xml +perl Open-ILS/src/support-scripts/eg_db_config.pl --update-config --service all \ + --database evergreen --host localhost --user evergreen --password evergreen + + Otherwise, compare /openils/conf/opensrf.xml with /openils/conf/opensrf.xml and manually copy the new pieces into place + in your existing opensrf.xml file + + + 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: + +mv /openils/lib/perl5 /openils/lib/perl5-2.0 + + + + + + Restart Evergreen and Test + + + As the opensrf user, start all + Evergreen and OpenSRF + services: + osrf_ctl.sh -l -a start_all + + + As the opensrf user, run autogen to refresh the static + organizational data files:autogen + +cd /openils/bin +./autogen.sh -c /openils/conf/opensrf_core.xml -u + + + + + Start srfsh and try logging in using your Evergreen + username and password: + +/openils/bin/srfsh +srfsh% login + + + + Start the Apache web server. + + + + If you encounter errors, refer to the troubleshooting + section of this documentation for tips + on finding solutions and seeking further assistance from the Evergreen community. + + + diff --git a/root.xml b/root.xml index f710fbae3f..0778a1d4b0 100755 --- a/root.xml +++ b/root.xml @@ -63,8 +63,8 @@ -