Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
How to Install CKAN 2.0 on SLES 11 SP2 in an offline environment
This guide will explain how to install CKAN on SLES 11 SP2. Additional challenge: no internet access.
Apache will serve CKAN via WSGI. CKAN will run with Python 2.6 and connect to a PostgreSQL Server 9.1. A Tomcat 6 server will host a Solr 3.6 for search. The installation of PostgreSQL server will not be covered by this document.
Required packages SLES 11 SP2
Install the following packages from the standard SLES repository:
We also need packages from the SLES SDK repository:
Additionally we need the
mod_wsgi module for Apache. This is not available from the SLES repositories. Download and install the RPM from the SuSE RPM index.
Create a database for CKAN
su - postgres
Create a PostgreSQL database user named
ckanuser with a password of
$ createuser -S -D -R -P ckanuser
Create a PostgreSQL database named
ckanuser as the owner.
$ createdb -O ckanuser ckantest
postgres user environment.
In order to install CKAN in an offline environment you will first need to collect all required packages on a machine with internet access.
On the machine with an existing Python installation and internet access, download and unpack virtualenv and build a bootstrapping environment
wget "http://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.9.1.tar.gz" tar -xvf virtualenv-1.9.1.tar.gz cd virtualenv-1.9.1 python virtualenv.py --no-site-packages --distribute base source base/bin/activate
Now you can download the dependency list, create a testing environment and then use this to archive the required packages to a directory
wget "https://raw.github.com/okfn/ckan/ckan-2.0/pip-requirements.txt" # Replace editable dependency with released dependency sed "s_-e git+https://firstname.lastname@example.org#egg=vdm_vdm==0.11_" pip-requirements.txt > requirements.txt mkdir -p packages pip install -r requirements.txt pip freeze > all-pip-requirements.txt pip install --download packages -r all-pip-requirements.txt
You have to make sure that the all-pip-requirements.txt file does not contain editable resources (startin with -e).
packages directory and move it, the
virtualenv-1.9.1.tar.gz and the CKAN 2.0 release to your offline target machine.
Extract the virtualenv and setup a new virtual environment
tar -xvf virtualenv-1.9.1.tar.gz python virtualenv.py --no-site-packages --distribute ckanenv source ckanenv/bin/activate
Extract ckan-2.0.zip to a
ckan directory and extract the packages zip file to a
Then again apply a small change to the dependency file of CKAN to make if offline installable.
sed "s_-e git+https://email@example.com#egg=vdm_vdm==0.11_" ckan/pip-requirements.txt > requirements.txt
Then install the dependencies of the requirements file while pointing to the packages directory:
pip install -r requirements.txt --no-index --find-links=packages
Go to the ckan directory and execute
python setup.py develop
Now your virtualenv is containing a complete CKAN installation with dependencies.
You can continue with the usual installation steps.