User Tools

Site Tools


zzz_archive:upgrading:evergreen:1.6.1_to_2.0.0

Upgrading from Evergreen 1.6.1.x to 2.0.9

Preface

BACK EVERYTHING UP! Seriously.

FIXME This is incomplete! YMMV!

A far superior version is available as draft documentation here:

http://docs.evergreen-ils.org/2.0/draft/html/upgradingevergreen-upgrading_from_1.6_to_2.0.html

Upgrading your codey bits

  • If you are currently on a version before 1.6.1, make sure you follow the upgrade instructions for all previous releases up to 1.6.1. NOTE: There are no upgrade scripts for 1.6.2 IT IS AN ABANDONED BRANCH
  1. Stop Apache.
  2. Stop all Evergreen and OpenSRF services. As the opensrf user:
    osrf_ctl.sh -l -a stop_all
    1. NOTE: You may skip this step if the latest version of OpenSRF 2.0.x was previously installed.
  3. Download and build Evergreen:
    1. As the opensrf user, download and extract the latest version of Evergreen (http://open-ils.org/downloads/Evergreen-ILS-2.0.9.tar.gz):
      wget http://evergreen-ils.org/downloads/Evergreen-ILS-2.0.9.tar.gz
      tar xzf Evergreen-ILS-2.0.9.tar.gz
    2. As the root user, install the prerequisites. Replace <distribution> below with one of these values for your actual distribution:
      • debian-sqeeze for Debian Squeeze
      • ubuntu-lucid for Ubuntu Lucid Lynx (10.04)
        cd /home/opensrf/Evergreen-ILS-2.0.9
        make -f Open-ILS/src/extras/Makefile.install <distribution>
    3. As the opensrf user, configure and compile Evergreen:
      cd /home/opensrf/Evergreen-ILS-2.0.9
      ./configure --prefix=/openils --sysconfdir=/openils/conf
      make
    4. As the root user, install Evergreen:
      make STAFF_CLIENT_BUILD_ID=rel_2_0_9 install
    5. As the root user, change all files to be owned by the opensrf user/group:
      sudo chown -R opensrf:opensrf /openils
    6. As the opensrf user, update server symlink in /openils/var/web/xul/:
      cd /openils/var/web/xul/
      rm server
      ln -s rel_2_0_9/server server

Upgrading your configuration files

  1. As the opensrf user, update configuration files:
    cd /home/opensrf/Evergreen-ILS-2.0.9
    # 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
    • FIXME what about changes to opensrf.xml?
  2. If you have made local changes to the following files, you may want to use a diff program such as vimdiff to compare the files. If you are not comfortable with this and you haven't changed these files much, backup your original files someplace safe and then copy the new files across.
    1. Copy/diff Open-ILS/examples/apache/eg.conf to /etc/apache2/sites-enabled/eg.conf
    2. Copy/diff Open-ILS/examples/apache/eg_vhost.conf to /etc/apache2/eg_vhost.conf
    3. Copy/diff Open-ILS/examples/apache/startup.pl to /etc/apache2/startup.pl

Upgrading your database from 1.6.1

  • NOTE: it is recommended that you back up your Evergreen database in order to restore your data if anything goes wrong
  • NOTE: For Evergreen 2.0, you must be using PostgreSQL 8.4. Instructions are yet to come
  1. Run the main upgrade script:
    cd /home/opensrf/Evergreen-ILS-2.0.9
    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
    psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/2.0.1-2.0.2-upgrade-db.sql evergreen
    psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/2.0.2-2.0.3-upgrade-db.sql evergreen
    psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/2.0.3-2.0.4-upgrade-db.sql evergreen
    psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/2.0.4-2.0.5-upgrade-db.sql evergreen
    psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/2.0.5-2.0.6-upgrade-db.sql evergreen
    psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/2.0.6-2.0.7-upgrade-db.sql evergreen
    psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/2.0.7-2.0.8-upgrade-db.sql evergreen
    psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/2.0.8-2.0.9-upgrade-db.sql evergreen
  2. Generate a reingest SQL script using the reingest script generation script:
    cd /home/opensrf/Evergreen-ILS-2.0.9
    perl Open-ILS/src/sql/Pg/reingest-1.6-2.0.pl --config /openils/conf/opensrf_core.xml --chunk_size 10000
    psql -U evergreen -h localhost -f reingest-1.6-2.0.sql evergreen
    • Note: Evergreen needs to be running.
    • Note: SQL file will be created in the current directory.
    • This takes a long time, you may run this in the background and go about your business. 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.
  3. Generate the normalized title fields (tag="tnf" in metabib.real_full_rec) required for sorting by title, etc:
    BEGIN; 
    DELETE FROM metabib.real_full_rec WHERE tag = 'tnf'; 
    INSERT INTO metabib.real_full_rec (record, tag, subfield, VALUE) 
       SELECT  record, 
               'tnf', 
               'a', 
               SUBSTRING(VALUE, COALESCE(NULLIF(REGEXP_REPLACE(ind2,'[^0-9]','','g'),''),'0')::INT + 1) 
         FROM  metabib.real_full_rec 
         WHERE tag = '245' 
               AND subfield = 'a'; 
    COMMIT; 

Finishing up

  1. Start all Evergreen and OpenSRF services. As the opensrf user:
    osrf_ctl.sh -l -a start_all
  2. Start Apache.
  3. As the opensrf user, run autogen to refresh the static organizational data files:
    cd /openils/bin
    ./autogen.sh -c /openils/conf/opensrf_core.xml -u
  4. Troubleshooting:

If you run into errors, see: Troubleshooting: Checking for Errors for help finding errors in the log files. You may also ask the evergreen community using the mailing lists. Including error information from the logs will be extremely helpful when seeking assistance.

zzz_archive/upgrading/evergreen/1.6.1_to_2.0.0.txt · Last modified: 2022/02/10 13:34 by 127.0.0.1

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

© 2008-2022 GPLS and others. Evergreen is open source software, freely licensed under GNU GPLv2 or later.
The Evergreen Project is a U.S. 501(c)3 non-profit organization.