Skip to content

avkosme/postgresql95

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

postgresql95

Manual initialization db

$ /usr/pgsql-9.5/bin/postgresql95-setup initdb
$ systemctl start postgresql-9.5

Create database, user

# CREATE DATABASE dbname;
# CREATE USER username WITH ENCRYPTED PASSWORD 'password';
# GRANT ALL PRIVILEGES ON DATABASE dbname TO username;

Add permission (FOR STAGING ONLY)

Set in file /var/lib/pgsql/9.5/data/postgresql.conf

listen_addresses = '*'

Set in /var/lib/pgsql/9.5/data/pg_hba.conf

host  all all 0.0.0.0/0 trust

Backup

$ pg_dump -h localhost -U username -d dbname > `date +%Y-%m-%d_%H:%M`-backup.sql

Restore

$ psql dbname < data_base_dump.sql

About

Postgresql95 based avkosme/centos image

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published