Install pgAudit extension

From: Dylan Luong <Dylan(dot)Luong(at)unisa(dot)edu(dot)au>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Install pgAudit extension
Date: 2016-12-06 05:44:56
Message-ID: 314373aa3a63423694bbe873488b1af6@ITUPW-EXMBOX2B.UniNet.unisa.edu.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi

I need some advice on installing the pgAudit extension as I am new to PostgreSQL extenstions.

I currently have Postgres95 on Linux Redhat 6.8 running on the server and I need to test out the pgAudt extension.
I downloaded the file pgaudit-REL9_5_STABLE.zip from https://github.com/pgaudit/pgaudit/tree/REL9_5_STABLE
In the Readme file, under "Compile and Install" the instructions are:

1. Clone the PostgreSQL repository:
git clone https://github.com/postgres/postgres.git

2. Checkout REL9_5_STABLE branch:
git checkout REL9_5_STABLE

3. Make PostgreSQL:
./configure
make install -s

4. Change to the contrib directory:
cd contrib

5. Clone the pgAudit extension:
git clone https://github.com/pgaudit/pgaudit.git

6. Change to pgAudit directory:
cd pgaudit

7. Build pgAudit and run regression tests:
make -s check

8. Install pgAudit:
make install

My problem is that I can't find the contrib directory anywhere on the server. ( assume this is because the install steps refers to the old Postfres 8???)
There is default directory for extensions in my current 9.5 install:
/usr/pgsql-9.5/share/extension/

As I have Postrgres9.5 installed and downloaded the zip file (pgaudit-REL9_5_STABLE.zip), I assume I only have to perform steps 7 and 8.
Do I just unzip the content into a directory /usr/pgsql-9.5/share/extension/pgaudit and then run the steps 7 and 8??? Or do I even need to run the make steps as all the files appears to be there. Ie .control, .sql, .conf, etc.

The makefile in pgaudit-REL9_5_STABLE.zip refers to .../contrib/pgaudit/..... ?????

# contrib/pg_audit/Makefile

MODULE_big = pgaudit
OBJS = pgaudit.o $(WIN32RES)

EXTENSION = pgaudit
DATA = pgaudit--1.0.sql
PGFILEDESC = "pgAudit - An audit logging extension for PostgreSQL"

REGRESS = pgaudit
REGRESS_OPTS = --temp-config=$(top_srcdir)/contrib/pgaudit/pgaudit.conf

ifdef USE_PGXS
PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
else
subdir = contrib/pgaudit
top_builddir = ../..
include $(top_builddir)/src/Makefile.global
include $(top_srcdir)/contrib/contrib-global.mk
endif

Thanks for your help.
Regards
Dylan

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John R Pierce 2016-12-06 06:00:23 Re: Install pgAudit extension
Previous Message Swapnil Vaze 2016-12-06 05:36:12 Migrating data from DB2 zOS to PostgreSQL