To install PostgreSQL:
wget https://pgbouncer.github.io/downloads/files/1.7.2/pgbouncer-1.7.2.tar.gz
wget http://get.enterprisedb.com/postgresql/postgresql-9.5.1-1-linux-x64.run
wget https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz
tar zxvf libevent-2.0.22-stable.tar.gz
cd libevent-2.0.22-stable
./configure --prefix = / alidata / local / libevent
make
make install
cd ..
tar zxvf pgbouncer-1.7.2.tar.gz
cd pgbouncer-1.7.2
./configure --prefix = / alidata / local / pgbouncer / --with-libevent = / alidata / local / libevent /
make
make install
cd ..
chmod 777 postgresql-9.5.1-1-linux-x64.run
./postgresql-9.5.1-1-linux-x64.run
sudo chown -R postgres.postgres / alidata / pgsql
sudo chown -R postgres.postgres / alidata / local / pgbouncer
su-postgres
cp .bash_profile / alidata / pgsql
cp .bashrc / alidata / pgsql
su-postgres
export PGHOME = / alidata / pgsql
export PATH = $ PGHOME / bin: $ PATH
export PGDATA = $ PGHOME / data
export LD_LIBRARY_PATH = $ PGHOME / lib
export LD_LIBRARY_PATH = / usr / local / libevent / lib: $ LD_LIBRARY_PATH
[-z "` cat /alidata/pgsql/data/pg_hba.conf | grep ‘fs.file-max‘`"] && cat >> /alidata/pgsql/data/pg_hba.conf << EOF
host all all 192.170.206.0/24 md5
EOF
su postgres
./pg_ctl -D / alidata / pgsql / data / reload
#chkconfig --list postgresql-9.0
#chkconfig --list postgresql-9.0
#netstat -ano | grep 5432
#echo "SU_WHEEL_ONLY yes" >> /etc/login.defs
#more /opt/PostgreSQL/9.0/data/pg_log/startup.log
#rm -rf / alidata / pgsql
#rm -rf postgres-reg.ini
#Check service status:
service --status-all
service --status-all | grep ntpd
service --status-all | less
service httpd status
#List all service startup levels:
chkconfig --list
#List services and their corresponding ports:
netstat -tulpn
chkconfig --list
#View service command
#chkconfig --add postgresql
#vim /alidata/pgsql/9.5/data/postgresql.conf (listening changed to *)
#listen_addresses = ‘*’
# / usr / local / pgbouncer / bin / pgbouncer -d /usr/local/pgbouncer/conf/pgbouncer.ini
# / alidata / local / pgbouncer / bin / pgbouncer -d /alidata/local/pgbouncer/conf/pgbouncer.ini
Installing Pgbouncer
: http://pgfoundry.org/frs/download.php/2987/pgbouncer-1.4.1.tgz
Installation
TAR-ZXVF pgbouncer-1.7.2.tgz
CD pgbouncer-1.7.2
./configure--prefix=/usr/local/pg_bouncer
Make
Make install
Latest Version Postgresql+pgboucer installation