Postgres installation

From Origami_Wiki
Revision as of 14:46, 16 June 2017 by imported>Kishor (Created page with "install <b>postgres</b> from these links<br> https://yum.postgresql.org/howtoyum.php<br> https://yum.postgresql.org/repopackages.php<br> wget the required version into serve...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

install postgres from these links

https://yum.postgresql.org/howtoyum.php
https://yum.postgresql.org/repopackages.php

wget the required version into server, then

rpm -Uvh "downloaded file"
yum install postgresql93-server postgresql93

follow steps in http://community.webcorecloud.com/tutorials/install-postgresql-94-centos-6x/


vim /var/lib/pgsql93/data/postgresql.conf
log_destination = 'stderr'
logging_collector = on
log_directory = 'pg_log'

Installing PhpPgAdmin

yum install phpPgAdmin
vim /etc/httpd/conf.d/phpPgAdmin.conf

  1. Deny from all
  2. Allow from 127.0.0.1

Allow from all ## <-- safe for internal servers, but provide the allowed IPs(office static IP) in live environment

vim /etc/phpPgAdmin/config.inc.php OR
vim /usr/share/phpPgAdmin/conf/config.inc.php
$conf['extra_login_security'] = false;

vim /var/lib/pgsql93/data/pg_hba.conf
local all all trust
host all all 127.0.0.1/32 md5
host all postgres all md5

  1. IPv6 local connections:

host all all ::1/128 md5


UBUNTU doc reference:
http://stackoverflow.com/questions/1471571/how-to-configure-postgresql-for-the-first-time reference