Debian apt-get 安装最新版 PostgreSQL
1、添加源:
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
2、导入KEY:
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
3、更新源:
sudo apt-get update
4、安装最新版PostgreSQL.
If you want a specific version, use 'postgresql-12' or similar instead of 'postgresql':
sudo apt-get -y install postgresql
Included in distribution
Debian includes PostgreSQL by default. To install PostgreSQL on Debian, use the (or other apt-driving) command: apt-get
apt-get install postgresql-12
The repository contains many different packages including third party addons. The most common and important packages are (substitute the version number as required):
postgresql-client-12 client libraries and client binaries
postgresql-12 core database server
libpq-dev libraries and headers for C language frontend development
postgresql-server-dev-12 libraries and headers for C language backend development