This is a debian package for the pgaudit extension.
-
Add Dhatim Bintray's debian repository in sources.list:
echo "deb http://dl.bintray.com/dhatim/deb stable main" | sudo tee -a /etc/apt/sources.list
-
If it is the first repository from Bintray that you add, you will also need to add Bintray's public key to apt:
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 379CE192D401AB61
-
Depending on your PostgreSQL version, install the
postgresql-pgaudit-9.5
,postgresql-pgaudit-9.6
orpostgresql-pgaudit-10
package. For example, with PostgreSQL 9.6:sudo apt-get update && sudo apt-get install postgresql-pgaudit-9.6
-
Add
pgaudit
toshared_preload_libraries
inpostgresql.conf
so the extension is loaded. -
Restart the PostgreSQL server.