.. _db_oracle:

Running LinOTP with Oracle on RedHat
------------------------------------

This describes how to setup LinOTP with a connection to an Oracle database on a RedHat system.
On other distributions this may vary.



Overview
~~~~~~~~

You need to install the following packages:

 * Oracle client (out of the scope of this document)
 * cx_Oracle python module 
 * LinOTP

Therefore you need to change the following config files:

 * ``/etc/linotp2/linotp.ini``
 

Installation
~~~~~~~~~~~~

Install cx_Oracle python module
...............................

Change to your virtualenv and install cx_Oracle [#cx_oracle]_ to your virtualenv::

   pip install cx_Oracle

.. [#cx_oracle] You can also download and install cx_Oracle from http://cx-oracle.sourceforge.net/ for your given Python version.

Install LinOTP
..............
Starting with version 2.4.3-4 LinOTP runs nicely with Oracle. So install the latest LinOTP package::

   pip install --upgrade /path/to/package/LinOTP-2.4.3-4.tar.gz


Configuration
~~~~~~~~~~~~~

LinOTP
......

Adapt the config file ``/etc/linotp2/linotp.ini``::

   sqlalchemy.url = oracle://user:pass@host:port/dbname

Create the database tables
..........................

The database tables are created in the usual way::

   paster setup-app /etc/linotp2/linotp.ini