Abstract
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.1 has several software requirements:
In the following instructions, you are asked to perform certain steps as either the root
or
opensrf
user.
root
user, issue the su command and enter the password of the
root
user.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:
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.3.tar.gz
tar xzf Evergreen-ILS-2.1.3.tar.gz
For the latest edition of Evergreen 2.1, check the Evergreen download page at http://www.open-ils.org/downloads.php and adjust upgrading instructions accordingly.
As the root
user, install the prerequisites:
cd /home/opensrf/Evergreen-ILS-2.1.3
On the next command, replace [distribution]
with one of
these values for your distribution of Debian or Ubuntu:
debian-squeeze
for Debian Squeeze (6.0)
ubuntu-lucid
for Ubuntu Lucid Lynx
(10.04)
make -f Open-ILS/src/extras/Makefile.install [distribution]
As the opensrf
user, configure and compile
Evergreen:
cd/home/opensrf/Evergreen-ILS-2.1.3
./configure --prefix=/openils --sysconfdir=/openils/conf
make
As the root
user, install
Evergreen:
make STAFF_CLIENT_BUILD_ID=rel_2_1_3 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.3
# 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_3/server
Change to the Evergreen installation directory:
cd /home/opensrf/Evergreen-ILS-2.1.3
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:
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.3
psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/version-upgrade/2.0-2.1-upgrade-db.sql evergreen
psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/version-upgrade/2.1.0-2.1.1-upgrade-db.sql evergreen
psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/version-upgrade/2.1.1-2.1.2-upgrade-db.sql evergreen
psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/version-upgrade/2.1.2-2.1.3-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.)
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
).
cp /openils/conf/opensrf_core.xml.example /openils/conf/opensrf_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.
Update /etc/apache2/startup.pl
by copying the example from
Open-ILS/examples/apache/startup.pl
.
Update /etc/apache2/eg_vhost.conf by copying the example from Open-ILS/examples/apache/eg_vhost.conf.
Update /etc/apache2/sites-available/eg.conf
by copying the example from Open-ILS/
examples/apache/eg.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
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:
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
username
password
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.