pgbouncer 是一個輕量級的postgresql 數據庫鏈接池,也能夠用來作greenplum 數據庫的前端鏈接池。前端
今天試了一下下載源碼進行編譯安裝,過程記錄一下:python
1. pgbouncer 依賴的組件:git
- GNU Make 3.81+
- libevent 2.0
- (optional) OpenSSL 1.0.1 for TLS support.
- (optional) c-ares as alternative to libevent’s evdns.
2.經過yum 安裝相關組件:github
yum install opensslsql
yum install openssl-devel數據庫
yum install libevent-develpost
yum install python-docutilsspa
yum install libtoolpostgresql
yum install automakecode
yum install autoconf
3. 經過git 下載源碼及編譯安裝
$ git clone https://github.com/pgbouncer/pgbouncer.git $ cd pgbouncer $ git submodule init $ git submodule update $ ./autogen.sh $ ./configure --prefix=/usr/local/pgbouncer $ make $ make install
必定要安裝這些依賴的組件,不然編譯會出錯。