======Upgrading Evergreen 1.4 to 1.6======
NOTE: This documentation is also available in the Evergreen documentation at [[http://docs.evergreen-ils.org/1.6/draft/html/upgradingevergreen.html]]. In github: [[http://github.com/rsoulliere/Evergreen-DocBook/blob/master/1.6/admin/Upgrading-Evergreen_1.6.xml]].
- Stop Apache.
- Stop all Evergreen and OpenSRF services. As the **opensrf** user:
osrf_ctl.sh -l -a stop_all
- [[zzz_archive:opensrf:1.2:install|Install OpenSRF 1.2.2]].
- Download and build Evergreen:
- As the **opensrf** user, download and extract the latest version of Evergreen (http://open-ils.org/downloads/Evergreen-ILS-1.6.0.4.tar.gz):
wget http://open-ils.org/downloads/Evergreen-ILS-1.6.0.4.tar.gz
tar xzf Evergreen-ILS-1.6.0.4.tar.gz
- As the **root** user, install the prerequisites. Replace below with one of these values for your actual distribution:
* ''debian-etch'' for Debian Etch (4.0)
* ''debian-lenny'' for Debian Lenny
* ''ubuntu-hardy'' for Ubuntu Hardy Heron (8.04)
* ''ubuntu-intrepid'' for Ubuntu Intrepid Ibex (8.10)
cd /home/opensrf/Evergreen-ILS-1.6.0.4
make -f Open-ILS/src/extras/Makefile.install
- As the **opensrf** user, configure and compile Evergreen:
cd /home/opensrf/Evergreen-ILS-1.6.0.4
./configure --prefix=/openils --sysconfdir=/openils/conf
make
- As the **root** user, install Evergreen:
make STAFF_CLIENT_BUILD_ID=rel_1_6_0_4 install
- As the **opensrf** user, update configuration files:
cd /home/opensrf/Evergreen-ILS-1.6.0.4
# Build live-db-setup.pl for the cgi-bin bootstrapping scripts
# and offline-config.pl for the offline staff client data uploader
sudo perl Open-ILS/src/support-scripts/eg_db_config.pl \
--create-bootstrap --create-offline --user evergreen --password evergreen \
--hostname localhost --port 5432 --database evergreen
# Change all files to be owned by the opensrf user/group
sudo chown -R opensrf:opensrf /openils
- 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**
- Download the [[http://www.open-ils.org/downloads/1.6.0-mmbxs-cleanup.sql|billing view hot-fix script]].
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 1.6.0-mmbxs-cleanup.sql evergreen
- If you are **also** upgrading from Postgres 8.2 to Postgres 8.3, you must also run the following script. Do not run this script if you are staying with Postgres 8.2.
psql -U evergreen -h localhost -f Open-ILS/src/sql/Pg/000.english.pg83.fts-config.sql evergreen
- As the **opensrf** user, copy /openils/conf/oils_web.xml.example to /openils/conf/oils_web.xml (needed for acquisitions templates)
- Update ''opensrf_core.xml'' and ''opensrf.xml''. A naive way would be to copy the new example files (''/openils/conf/opensrf_core.xml.example'' and ''/openils/conf/opensrf.xml'') and then update the username / password / hostname info and other customizations you might have made. The following step will automatically propagate database usernames and passwords into ''opensrf.xml'' (note that this operates on a file already using the 1.6 structure; it will not migrate an existing 1.4 ''opensrf.xml'' file to the 1.6 structure):
# Update opensrf.xml with the database connection info
sudo 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 Apache configuration:
- Update ''/etc/apache2/startup.pl'' with the example from ''Open-ILS/examples/apache/startup.pl''
- Update ''/etc/apache2/eg_vhost.conf'' with the example from ''Open-ILS/examples/apache/eg_vhost.conf''
- Update ''/etc/apache2/sites-available/eg.conf'' with the example from ''Open-ILS/examples/apache/eg.conf''
- Start all Evergreen and OpenSRF services. As the **opensrf** user:
osrf_ctl.sh -l -a start_all
- Start Apache.
- 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
- 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.
----
**In some cases, you may upgrade OpenSRF to version 1.2 instead of installing from scratch. To upgrade:**
- Go to the [[zzz_archive:opensrf:1.2:install|instructions for installing OpenSRF 1.2.2]] and complete steps 2, 3, (4 I, II, III b) and 5
- Restart OpenSRF and test connections using srfsh.