学习记录未完

[root@tigase2 pgpool-II-3.0]#./configure

[root@tigase2 pgpool-II-3.0]# make

[root@tigase2 pgpool-II-3.0]# makeinstall

[root@nagios ~]# cp/usr/local/etc/pgpool.conf.sample-stream /usr/local/etc/pgpool.conf

[root@nagios ~]# cd /usr/local/etc/

[root@nagios etc]# vi pgpool.conf

listen_addresses = '*'

port = 9999

pcp_port = 9898


backend_hostname0 = '192.168.3.42'

backend_port0 = 5432

backend_weight0 = 1

backend_data_directory0 ='/var/lib/pgsql/9.2/data'

backend_hostname1 = '192.168.3.41'

backend_port1 = 5432

backend_weight1 = 1

backend_data_directory1 ='/var/lib/pgsql/9.2/data'

log_statement = on

log_connections = on

log_hostname = on

debug_level = 1

logdir = '/usr/local/etc/pgpoollog'

pid_file_name ='/var/run/pgpool/pgpool.pid'


[root@nagios etc]# mkdir/usr/local/etc/pgpoollog

[root@nagios etc]# cp/usr/local/etc/pool_hba.conf.sample /usr/local/etc/pool_hba.conf

[root@nagios etc]# vi pool_hba.conf

host    all         all        192.168.3.0/24        trust


[root@nagios ~]# /usr/local/bin/pg_md5-p

password:e8a48653851e28c69d0506508fb27fc5

[root@nagios ~]# cp/usr/local/etc/pcp.conf.sample /usr/local/etc/pcp.conf

[root@nagios ~]# vi/usr/local/etc/pcp.conf


postgres:e8a48653851e28c69d0506508fb27fc5


[root@nagios ~]# pgpool -f/usr/local/etc/pgpool.conf -a /usr/local/etc/pool_hba.conf -F/usr/local/etc/pcp.conf


你可能感兴趣的:(记录)