Skip to content

virtualenv install for Ubuntu 14.04

dodpears edited this page May 22, 2017 · 1 revision

Overview

The initial doc is how to set it up in a Python virtual environment. This is useful as Python 2.7.9 or greater is required to avoid HSI errors when running the client.

Use of the client requires a REN-ISAC API token. If you already possess a token for SES (CIF) token, that works. If not see the REN-ISAC PDNSSDK wiki page.

Installation (Python virtual environment)

Compile and install Python 2.7.9

sudo apt-get update

sudo apt-get install -y gcc-multilib g++-multilib libffi-dev libffi6 libffi6-dbg python-crypto python-mox3 python-pil python-ply libssl-dev zlib1g-dev libbz2-dev libexpat1-dev libbluetooth-dev libgdbm-dev dpkg-dev quilt autotools-dev libreadline-dev libtinfo-dev libncursesw5-dev tk-dev blt-dev libssl-dev zlib1g-dev libbz2-dev libexpat1-dev libbluetooth-dev libsqlite3-dev libgpm2 mime-support netbase net-tools bzip2 virtualenvwrapper

mkdir ~/src
sudo mkdir /usr/local/lib/python2.7.9
cd ~/src
wget https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tgz
tar -zxvf Python-2.7.9.tgz
cd Python-2.7.9

make clean
./configure --prefix=/usr/local/lib/python2.7.9
make
sudo make install

Create the Python virtual environment and install the pdnssdk client

cd

# necessary for shell to be made aware of the virtualwrapper commands
source .bashrc

mkvirtualenv -p /usr/local/lib/python2.7.9/bin/python ri
pip install pip --upgrade
pip install ri_pdnssdk
export PDNS_TOKEN=<your api key here>
deactivate

Usage

Activate the virtual environment

workon ri

Queries

pdns -q 8.8.8.8