-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcompiling.txt
46 lines (33 loc) · 1.31 KB
/
compiling.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
Compiling the Audit Plugin for PostgreSQL
=========================================
0. Prerequisites. Be sure you have the following installed:
Autoconf --- At least version 2.69
Automake --- At least version 1.14.1
Libtool --- At least version 2.4.6
1. Download a tarball of the source code for the version of
PostgreSQL that you are using. The Audit plugin is supported on
version 9.2.13 and forward, and versions 9.3.x, 9.4.x, 9.5.x and 9.6.x.
For example, assume that you are compiling against version 9.5.0.
2. Extract the tarball:
tar -xpjf postgresql-9.5.0.tar.bz2
3. Configure the code and set up the include directories so that the
plugin code can find them:
cd postgresql-9.5.0
./configure --without-readline --without-zlib
(cd src/backend ; make submake-errcodes)
4. For PostgreSQL 9.6:
tar -xpjf postgresql-9.6.0.tar.bz2
cd postgresql-9.6.0
./configure --without-readline --without-zlib
(cd src/backend ; make submake-errcodes
cd ../include
ln -s ../../backend/storage/lmgr/lwlocknames.h storage)
5. Go to the contrib directory and clone the repo from Github:
cd contrib
git clone https://github.trellix.com/trellix-products/DBSecPostgreSQL_AuditPlugin
6. Go into the plugin directory, configure and build
cd postgresql-audit
./bootstrap.sh
./configure
make
The plugin will be in src/audit.so.