Latest Version Postgresql+pgboucer installation

Source: Internet
Author: User
Tags postgresql



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


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.