======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===== - Install Python headers for compiling pyxmpp & python_memcached (as root): # apt-get install python-dev - Upgrade to the latest version of [[http://peak.telecommunity.com/DevCenter/setuptools|setuptools]] (warning: this will overwrite your system package if you have already installed it) (as root): # easy_install --upgrade setuptools - Check out the development branch of OpenSRF (as normal user): $ svn co svn://svn.open-ils.org/OpenSRF/trunk - Uncomment the Python build flag in ''install.conf'' (as normal user): OSRF_INSTALL_PYTHON=1 - Build everything (as normal user): make - Install everything (as root): make install =====Step 2: Installing the Evergreen Python environment===== - Check out the acq-experiment branch of Evergreen (as normal user): $ svn co svn://svn.open-ils.org/ILS/branches/acq-experiment - 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 - 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. - Build everything (as normal user): make - 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===== - Install the Pylons framework (as root): # easy_install Pylons - Install the Python libxml2 and libxslt modules (as root): # apt-get install python-libxml2 python-libxslt1 - Install the Python mxDateTime class for handling ISO 8601 date formats (as root): # apt-get install python-egenix-mxdatetime - Install the Python dnspython module (as root): # apt-get install python-dnspython - 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/127.0.0.1 >> /etc/dnsmasq.conf # echo nameserver 127.0.0.1 >> /etc/resolv.conf - 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 ''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 ... - Add open-ils.acq to /openils/conf/opensrf.xml. - Add something like the following in with the rest of the service configs: 3 1 perl OpenILS::Application::Acq 101 open-ils.acq_unix.sock open-ils.acq_unix.pid 1000 open-ils.acq_unix.log 3 15 2 5 - Enable open-ils.acq for your server in the section of the config. Add the following: open-ils.acq - Start the opensrf router, Perl applications, and C applications as the ''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 - 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 0.0.0.0:5000 view at http://127.0.0.1:5000 ======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 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://:5000/oils/admin/ to see the default landing page for the acquisitions and administration Web application. You should receive an error like: oilsweb.lib.AuthException: AuthException: No authentication token provided 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'': srfsh# login admin open-ils staff 0 BR1-circ 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.