postgresqlsecuritydebianintrusion-detection

Error setting up OSSEC HIDS with PostgreSQL on Debian 8


I am trying to install OSSEC HIDS on my server with a Database Suport (have done it before with mail notifications). I already have PostgreSQL with other databases in it, but when I try to compile OSSEC with Database Suport (Like in this guide: http://ossec-docs.readthedocs.io/en/latest/manual/output/database-output.html ), I get the following error ( when running the command # make setdb ):

Error: MySQL client libraries not installed.

Error: DB libraries not installed.

Tried to just ignore it and install it using the instal.sh script, and it works fine, but when I add the Database options to the config file, I get:

Starting OSSEC HIDS v2.8.3 (by Trend Micro Inc.)...
2016/06/06 18:34:58 ossec-dbd(5207): ERROR: OSSEC not compiled with support for 'postgresql'.
2016/06/06 18:34:58 ossec-dbd(1202): ERROR: Configuration error at '/var/ossec/etc/ossec.conf'. Exiting.

Solution

  • You must have libpq-dev installed. Use this:

    sudo apt-get -y install libpq-dev

    Moreover to be at safe side, install these packages as well:

    sudo apt-get install postgresql-client postgresql-client-common

    Let me know, if you're still facing any issues. It works just fine for me.