Installation Instructions for CKAN version 2.6
Step 1 - Install the required packages
sudo apt-get install python-dev postgresql libpq-dev python-pip python-virtualenv git-core openjdk-8-jdk
Step 2 - Install CKAN into a Python virtual environment
If you’re installing CKAN for development and want it to be installed in your home directory, you can symlink the directories used in this documentation to your home directory. This way, you can copy-paste the example commands from this documentation without having to modify them, and still have CKAN installed in your home directory:
mkdir -p ~/ckan/lib
sudo ln -s ~/ckan/lib /usr/lib/ckan
mkdir -p ~/ckan/etc
sudo ln -s ~/ckan/etc /etc/ckan
- Create a Python virtual environment (virtualenv) to install CKAN into, and activate it:
sudo mkdir -p /usr/lib/ckan/default
sudo chown `whoami` /usr/lib/ckan/default # "Whoami" will be the owner of folder
virtualenv --python=/usr/bin/python2.7 --no-site-packages /usr/lib/ckan/default # "default" will be the name of virtualenv
. /usr/lib/ckan/default/bin/activate
- Install the CKAN source code into your virtualenv. To install the latest stable release of CKAN (CKAN 2.6.7), run:
pip install -e 'git+https://github.com/ckan/ckan.git@ckan-2.6.7#egg=ckan'
- Install the Python modules that CKAN requires into your virtualenv:
pip install -r /usr/lib/ckan/default/src/ckan/requirements.txt
*To avoid the Error: could not determine PostgreSQL version from ‘10.14’
Upgrade psycopg2 from 2.4.5 to 2.7.5 (in requirements.txt)
* Deactivate and reactivate your virtualenv, to make sure you’re using the virtualenv’s copies of commands like paster rather than any system-wide installed copies:
deactivate
. /usr/lib/ckan/default/bin/activate
Step 3 - Setup a PostgreSQL database
“`
sudo -u postgres createuser -S -D -R -P ckan_default # ckan-default -> User
sudo -u postgres createdb -O ckan_default ckan_default -E utf-8 # ckan_defa