EPrints 3.4 and PostgreSQL

From EPrints Documentation
Jump to: navigation, search

EPrints has supported PostgreSQL since quite early in its development. However, MySQL is the default database engine, so few repositories actually use PostgreSQL. This page examines how to setup the latest version of EPrints 3.4 (currently 3.4.2) using PostgresSQL.

Installiing and Configuring PostgreSQL

This is based on installing on a CentOS 7 Linux operating system. Carry out the following steps as the root user. 1. Install the required packages using YUM:

yum install postgresql postgresql-server perl-DBD-Pg

2. Perform initial PostgreSQL setup

postgresql-setup initdb

3. Edit /var/lib/pgsql/data/pg_hba.conf by changing the following two lines to allow password-less local access and access from localhost (i.e. when using --host localhost flag with psql):

local   all             all                                     peer
host    all             all               ident


local   all             all                                     trust
host    all             all               trust

You may wish to set authentication option to md5 rather than trust to restrict access for some users on your server but you will need to manual set a password for the postgres user.

4. Enable and start PostgreSQL on the operating system

systemctl enable postgresql
systemctl start postgresql

Creating an EPrints archive with a PostgreSQL database

To be written...