How To Install PGBOUNCER on Centos 6

11:12 PM 0 Comments

Check your version of centos
# cat /etc/redhat-release

and then download from this link https://yum.postgresql.org/repopackages.php#pg96 if latest version is Postgresql96

Choose your operating system and then download repository:
# wget https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-6-x86_64/pgdg-centos96-9.6-3.noarch.rpm
# rpm -ivh pgdg-centos96-9.6-3.noarch.rpm
# yum update -y
# yum install pgbouncer

Edit pgbouncer.ini, this is example
[databases]
jaringankantorcom_penerimaan = dbname=db_penerimaan host=localhost port=5432 user=xxx_user password=xxx_password

[pgbouncer]
logfile = /home/pgbouncer/pgbouncer.log
pidfile = /home/pgbouncer/pgbouncer.pid
listen_addr = *
listen_port = 6432
auth_type = md5
auth_file = /home/pgbouncer/userlist.txt
admin_users = postgres
stats_users = stats, postgres
pool_mode = transaction

Create your username and password at /home/pgbouncer/userlist.txt

Edit service pgbouncher /etc/init.d/pgbouncer tobe:
pidfile=/home/pgbouncer/pgbouncer.pid

Restart and activate pgbouncer
# service pgbouncer restart
# chkconfig pgbouncer on

For checking yout pgbouncer on, type this command:
# su pgbouncer
pgbouncer $ psql -p 6432 -h localhost -U postgres jaringankantorcom_penerimaan

pgbouncer $ psql -p 6432 -h localhost -U postgres pgbouncer

Install Server Networking Programming

Support you how to install server, networking and Programming Easy

0 comments:

You can post comment with english language or indonesia language.
Anda bisa memberikan komentar dalam bahasa inggris atau bahasa indonesia.