Installing BibServer from the repo on Mac OSX

The following guest post is by Edmund Chamberlain who works at Cambridge Unviversity Library.

As part of my work on the Open Bibliography project, I wanted to test how easy it would be for an average Systems Librarian such as myself to get BibServer up and running.

Turns out, it was pretty simple, for a development environment at least. The latest install docs can be found at readthedocs.org and contain pointers to all the required packages and dependencies; see here for install instructions.

###Python and dependencies

I started almost from scratch with a new Macbook Air running OSX Lion. The first thing I needed was the latest binaries for Python, the language BibServer and most OKFN projects are coded in. Python is installed on OSX by default but for good measure, I installed XCode 4 for free from the Apple App store. Advice on getting Python onto your favoured *nix OS or even Windows can be found on the main Python site.

According to the BibServer docs, a few additional dependencies were required, specifically PIP (one of several Python package manager options) and Virtual Env (a means to create multiple separate Python environments). Some great instructions on doing this can be found here.

Finally, I needed GIT version control software. Instructions for getting GIT onto OSX can be found along with a dedicated installer. If you are not familiar with GIT, here is a great introduction.

###ElasticSearch

Next up, I needed to install the indexing service underpinning BibServer, ElasticSearch. Having spent days grappling with various indexing solutions and document / graph based databases in the past, his was the part I was most hesitant about. Turns out, it really was as simple as the instructions stated.

1) Download the latest version into an appropriate place, extract files and simply start it.

2) Start ElasticSearch with:

$sudo bin/elasticsearch

3) Elastic Search is built with and runs on top of of Java. If you don’t have this installed OSX Lion will prompt you to download and install the latest version.

4) The install instructions give some tips on setting it up as a service.

###BibServer

With GIT and VirtualEnv installed, BibServer can be pulled and set up relatively quickly.

1) Create and start a virtual environment where {myenv} is the filepath of the environment:

virtualenv {myenv}

. {myenv}/bin/activate

2) Using GIT, clone the BibServer source code into that environment:

mkdir {myenv}/src

sudo git clone https://github.com/okfn/bibserver {myenv}/src/

3) Run a development install using Pip:

cd {myenv}/src/bibserver/bibserver

sudo pip install -e .

###Running it!

1) Ensure ElasticSearch is running.

2) Start Bibserver up:

sudo python {myenv}/src/bibserver/bibserver/web.py

3) Point your favoured web browser at:

localhost::5000

4) Upload a sample CSV file.

BibServer can be easily run a a background process using screen or some other suitable tool.

Profile photo of Naomi Lillie

About Naomi Lillie

Naomi has been working for Open Knowledge since 2011 and is based in the UK. She supports operations, projects, staff and the community network.
This entry was posted in BibServer, guest post, JISC OpenBib and tagged , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *