IGOS Nusantara dan phpPgAdmin: Perbedaan revisi

Dari IGNwiki
Langsung ke: navigasi, cari
(←Membuat halaman berisi ' == Pasang == # yum -y install phpPgAdmin == Konfigurasi == vi /etc/phpPgAdmin/config.inc.php # line 18: add $conf['servers'][0]['host'] = 'localhost'; # line ...')
 
 
(4 revisi antara oleh pengguna yang sama tidak ditampilkan)
Baris 1: Baris 1:
 +
Akses postgres melalui web dapat dilakukan dengan memakai phpPgAdmin.
 +
 +
== Syarat ==
 +
* Postgres telah terpasang, baca: http://igos-nusantara.or.id/wiki/index.php?title=IGOS_Nusantara_dan_PostgreSQL
  
 
== Pasang ==
 
== Pasang ==
Baris 4: Baris 8:
  
 
== Konfigurasi ==
 
== Konfigurasi ==
 +
 +
=== Ubah /etc/phpPgAdmin/config.inc.php ===
 
  vi /etc/phpPgAdmin/config.inc.php
 
  vi /etc/phpPgAdmin/config.inc.php
  # line 18: add
+
  # Baris 18: tambahkan
 
  $conf['servers'][0]['host'] = 'localhost';
 
  $conf['servers'][0]['host'] = 'localhost';
 
   
 
   
  # line 88: change
+
  # baris 88: ubah true, menjadi false
  $conf['extra_login_security'] =false;
+
  $conf['extra_login_security'] = false;
  
  # line 94: change
+
  # baris 94: ubah false, menjadi true
  $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
 
  # line 70: change
 
  # line 70: change
  local all all             md5
+
  local all all                 md5
 
   
 
   
  # line 72: change and add the IP range you permit
+
  # baris 72: ubah
  host all all  127.0.0.1/32 md5
+
  host all all  127.0.0.1/32   md5
 +
host all all  192.168.0.0/24  md5
 
   
 
   
host all all  10.0.0.0/24  md5
+
  # baris 75: ubah
+
  local all all ::1/128         md5
  # line 75: change
+
  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
  # line 11: add IP range you permit
+
  # baris 11: tambah IP yg dibolehkan
  Allow from 127.0.0.1 10.0.0.0/24
+
  Allow from 127.0.0.1 10.0.0.0/24 192.168.0.0/24 192.168.2.0/24
 
+
 
+
/etc/rc.d/init.d/postgresql restart
+
  
/etc/rc.d/init.d/httpd reload
+
== Restart ==
 +
# /etc/rc.d/init.d/postgresql restart
 +
# /etc/rc.d/init.d/httpd reload

Revisi terkini pada 30 Oktober 2013 02.25

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