Upgrading Evergreen to 2.0This 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.Evergreen 2.0 has several software requirements:PostgreSQL: Version 8.4 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 runnung an older version of these distributions,
you may want to upgrade befor installing Evergreen 2.0. 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.Backing Up DataAs root, stop the Apache
web serverweb serverApache.As the opensrf user, stop all
Evergreen
and OpenSRF services:osrf_ctl.sh -l -a stop_allBack up of the /openils
directory.Back up the evergreen
database.Upgrading OpenSRF to 1.6.2OpenSRFAs 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 Squeeze (6.0)LinuxDebian for Ubuntu Lucid Lynx
(10.04)LinuxUbuntu for CentOS 5LinuxCentOS for Red Hat Enterprise Linux 5LinuxRed Hat
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 /openilsRestart 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 Evergreen from 1.6.1 to 2.0PostgreSQL 8.4 is the minimum supported version of PostgreSQL.Evergreen 2.0 has been tested on Debian Squeeze (6.0) and Ubuntu Lucid (10.04). If you are runnung an older version of
these distributions, you may want to upgrade befor installing Evergreen 2.0. For instructions on upgrading these distribuitions, visit the
Debian or Ubuntu websites.As the opensrf user, download and extract Evergreen 2.0
wget http://www.open-ils.org/downloads/Evergreen-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.1On 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/confmakeAs the root user, install
Evergreen:make STAFF_CLIENT_BUILD_ID=rel_2_0_1 installChange to the Evergreen installation
directory:cd /home/opensrf/Evergreen-ILS-2.0.1As the root user, change all files to be owned by the
opensrf user and group:chown -R opensrf:opensrf /openilsAs the opensrf user, update server symlink in /openils/var/web/xul/:
cd /openils/var/web/xul/
rm server
ln -s rel_2_0_1/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
The 1.6.1-2.0-upgrade-db.sql upgrade script may take a long time (hours) to process
on larger systems.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.plpsql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/reingest-1.6-2.0.sql evergreenAs 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.xmlcp /openils/conf/oils_web.xml.example /openils/conf/oils_web.xmlUpdate 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.xmlcp /openils/conf/opensrf_core.xml.example /openils/conf/opensrf_core.xmlconfiguration filesopensrf_core.xmlcp /openils/conf/opensrf.xml.example /openils/conf/opensrf.xmlCopying these configuration files will remove any customizations you have made to them. Remember to redo your customizations after copying
them.Update opensrf.xml with the database connection info:
perl Open-ILS/src/support-scripts/eg_db_config.pl --update-config --service all --create-offline --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.plUpdate /etc/apache2/eg_vhost.conf by copying the example from
Open-ILS/examples/apache/eg_vhost.conf.configuration fileseg_vhost.confUpdate /etc/apache2/sites-available/eg.conf by copying the example from Open-ILS/
examples/apache/eg.conf.configuration fileseg.confCopying 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.SSLcertificatesRestart Evergreen and TestAs the opensrf user, start all
Evergreen and OpenSRF
services:osrf_ctl.sh -l -a start_allAs 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/srfshsrfsh%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.databasesPostgreSQLAs opensrf, stop the evergreen and opensrf services:osrf_ctl.sh -l -a stop_allBackup the Evergreen database dataUpgrade to Postgresql 8.4 by removing old version and installing Postgresql 8.4Create 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 evergreenEnter 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 evergreenRestart Evergreen and OpenSRF servicesFor additional information regarding upgrading PostgreSQL, see the following documentation in PostgreSQL: