======Upgrading Evergreen 2.0.* to 2.1.0====== * If you are currently not on the **latest** version of 2.0, make sure you follow the [[upgrading:evergreen|upgrade instructions]] for all previous releases up to the latest. - As **Root**, Stop Apache. - Stop all Evergreen and OpenSRF services. As the **opensrf** user: osrf_ctl.sh -l -a stop_all - [[zzz_archive:opensrf:2.0:install|Install]] or [[upgrading:opensrf|Upgrade]] OpenSRF 2.0.x - **NOTE:** You may skip this step if the latest version of OpenSRF 2.0.x was previously installed. - Download and build Evergreen: - As the **opensrf** user, download and extract the latest version of Evergreen (http://open-ils.org/downloads/Evergreen-ILS-2.1.0a.tar.gz): wget http://evergreen-ils.org/downloads/Evergreen-ILS-2.1.0a.tar.gz tar xzf Evergreen-ILS-2.1.0a.tar.gz - As the **root** user, install the prerequisites. Replace 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.1.0a make -f Open-ILS/src/extras/Makefile.install - As the **opensrf** user, configure and compile Evergreen: cd /home/opensrf/Evergreen-ILS-2.1.0a ./configure --prefix=/openils --sysconfdir=/openils/conf make - As the **root** user, install Evergreen: make STAFF_CLIENT_BUILD_ID=rel_2_1_0 install - As the **root** user, change all files to be owned by the opensrf user/group: sudo chown -R opensrf:opensrf /openils - As the **opensrf** user, update configuration files: cd /home/opensrf/Evergreen-ILS-2.1.0a # 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_0/server server - Upgrade the database: - **NOTE: it is recommended that you [[http://www.open-ils.org/dokuwiki/doku.php?id=evergreen-admin:maintenance:backups&s[]=database&s[]=backup|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 [[http://evergreen-ils.org/documentation/install/README_2_1_0.html|2.1.0 install 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 the database schema: cd /home/opensrf/Evergreen-ILS-2.1.0a psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/2.0-2.1-upgrade-db.sql evergreen - Update your Apache configuration using the new files in Open-ILS/examples/apache2 - Update your ''opensrf.xml'' file as the **opensrf** user: # 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.0, 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 - Start all Evergreen and OpenSRF services. As the **opensrf** user: osrf_ctl.sh -l -a start_all - As the **opensrf** user, run autogen to refresh the static organizational data files: autogen.sh - As **root**, start Apache. **NOTE:** Troubleshooting: If you run into errors, see: [[http://www.open-ils.org/dokuwiki/doku.php?id=troubleshooting:checking_for_errors&s[]=troubleshooting|Troubleshooting: Checking for Errors]] for help finding errors in the log files. You may also ask the evergreen community using the [[http://www.open-ils.org/listserv.php|mailing lists]]. Including error information from the logs will be extremely helpful when seeking assistance.