官方说明参考
(原文 PostgreSQL:Linux 下载 (Debian))
默认情况下,PostgreSQL 在所有 Debian 版本中都可用。但是, Debians 的稳定版本“快照”了特定版本的 PostgreSQL 然后在该 Debian 版本的整个生命周期内都受支持。 PostgreSQL 项目还维护了一个 apt 存储库,所有 可用的 PostgreSQL。
PostgreSQL Apt 存储库
如果您的 Debian 版本中包含的版本不是您想要的版本, 您可以使用 PostgreSQL Apt 存储库。此存储库将集成 配合您的正常系统和补丁管理,并提供自动 在 PostgreSQL 的整个支持生命周期内更新所有受支持的 PostgreSQL 版本。
PostgreSQL apt 存储库支持当前支持的稳定版 Debian 的版本:
- bookworm (12.x)
- bullseye (11.x)
- buster (10.x)
- sid (unstable)
支持的体系结构:
- amd64
- arm64
- i386 (buster and older)
- ppc64el
要使用 apt 存储库,请按照下列步骤操作:
# Create the file repository configuration:
sudo sh -c 'echo "deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
# Import the repository signing key:
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc |<