Postgres installation

From Origami_Wiki
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