在ubuntu上安装最新的postgresql9.6

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

Ubuntu Yakkety (16.10)

 

sudo add-apt-repository "deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main"
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql-9.6

Ubuntu Xenial (16.04)

sudo add-apt-repository "deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main"
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql-9.6

Ubuntu Trusty (14.04)

sudo add-apt-repository "deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main"
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql-9.6

 Ubuntu Precise (12.04)

 

sudo add-apt-repository "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main"
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql-9.6

 

 源码依赖包:

axel https://ftp.postgresql.org/pub/source/v9.6.1/postgresql-9.6.1.tar.gz
sudo apt-get install build-essential libreadline-dev zlib1g-dev flex bison libxml2-dev libxslt-dev libssl-dev

cd postgresql-9.6

./configure

make

make install

adduser pg

cd /usr/local/pgsql/bin

echo "$LC_CTYPE"

./initdb -D ../data

 

转载于:https://my.oschina.net/lvhongqing/blog/809192

你可能感兴趣的:(在ubuntu上安装最新的postgresql9.6)