Installation
ldap2pg main packaging format is a regular Python package, available at PyPI as source and binary wheel. ldap2pg tries to reduce dependencies and to be compatible with versions available from official distributions repositories.
Requirements¶
ldap2pg requires Python 2.6+ or Python 3.4+, pyyaml, python-ldap and python-psycopg2. ldap2pg is well tested on Linux.
ldap2pg recommends to use your distribution packages for dependencies and for ldap2pg if available.
On runtime, ldap2pg requires a superuser access or a role with CREATEROLE
option. ldap2pg does not require to run on the same host as the PostgreSQL
cluster synchronized.
On RHEL 8/7/6 from RPM¶
On RHEL and compatible clone, either PGPG YUM repository and Dalibo Labs YUM repository offer RPM package for ldap2pg. Each repository does not provide the same packaging. Dalibo Labs is upstream, packages are more up to date. PGDG is more common and has more chances to be available on your host.
For using Dalibo Labs packaging:
- Enable Dalibo Labs YUM repository.
- Install
ldap2pg
package with yum:
For using PGDG YUM packaging:
- Enable PGDG YUM repository.
- Install
python3-ldap2pg
.
On RHEL 7 from pip¶
You should run ldap2pg
with Python3.6 to use RHEL packaged dependencies.
- Install EPEL:
- Install dependencies:
- Now install ldap2pg with pip:
- Check installation with:
On RHEL 6 from pip¶
On RHEL 6, pip-2.6 can’t access PyPI anymore. PyPI uses CloudFlare which requires the SNI TLS extension not available in Python 2.6 SSL. You must download each dependencies manually and install them locally using pip. You’d better use RPM.
On Debian 11 (bookworm) / 10 (buster)¶
On Debian buster and bookworm, you can use regular Python3 and wheels.
- Install dependencies from Debian repositories:
- Install ldap2pg from PyPI:
- Check installation:
On Debian 9 (stretch)¶
On Debian stretch, you can use regular Python3 and wheels.
- Install dependencies from Debian repositories:
- Install ldap2pg and python-ldap for Python 3.5.
- Check installation:
On Debian 8 (jessie)¶
On Debian jessie, you can use regular Python3 and wheels.
- Install dependencies from Debian repositories:
- Install ldap2pg and python-ldap for Python 3.4.
- Check installation:
Using pip¶
You can fetch all dependencies with pip. You must select which psycopg2 package you want. To build python-ldap you need python, libldap2 and libsasl2 development files and a compiler.