Install PgBouncer PostgreSQL

Material

PgBouncer 1.7
PostgreSQL
Red Hat Enterprise Linux 6.6 Santiago

Deskripsi

PgBouncer for Connection Pooling on PostgreSQL

Langkah-langkah

  1. Cek paket-paket yang dibutuhkan
    GNU Make 3.81+ #biasanya sudah terinstall
    Libevent 2.0
    Setelah berhasil diinstall
    [root@localhost]$ export LD_LIBRARY_PATH = /usr/local/lib64:$LD_LIBRARY_PATH
    [root@localhost]$ ln -s /usr/local/lib/libevent..so.2 /usr/local/lib64
    C-ares
    Openssl #biasanya butuh juga openssl-devel
    
  2. [root@localhost]$ ./configure --prefix=/usr/local --with-libevent=libevent-prefix
  3. [root@localhost]$ make
  4. [root@localhost]$ make install
  5. Cek apakah hasil install berhasil
    [root@localhost]$ pgbouncer -V
    
  6. Buat Folder
    [root@localhost]$ mkdir -p /etc/pgbouncer
    
  7. Move pgbouncer.ini ke folder tersebut
    [root@localhost]$ mv pgbouncer.ini /etc/pgbuoncer
    
  8. Tambahkan file untuk menampung list user
    [root@localhost]$ touch userlist.txt
    
  9. Tambahkan user di file tersebut dan tambahkan pula di stats_user
  10. Debug PgBouncer
    [postgres@localhost]$ psql -p 6432 -U username -W pgbouncer
    [psql]$ SHOW HELP;
    

results matching ""

    No results matching ""