IGOS Nusantara dan phpPgAdmin: Perbedaan revisi

Dari IGNwiki
Langsung ke: navigasi, cari
Baris 8: Baris 8:
  
 
== Konfigurasi ==
 
== Konfigurasi ==
 +
 +
=== Ubah /etc/phpPgAdmin/config.inc.php ===
 
  vi /etc/phpPgAdmin/config.inc.php
 
  vi /etc/phpPgAdmin/config.inc.php
 
  # Baris 18: tambahkan
 
  # Baris 18: tambahkan
Baris 18: Baris 20:
 
  $conf['owned_only'] =true;
 
  $conf['owned_only'] =true;
  
 +
=== Ubah /var/lib/pgsql/data/pg_hba.conf ===
  
 
  vi /var/lib/pgsql/data/pg_hba.conf
 
  vi /var/lib/pgsql/data/pg_hba.conf
Baris 30: Baris 33:
 
  local all all ::1/128        md5
 
  local all all ::1/128        md5
 
   
 
   
 +
=== Ubah /etc/httpd/conf.d/phpPgAdmin.conf ===
 
  # vi /etc/httpd/conf.d/phpPgAdmin.conf
 
  # vi /etc/httpd/conf.d/phpPgAdmin.conf
 
  # baris 11: tambah IP yg dibolehkan
 
  # baris 11: tambah IP yg dibolehkan

Revisi per 29 Oktober 2013 05.23

Akses postgres melalui web dapat dilakukan dengan memakai phpPgAdmin.

Syarat:

Pasang

# yum -y install phpPgAdmin

Konfigurasi

Ubah /etc/phpPgAdmin/config.inc.php

vi /etc/phpPgAdmin/config.inc.php
# Baris 18: tambahkan
$conf['servers'][0]['host'] = 'localhost';

# baris 88: ubah true, menjadi false
$conf['extra_login_security'] =false;
# baris 94: ubah false, menjadi true
$conf['owned_only'] =true;

Ubah /var/lib/pgsql/data/pg_hba.conf

vi /var/lib/pgsql/data/pg_hba.conf
# line 70: change
local all all                 md5

# baris 72: ubah
host all all  127.0.0.1/32    md5
host all all  192.168.0.0/24  md5

# baris 75: ubah
local all all ::1/128         md5

Ubah /etc/httpd/conf.d/phpPgAdmin.conf

# vi /etc/httpd/conf.d/phpPgAdmin.conf
# baris 11: tambah IP yg dibolehkan
Allow from 127.0.0.1 10.0.0.0/24 192.168.0.0/24 192.168.2.0/24

Restart

# /etc/rc.d/init.d/postgresql restart
# /etc/rc.d/init.d/httpd reload