[Pgcluster-general] My Configuration of PGCluster via VPN
dewi andriyanti
emailq_stis at yahoo.com
Thu Jun 28 06:37:32 UTC 2007
Actually, the configuration of PGCluster via VPN is
like LAN.
This is my configuration via VPN. I use 1 replication
server in master and no load balancer because i just
need a simple replication system.
Master and back-up
# nano /etc/hosts (as root)
10.6.3.16 backup.co.id backup
10.100.0.11 master.co.id master
$ nano /usr/local/pgsql/data/pg_hba.conf (as postgres)
host all all 127.0.0.1/32 trust
host all all 10.6.3.0/24 trust
host all all 10.100.0.0/16 trust
$nano /usr/local/pgsql/data/cluster.conf
# set Replication Server information
<Replicate_Server_Info>
<Host_Name> master.co.id </Host_Name>
<Port> 8001 </Port>
<Recovery_Port> 8101 </Recovery_Port>
<LifeCheck_Port> 8201 </LifeCheck_Port>
</Replicate_Server_Info>
# set Cluster DB Server information
<Recovery_Port> 7001 </Recovery_Port>
<Rsync_Path> /usr/bin/rsync </Rsync_Path>
<Rsync_Option> ssh -x </Rsync_Option>
<Rsync_Compress> yes </Rsync_Compress>
<Pg_Dump_Path> /usr/local/pgsql/bin/pg_dump
</Pg_Dump_Path>
<When_Stand_Alone> read_write </When_Stand_Alone>
Master
$nano /usr/local/pgsql/share/pgreplicate.conf
# A setup of Cluster DB(s)
<Cluster_Server_Info>
<Host_Name> master.co.id </Host_Name>
<Port> 5432 </Port>
<Recovery_Port> 7101 </Recovery_Port>
<LifeCheck_Port> 7201 </LifeCheck_Port>
</Cluster_Server_Info>
<Cluster_Server_Info>
<Host_Name> backup.co.id </Host_Name>
<Port> 5432 </Port>
<Recovery_Port> 7101 </Recovery_Port>
<LifeCheck_Port> 7201 </LifeCheck_Port>
</Cluster_Server_Info>
# A setup of a replication server
<Host_Name> master.co.id </Host_Name>
<Replication_Port> 8001 </Replication_Port>
<Recovery_Port> 8101 </Recovery_Port>
<RLOG_Port> 8301 </RLOG_Port>
<Response_Mode> normal </Response_Mode>
<Use_Replication_Log> yes </Use_Replication_Log>
Back-up
# A setup of a replication server
<Host_Name> master.co.id </Host_Name>
<Replication_Port> 8001 </Replication_Port>
<Recovery_Port> 8101 </Recovery_Port>
<RLOG_Port> 8301 </RLOG_Port>
<Response_Mode> normal </Response_Mode>
<Use_Replication_Log> yes </Use_Replication_Log>
Be sure the node can ping and access database each
other by make listen='*' in
/usr/local/pgsql/data/postgresql.conf
and don't forget to disable firewall.
Send instant messages to your online friends http://uk.messenger.yahoo.com
More information about the Pgcluster-general
mailing list