From b2a667bbb35b0901c00b5b47f635459eb4450c00 Mon Sep 17 00:00:00 2001 From: Robert Soulliere Date: Wed, 16 Feb 2011 07:49:43 -0500 Subject: [PATCH] Add upgrading to 2.0 Documentation. --- 1.6/admin/Upgrading-Evergreen_1.6.xml | 2 +- 2.0/admin/Upgrading-Evergreen-2.0.xml | 376 ++++++++++++++++++++++++++ 2.0/root.xml | 1 + 3 files changed, 378 insertions(+), 1 deletion(-) create mode 100644 2.0/admin/Upgrading-Evergreen-2.0.xml diff --git a/1.6/admin/Upgrading-Evergreen_1.6.xml b/1.6/admin/Upgrading-Evergreen_1.6.xml index 6494607a77..955aada2bc 100644 --- a/1.6/admin/Upgrading-Evergreen_1.6.xml +++ b/1.6/admin/Upgrading-Evergreen_1.6.xml @@ -312,7 +312,7 @@ perl Open-ILS/src/support-scripts/eg_db_config.pl --update-config --service all Update the Evergreen database: - it is recommended that you back up your Evergreen database in order to restore your data if anything goes wrong. + It is recommended that you back up your Evergreen database in order to restore your data if anything goes wrong. psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/1.6.0.4-1.6.1.0-upgrade-db.sql evergreen diff --git a/2.0/admin/Upgrading-Evergreen-2.0.xml b/2.0/admin/Upgrading-Evergreen-2.0.xml new file mode 100644 index 0000000000..284723e344 --- /dev/null +++ b/2.0/admin/Upgrading-Evergreen-2.0.xml @@ -0,0 +1,376 @@ + + + + Upgrading Evergreen to 2.0 + + This Chapter will explain the step-by-step process of upgrading Evergreen + to 2.0, 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. + + + 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. +
+ Backing Up 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. + + +
+
+ Upgrading OpenSRF to 1.6.2OpenSRF + + + As the opensrf user, download and extract the source files for OpenSRF + 1.6.2: + +wget http://open-ils.org/downloads/OpenSRF-1.6.2.tar.gz +tar xzf OpenSRF-1.6.2.tar.gz + + A new directory OpenSRF-1.6.2 is created. + For the latest edition of OpenSRF, check the Evergreen download page at + . + + + + As the root user, install the software prerequisites using the automatic + prerequisite installer. + +aptitude install make +cd /home/opensrf/OpenSRF-1.6.2 + + Replace below with the following value + for your distribution: + + + + for Debian Lenny (5.0) + + + for Debian Squeeze (6.0) + LinuxDebian + + + for Ubuntu Hardy Heron (8.04) + LinuxUbuntu + + + for Ubuntu Lucid Lynx + (10.04) + + + for CentOS 5 + + + for Red Hat Enterprise Linux 5 + + + +cd /path/to/OpenSRF +make -f src/extras/Makefile.install [distribution] + + This will install a number of packages required by OpenSRF on your system, + including some Perl modules from CPANPerlCPAN + . You can type no to the initial CPAN + configuration prompt to allow it to automatically configure itself to download + and install Perl modules from CPAN. The CPAN installer will ask you a number of + times whether it should install prerequisite modules - type yes. + + + As the opensrf user, configure and compile OpenSRF: + You can include the and configure options if + you want to include support for PythonPython and Java + Java, respectively. + +cd /home/opensrf/OpenSRF-1.6.2 +./configure --prefix=/openils --sysconfdir=/openils/conf +make + + + + As the root user, return to your OpenSRF build directory and install + OpenSRF: + +cd /home/opensrf/OpenSRF-1.6.2 +make install + + + + As the root user, change the ownership of the installed files to the + opensrf user: + chown -R opensrf:opensrf /openils + + + Restart and Test OpenSRF + +osrf_ctl.sh -l -a start_all +/openils/bin/srfsh +srfsh# request opensrf.math add 2 2 + + You should see output such as: + +Received Data: 4 + +------------------------------------ +Request Completed Successfully +Request Time in seconds: 0.007519 +------------------------------------ + +srfsh# + + If test completed successfully move onto the next section. + Otherwise, refer to the troubleshooting chapter + of this documentation. + + +
+
+ Upgrade <application>Evergreen</application> from 1.6.1 to 2.0 + + + As the opensrf user, download and extract Evergreen 2.0 + + +wget http://www.open-ils.org/downloads/exit +uEvergreen-ILS-2.0.1.tar.gz +tar xzf Evergreen-ILS-2.0.1.tar.gz + + For the latest edition of Evergreen 2.0, check the Evergreen download page at + and adjust upgrading instructions accordingly. + + + As the root user, install the prerequisites: + cd /home/opensrf/Evergreen-ILS-2.0.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.0.1 + ./configure --prefix=/openils --sysconfdir=/openils/conf + make + + + As the root user, install + Evergreen: + make STAFF_CLIENT_BUILD_ID=rel_2_0_1 install + + + Change to the Evergreen installation + directory: + cd /home/opensrf/Evergreen-ILS-2.0.1 + + + As the root user, change all files to be owned by the + opensrf user and group: + chown -R opensrf:opensrf /openils + + + As the root user, build live-db-setup.pl for the cgi-bin + bootstrapping scripts and offline-config.pl for the offline staff client data uploader: + +cd /home/opensrf/Evergreen-ILS-2.0.1 +perl Open-ILS/src/support-scripts/eg_db_config.pl --create-bootstrap --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_1_6_1_5/server + + + + Update the Evergreen database: + It is recommended that you back up your Evergreen database in order to restore your data if anything goes wrong. + + +psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql evergreen +psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/2.0.0-2.0.1-upgrade-db.sql evergreen + + + + + Run the reingest-1.6-2.0.pl script to generate an sql script. Then use the sql file to reingest bib records into your + evergreen database. This is required to make the new facet sidebar in OPAC search results work and to upgrade the keyword indexes to use + the revised NACO normalization routine + If you are running a large Evergreen installation, it is recommend that you examine the script first. Reingesting a large number of bibliographic records + may take several hours. +perl Open-ILS/src/sql/Pg/reingest-1.6-2.0.pl +psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/reingest-1.6-2.0.sql evergreen + + + As the opensrf user, + copy /openils/conf/oils_web.xml.example to /openils/conf/oils_web.xml + configuration filesoils_web.xml + (needed for acquisitions templates). + 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 + + + Update opensrf.xml with the database connection info: + +perl Open-ILS/src/support-scripts/eg_db_config.pl --update-config --service all --user evergreen \ +--password evergreen --hostname localhost --port 5432 --database evergreen + + + + 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 + + + Recover customizations you have made to the ApacheApache + configuration files. For example, if you purchased an SSL certificate, you + will need to edit eg.conf to point to the appropriate SSL certificate files. + SSLcertificates + + +
+
+ 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. + +
+
+ Upgrading PostgreSQL from 8.2 to 8.4 (if required) + Evergreen 1.6.1 supports PostgreSQL version 8.4 and it is recommended that you upgrade PostgreSQL when you upgrade Evergreen to 1.6. + The order of the following steps is very important.databasesPostgreSQL + + + As opensrf, stop the evergreen and opensrf services: + osrf_ctl.sh -l -a stop_all + + + Backup the Evergreen database data + + + Upgrade to Postgresql 8.4 by removing old version and installing Postgresql 8.4 + + + Create an empty Evergreen database in postgresql 8.4 by issuing the following commands as the postgres user: + + +createdb -E UNICODE evergreen +createlang plperl evergreen +createlang plperlu evergreen +createlang plpgsql evergreen +psql -f /usr/share/postgresql/8.4/contrib/tablefunc.sql evergreen +psql -f /usr/share/postgresql/8.4/contrib/tsearch2.sql evergreen +psql -f /usr/share/postgresql/8.4/contrib/pgxml.sql evergreen + + + + + As the postgres user on the PostgreSQL server, create a PostgreSQL user named evergreen for the database cluster: + createuser -P -s evergreen + Enter the password for the new PostgreSQL superuser (evergreen) + + + Restore data from backup created in step 1. + + + To point tsearch2 to proper function names in 8.4, run the SQL script + /home/opensrf/Evergreen-ILS*/Open-ILS/src/sql/Pg/000.english.pg84.fts-config.sql using the psql command. + cd /home/opensrf/Evergreen-ILS* + psql -f /Open-ILS/src/sql/Pg/000.english.pg84.fts-config.sql evergreen + + + Restart Evergreen and OpenSRF services + + + For additional information regarding upgrading PostgreSQL, see the following documentation in PostgreSQL: + + + + + + +
+
diff --git a/2.0/root.xml b/2.0/root.xml index d14b1deaa8..16e6a0f776 100755 --- a/2.0/root.xml +++ b/2.0/root.xml @@ -58,6 +58,7 @@ Administration + -- 2.43.2