Skip to main content

Installing Database

Install PostgreSQL

apt install postgresql postgresql-client -y

Create user dspace with password dspace in PostgreSQL.

su postgres
createuser -U postgres -d -A -P dspace

Create a database for dspace.

sudo -u dspace createdb -U dspace -E UNICODE dspace 

Activating the pgcrypto extension.

su postgres
psql --username=postgres dspace -c "CREATE EXTENSION pgcrypto;"

Open the PostgreSQL configuration file pg_hba.conf.

nano /etc/postgresql/12/main/pg_hba.conf 

Add the following configuration at the very bottom line.

local  all  dspace  md5

Restart PostgreSQL.

systemctl restart postgresql
systemctl status postgresql