OpenSRF is the core communications bus of the Evergreen ILS.
OpenSRF will be installed into /openils. Installing Evergreen ILS later will install into this same directory.
OpenSRF depends on access to the Jabber network as well as Memcache, which may run on the same server. I like to run them on different servers.
~ # emerge dev-python/setuptools dev-libs/libxml2 dev-perl/Net-DNS [ebuild R ] dev-python/setuptools-0.6.21 [ebuild R ] dev-libs/libxml2-2.8.0_rc1 USE="-debug -doc -examples icu ipv6 -lzma python readline -static-libs -test" [ebuild N ] dev-perl/Net-DNS-0.660.0 USE="ipv6 -test" 169 kB
~ # useradd --home /openils --shell /bin/bash opensrf ~ # passwd opensrf ~ # cd /usr/src . # wget http://open-ils.org/downloads/opensrf-2.0.1.tar.gz . # tar -zxf opensrf-2.0.1.tar.gz . # chown -R opensrf:opensrf opensrf-2.0.1
We need to build and run as the specific opensrf user. The configure example here is specifically for Gentoo, adjust as necessary for your environment.
. # cd /usr/src/opensrf-2.0.1 . # su opensrf . $ ./configure \ --prefix=/openils \ --disable-java \ --disable-python \ --disable-chopchop \ --with-apr=/usr/include/apr-1 \ --with-apxs=/usr/sbin/apxs2 \ . $ make . $ exit . # make install . # cd /openils . # chown -R opensrf:opensrf .
Note, we disable python as it's not necessary for Evergreen ILS, but if you are making Python OpenSRF clients you'll want it. Also, the Python libraries need to have the hostnames (for XMPP) in the DNS properly - otherwise you'll see errors like:
pyxmpp.exceptions.DNSError: Could not resolve 'private.localhost': NXDOMAIN
Make note that during this process, with
--enable-python that make install will install many Python packages into
Known pakcages are: simplejson, pyxmpp, python-memcached and dnspython.
Some parts of the proces may complain about the Apache configuration file, when using Axps2 to locate it. This generally requires a symlink to fixGentoo Bug #112863.
~ # cd /etc/apache2 ~ # ln -s httpd.conf apache2.conf
Now update the LD path to point to these directores for OpenSRF.
~ # echo "LDPATH=\"/usr/lib64/dbd\"" >> /etc/env.d/98openils ~ # echo "LDPATH=\"/openils/lib\"" >> /etc/env.d/99opensrf ~ # env-update ~ # ldconfig
OpenSRF needs to have the start script executed by the opensrf user. Also, make user that the XMPP and Memecached services are operational.
~ # /etc/init.d/ejabberd start ~ # /etc/init.d/memcached start ~ # su - opensrf ~ $ export PATH="/openils/bin:$PATH" ~ $ osrf_ctl.sh -l -a start_all
~ $ srfsh srfsh# request opensrf.math add 2 2
# 2012-10-12 Updated versions, links # 2011 Created