How to install CKAN dev v2.6 on Fedora 24

Rick Leir edited this page Oct 20, 2016 · 25 revisions


This manual procedure needs to be more automated.


Start with a fresh install of the Fedora 24 Workstation distribution. If you installed the server version, or Fedora 23, there could be minor differences.


The default Java is:

$ alternatives --display java
java - status is auto.
link currently points to /usr/lib/jvm/java-1.8.0-openjdk-
$ java -version
openjdk version "1.8.0_91"


The default python is:

# python --version
Python 2.7.11

We also need:

# dnf install python2-virtualenv postgresql-server postgresql-devel redhat-rpm-config
  python-devel.x86_64 2.7.11-4.fc24 python-rpm-macros.noarch 3-7.fc24 python2-rpm-macros.noarch 3-7.fc24 python2-virtualenv.noarch 14.0.6-1.fc24 postgresql.x86_64 9.5.4-1.fc24 postgresql-server.x86_64 9.5.4-1.fc24 postgresql-devel.x86_64 9.5.4-1.fc24 postgresql-libs.x86_64 9.5.4-1.fc24 python-srpm-macros.noarch 3-7.fc24 redhat-rpm-config.noarch 41-2.fc24 ...


For now, let's use permissive mode.

# setenforce Permissive
# getenforce

Install for dev and testing

(adapted from and [] (

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 ~/myckan/lib
$ sudo ln -s ~/myckan/lib /usr/lib/ckan
$ mkdir -p ~/myckan/etc
$ sudo ln -s ~/myckan/etc /etc/ckan

Create a Python virtual environment (virtualenv) to install CKAN into, and activate it:

$ mkdir -p /usr/lib/ckan/default
$ virtualenv --no-site-packages /usr/lib/ckan/default
New python executable in /usr/lib/ckan/default/bin/python2
Also creating executable in /usr/lib/ckan/default/bin/python
Installing setuptools, pip, wheel...done.

$ . /usr/lib/ckan/default/bin/activate
(default) $

Clone the project. Because of the above 'ln -s' commands, this is all cloned into ~/myckan/lib/default/src/ckan/

(default) $ pip install -e 'git+'
Obtaining ckan from git+
  Updating /usr/lib/ckan/default/src/ckan clone (to dev-v2.6)
Installing collected packages: ckan
  Running develop for ckan
Successfully installed ckan

(default) $

Install some prereqs:

(default) $ pip install -r /usr/lib/ckan/default/src/ckan/requirements.txt 

Configure PostgreSQL

Initialize the PostgreSQL database

# postgresql-setup --initdb --unit postgresql

Edit /var/lib/pgsql/data/pg_hba.conf so it will accept passwords for login while still allowing the local postgres user to manage via ident login. The relevant changes to pg_hba.conf are as follows:

local   all         postgres                          ident
local   all         all                               md5
# IPv4 local connections:
host    all         all          md5
# IPv6 local connections:
host    all         all         ::1/128               md5

Enable PostgreSQL to start on system boot

# systemctl enable postgresql.service
# systemctl start  postgresql.service
# systemctl status postgresql.service

Next you’ll need to create a database user if one doesn’t already exist. Create a new PostgreSQL database user called ckan_default, and enter a password for the user when prompted. You’ll need this password later:

# su - postgres -c 'createuser -S -D -R -P ckan_default'

Create a new PostgreSQL database, called ckan_default, owned by the database user you just created:

# su - postgres -c 'createdb -O ckan_default ckan_default -E utf-8'
# su - postgres -c 'psql -l'

CKAN Configuration

Create a CKAN config file:

(default) $ mkdir -p /etc/ckan/default
(default) $ cd /usr/lib/ckan/default/src/ckan
(default) $ paster make-config ckan /etc/ckan/default/development.ini
Distribution already installed:
  ckan 2.6.0b0 from /home/rleir/myckan/lib/default/src/ckan
Creating /etc/ckan/default
Creating /etc/ckan/default/development.ini
Now you should edit the config files
(default) $ 

Edit the development.ini config file in a text editor, replacing 'pass' with the db password from above:

sqlalchemy.url = postgresql://ckan_default:pass@localhost/ckan_default

In the same file, append the core name 'ckan' to the Solr URL:

solr_url =

More RSN

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.