User Tools

Site Tools


Installing the acq-admin environment

The following instructions are based on Debian Etch, but should be easily adapted for other distributions. These instructions assume that you've already followed the instructions for installing OpenSRF and Evergreen relevant to your distribution to satisfy all prerequisites.

Step 1: Installing the OpenSRF Python environment

  1. Install Python headers for compiling pyxmpp & python_memcached (as root):
    # apt-get install python-dev
  2. Upgrade to the latest version of setuptools (warning: this will overwrite your system package if you have already installed it) (as root):
    # easy_install --upgrade setuptools
  3. Check out the development branch of OpenSRF (as normal user):
    $ svn co svn://
  4. Uncomment the Python build flag in install.conf (as normal user):
  5. Build everything (as normal user):
  6. Install everything (as root):
    make install

Step 2: Installing the Evergreen Python environment

  1. Check out the acq-experiment branch of Evergreen (as normal user):
    $ svn co svn://
  2. There is one additional PostgreSQL prerequisite - the pgxml functions from the PostgreSQL contrib directory must be added to your Evergreen database:
    # replace with your username / database name / database version as required
    psql -U evergreen -d evergreen -f /usr/share/postgresql/8.2/contrib/pgxml.sql
  3. In install.conf, ensure that EG_PYTHON_INSTALL="Y". You can run make config in the Evergreen root directory and respond Y to the Install Python modules? question to set this, or edit your copy of install.conf directly.
  4. Build everything (as normal user):
  5. Install everything (as root):
    make install

The install step of the acq-experiment branch creates an extra Web directory, /openils/var/web/oilsweb/, that contains the Pylons application that provides the acquisitions and administration interface.

(Aside: acq-experiment and trunk now require the Perl JSON::XS module, available as libjson-xs-perl in Debian testing but not yet available in Debian Etch (stable). Add the testing sources to your /etc/apt/sources.list and install the package as root:)

# apt-get update
# apt-get install -t testing libjson-xs-perl

Step 3: Setting up the Evergreen acquisition Web

  1. Install the Pylons framework (as root):
    # easy_install Pylons
  2. Install the Python libxml2 and libxslt modules (as root):
    # apt-get install python-libxml2 python-libxslt1
  3. Install the Python mxDateTime class for handling ISO 8601 date formats (as root):
    # apt-get install python-egenix-mxdatetime
  4. Install the Python dnspython module (as root):
    # apt-get install python-dnspython
  5. Install dnsmasq and append the following configuration lines to enable dnspython to see your Evergreen server in a development environment (dnspython cannot read /etc/hosts entries and relies entirely on DNS resolvers). Adjust evergreen-server.localdomain to match your development machine's hostname:
    # apt-get install dnsmasq
    # echo address=/evergreen-server.localdomain/ >> /etc/dnsmasq.conf
    # echo nameserver >> /etc/resolv.conf
  1. In the directory /openils/var/web/oilsweb/, copy the file development.ini (which is under version control, and will get copied over top of any changes you make) to a new file called localdev.ini. Make it listen on all interfaces by setting the host variable in /openils/var/web/oilsweb/localdev.ini to You can also set it to listen on a specific IP address. Ensure the default host setting has been commented out.
    use = egg:Paste#http
    host =
    #host =
    port = 5000
  2. Add open-ils.acq to /openils/conf/opensrf.xml.
    1. Add something like the following in with the rest of the service configs:
    2. Enable open-ils.acq for your server in the <hosts> section of the config. Add the following:
  3. Start the opensrf router, Perl applications, and C applications as the opensrf user:
    # su - opensrf
    $ /openils/conf/opensrf_core.xml -a start_router
    $ /openils/conf/opensrf_core.xml -a start_perl
    $ /openils/conf/opensrf_core.xml -a start_c
  4. Start the acquisitions and administration Web interface as the opensrf user:
    # su - opensrf
    $ cd /openils/var/web/oilsweb
    $ paster serve --reload localdev.ini

    You should see a response like:

    serving on view at

Accessing the acquisitions and administration web

Open the IP address of your Evergreen server in a Web browser, including port 5000 in the URL. For example, if the IP address is, open in your browser. You should see a pretty "404 Error Not Found" Web page being served up by Pylons. This is good!

The URLs of interest to a Pylons application can be found in the file at /openils/var/web/oilsweb/oilsweb/config/, or in the Evergreen source at Open-ILS/web/oilsweb/oilsweb/config/

Start with http:<ipaddress>:5000/oils/admin/ to see the default landing page for the acquisitions and administration Web application. You should receive an error like:<code> oilsweb.lib.AuthException: AuthException: No authentication token provided </code> This is good! Start a srfsh session and log in with a workstation to get an authentication token. For example, assuming you have already registered a workstation called BR1-circ:<code> srfsh# login admin open-ils staff 0 BR1-circ </code> You will be given an authentication token. Pass that token as a GET parameter named ses to the oilsweb application; for example: http://hostname:5000/oils/admin/?ses=ff099f96168f33788abd8e4a7a71fb70 This should grant you access to the oilsweb kingdom.

acq/installing_python.txt · Last modified: 2022/02/10 13:34 by

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

© 2008-2022 GPLS and others. Evergreen is open source software, freely licensed under GNU GPLv2 or later.
The Evergreen Project is a U.S. 501(c)3 non-profit organization.