CKAN is an open-source data management platform that enables organizations to publish, share, and find datasets. This tutorial will guide you through the process of installing CKAN on Debian latest.
Before you get started, it's essential that you have the following installed on your system:
Update your system:
sudo apt-get update && sudo apt-get upgrade
Install the necessary packages:
sudo apt-get install -y python-dev postgresql libpq-dev python-pip python-virtualenv git-core solr-jetty
Next, create a virtual environment:
sudo mkdir -p /usr/lib/ckan/default
sudo chown `whoami` /usr/lib/ckan/default
virtualenv --no-site-packages /usr/lib/ckan/default
Activate the virtual environment:
. /usr/lib/ckan/default/bin/activate
Install the CKAN package:
pip install -e git+https://github.com/ckan/ckan.git#egg=ckan
Install the CKAN requirements:
pip install -r /usr/lib/ckan/default/src/ckan/requirements.txt
Create a PostgreSQL user and database:
sudo su - postgres
psql -U postgres -c "CREATE USER ckandb WITH PASSWORD 'mypassword';"
psql -U postgres -c "CREATE DATABASE ckan_default WITH OWNER ckandb ENCODING 'utf-8';"
psql -U postgres -c "ALTER USER ckandb CREATEDB;"
exit
Copy the configuration file to the right place:
sudo cp /usr/lib/ckan/default/src/ckan/ckan/config/who.ini /etc/ckan/default/who.ini
Edit the CKAN configuration file:
Edit /etc/ckan/default/who.ini
using your favorite text editor and update the following values:
sqlalchemy.url = postgresql://ckandb:mypassword@localhost/ckan_default
solr_url = http://127.0.0.1:8983/solr
Create the CKAN tables:
paster --plugin=ckan db init -c /etc/ckan/default/who.ini
sudo chown -R www-data:www-data /usr/lib/ckan/default
sudo service apache2 restart
sudo service jetty restart
Congratulations, you have now successfully installed CKAN on Debian Latest! You can access CKAN by visiting http://localhost:5000.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!