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.
# apt-get install python-dev
# easy_install --upgrade setuptools
$ svn co svn://svn.open-ils.org/OpenSRF/trunk
install.conf
(as normal user):OSRF_INSTALL_PYTHON=1
make
make install
$ svn co svn://svn.open-ils.org/ILS/branches/acq-experiment
# replace with your username / database name / database version as required psql -U evergreen -d evergreen -f /usr/share/postgresql/8.2/contrib/pgxml.sql
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.make
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
# easy_install Pylons
# apt-get install python-libxml2 python-libxslt1
# apt-get install python-egenix-mxdatetime
# apt-get install python-dnspython
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/127.0.0.1 >> /etc/dnsmasq.conf # echo nameserver 127.0.0.1 >> /etc/resolv.conf
/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 0.0.0.0
. You can also set it to listen on a specific IP address. Ensure the default host
setting has been commented out.... [server:main] use = egg:Paste#http host = 0.0.0.0 #host = 216.154.195.227 port = 5000 ...
<open-ils.acq> <keepalive>3</keepalive> <stateless>1</stateless> <language>perl</language> <implementation>OpenILS::Application::Acq</implementation> <max_requests>101</max_requests> <unix_config> <unix_sock>open-ils.acq_unix.sock</unix_sock> <unix_pid>open-ils.acq_unix.pid</unix_pid> <max_requests>1000</max_requests> <unix_log>open-ils.acq_unix.log</unix_log> <min_children>3</min_children> <max_children>15</max_children> <min_spare_children>2</min_spare_children> <max_spare_children>5</max_spare_children> </unix_config> </open-ils.acq>
<appname>open-ils.acq</appname>
opensrf
user:# su - opensrf $ osrf_ctl.sh /openils/conf/opensrf_core.xml -a start_router $ osrf_ctl.sh /openils/conf/opensrf_core.xml -a start_perl $ osrf_ctl.sh /openils/conf/opensrf_core.xml -a start_c
opensrf
user:# su - opensrf $ cd /openils/var/web/oilsweb $ paster serve --reload localdev.ini
You should see a response like:
serving on 0.0.0.0:5000 view at http://127.0.0.1:5000
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 211.211.211.211, open http://211.211.211.211:5000 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 routing.py
file at /openils/var/web/oilsweb/oilsweb/config/routing.py
, or in the Evergreen source at Open-ILS/web/oilsweb/oilsweb/config/routing.py
.
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.