Upgrading Evergreen to 1.6.1This Chapter will explain the step-by-step process of upgrading Evergreen
to 1.6.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.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.6OpenSRFAs the opensrf user, download and extract the source files for OpenSRF
1.6:
wget http://open-ils.org/downloads/OpenSRF-1.6.3.tar.gz
tar xzf OpenSRF-1.6.3.tar.gz
A new directory OpenSRF-1.6.3 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.3
Replace below with the following value
for your distribution: for Debian Etch (4.0)LinuxDebian for Debian Lenny (5.0) for Ubuntu Hardy Heron (8.04)LinuxUbuntu for Ubuntu Intrepid Ibex
(8.10) for Ubuntu Jaunty Jackalope
(9.04) for Ubuntu Karmic Koala
(9.10) for Ubuntu Lucid Lynx
(10.04) for CentOS 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.3
./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.3
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.4 to 1.6.1As the opensrf user, download and extract Evergreen 1.6.1.8
wget http://open-ils.org/downloads/Evergreen-ILS-1.6.1.8.tar.gz
tar xzf Evergreen-ILS-1.6.1.8.tar.gz
For the latest edition of Evergreen check the Evergreen download page at
and adjust upgrading instructions accordingly.As the root user, install the prerequisites:cd /home/opensrf/Evergreen-ILS-1.6.1.8On the next command, replace with one of
these values for your distribution of Debian or Ubuntu: for Debian Etch (4.0)LinuxDebian for Debian Lenny (5.0) for Ubuntu Hardy Heron
(8.04)LinuxUbuntu for Ubuntu Intrepid Ibex
(8.10) for Ubuntu Jaunty Jackalope
(9.04) for Ubuntu Karmic Koala
(9.10) or 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-1.6.1.8./configure --prefix=/openils --sysconfdir=/openils/confmakeAs the root user, install
Evergreen:make STAFF_CLIENT_BUILD_ID=rel_1_6_1_8 installChange to the Evergreen installation
directory:cd /home/opensrf/Evergreen-ILS-1.6.1.8As the root user, change all files to be owned by the
opensrf user and group:chown -R opensrf:opensrf /openilsAs 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-1.6.1.8
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_8/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.4.0.5-1.6.0.0-upgrade-db.sql evergreen
psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/1.6.0.0-1.6.0.1-upgrade-db.sql evergreen
psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/1.6.0.1-1.6.0.2-upgrade-db.sql evergreen
psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/1.6.0.2-1.6.0.3-upgrade-db.sql evergreen
psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/1.6.0.3-1.6.0.4-upgrade-db.sql evergreen
psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/1.6.0.4-1.6.1.0-upgrade-db.sql evergreen
psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/1.6.1.0-1.6.1.1-upgrade-db.sql evergreen
psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/1.6.1.1-1.6.1.2-upgrade-db.sql evergreen
psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/1.6.1.2-1.6.1.3-upgrade-db.sql evergreen
psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/1.6.1.3-1.6.1.4-upgrade-db.sql evergreen
psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/1.6.1.4-1.6.1.5-upgrade-db.sql evergreen
psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/1.6.1.5-1.6.1.6-upgrade-db.sql evergreen
psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/1.6.1.6-1.6.1.7-upgrade-db.sql evergreen
psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/1.6.1.8-1.6.1.8-upgrade-db.sql evergreen
As the opensrf user,
copy /openils/conf/oils_web.xml.example to /openils/conf/oils_web.xmlconfiguration filesoils_web.xml
(needed for acquisitions templates).cp /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.xmlUpdate 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.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.confRecover 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.SSLcertificatesUpgrade Evergreen from 1.6.0 to 1.6.1Follow steps 1-8 of the instructions for upgrading Evergreen from 1.4Update 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.0.4-1.6.1.0-upgrade-db.sql evergreen
psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/1.6.1.0-1.6.1.1-upgrade-db.sql evergreen
psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/1.6.1.1-1.6.1.2-upgrade-db.sql evergreen
psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/1.6.1.2-1.6.1.3-upgrade-db.sql evergreen
psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/1.6.1.3-1.6.1.4-upgrade-db.sql evergreen
psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/1.6.1.4-1.6.1.5-upgrade-db.sql evergreen
psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/1.6.1.5-1.6.1.6-upgrade-db.sql evergreen
psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/1.6.1.6-1.6.1.7-upgrade-db.sql evergreen
psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/1.6.1.7-1.6.1.8-upgrade-db.sql evergreen
Follow steps 10-16 of the instructions for upgrading Evergreen from 1.4Restart 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.4Evergreen 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: