Warning: These instructions are still being drafted and reviewed by the community for errors.
In the following instructions, you are asked to perform certain steps as either the root user or the opensrf user.
su -
command and enter the password of the root user.sudo su -
command and enter the password of your current user.
To switch from the root user to a different user, issue the su - <username>
command; for example, su - opensrf
. Once you have become a non-root user, to become the root user again simply issue the exit
command.
Also, in the following instructions, /path/to/OpenSRF/ represents the path to the OpenSRF source directory.
Currently upgrading from 1.6 to 2.0 is basically stopping OpenSRF processes, taking care of the makefile prereqs, then configure, make, make install the code and finally start the processes back up.
osrf_ctl.sh -l -a --stop_all / configure / makefile prereqs / make / make install / osrf_ctl.sh -l -a --start_all
osrf_ctl.sh -l -a stop_all
wget http://evergreen-ils.org/downloads/opensrf-X.X.X.tar.gz tar xzf opensrf-X.X.X.tar.gz
A new directory opensrf-X.X.X
is created.
debian-lenny
for Debian Lenny (5.0)debian-squeeze
for Debian Squeeze (6.0)fedora13
for Fedora 13ubuntu-hardy
for Ubuntu Hardy Heron (8.04)ubuntu-lucid
for Ubuntu Lucid Lynx (10.04)centos
for CentOS 5rhel
for Red Hat Enterprise Linux 5cd /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 CPAN. We suggest that you let CPAN auto-configure itself. Also, always allow the CPAN installer to install prerequisite modules when it asks.
–enable-python
configure options if you want to include support for Python:cd /path/to/OpenSRF ./configure --prefix=/openils --sysconfdir=/openils/conf make
cd /path/to/OpenSRF make install
chown -R opensrf:opensrf /openils
opensrf_core.xml
.cp -p /openils/conf/opensrf.xml /openils/conf/opensrf.xml.backup cp -p /openils/conf/opensrf_core.xml /openils/conf/opensrf_core.xml.backup
/openils/conf/opensrf_core.xml
and /openils/conf/opensrf.xml
configuration files from the example templates:cp /openils/conf/opensrf.xml.example /openils/conf/opensrf.xml cp /openils/conf/opensrf_core.xml.example /openils/conf/opensrf_core.xml
/openils/conf/opensrf_core.xml
to change the Jabber usernames and passwords you jotted down earlier. ldconfig
Before starting OpenSRF, ensure that your Jabber and memcached daemons are running. As the root user:
/etc/init.d/ejabberd start /etc/init.d/memcached start
Starting OpenSRF with the start_all
option starts the OpenSRF router, Perl services, and C services. As the opensrf user, start OpenSRF (NOTE: use the -l
flag only if you wish to force the hostname for the <hosts>
section in opensrf.xml
to be localhost
):
osrf_ctl.sh -l -a start_all
/openils/bin
directory; this should have been set by .bashrc
when you logged in as the opensrf
user, but you can manually set it using the following command:export PATH=$PATH:/openils/bin
Once you started OpenSRF, test your connection to OpenSRF via srfsh
:
srfsh
and try calling the add
method on the OpenSRF math service:/openils/bin/srfsh srfsh# request opensrf.math add 2 2
You should see a result like:
Received Data: 4 ------------------------------------ Request Completed Successfully Request Time in seconds: 0.007519 ------------------------------------ srfsh#
If this does not work, it's time to do some troubleshooting. Please do not make any significant changes to your configuration. Gather your configuration files and log files in /openils/var/log
and contact the Evergreen development mailing list for assistance before making any drastic changes to your system configuration.
Since we have confirmed that OpenSRF work correctly. We now will go back to the Evergreen configuration files we previously backed up unless you are using OpenSRF for another project.
osrf_ctl.sh -l -a stop_all
cp -p /openils/conf/opensrf.xml /openils/conf/opensrf.xml.opensrf.backup cp -p /openils/conf/opensrf_core.xml /openils/conf/opensrf_core.xml.opensrf.backup
/openils/conf/opensrf_core.xml
and /openils/conf/opensrf.xml
configuration files from the example templates:cp /openils/conf/opensrf.xml.backup /openils/conf/opensrf.xml cp /openils/conf/opensrf_core.xml.backup /openils/conf/opensrf_core.xml
osrf_ctl.sh -l -a start_all