APT仓库
如何在 Debian/Ubuntu 及其兼容操作系统上,使用 Pigsty 提供的 PostgreSQL 插件 APT 仓库?
Module:
对于 Debian/Ubuntu 及其兼容系统,使用以下命令依次添加 Pigsty 仓库的 GPG 公钥,写入仓库定义,并更新缓存:
# 将 pigsty 的 gpg 公钥添加到你的系统钥匙链中,从而验证软件包签名
curl -fsSL https://repo.pigsty.cc/key | sudo gpg --dearmor -o /etc/apt/keyrings/pigsty.gpg
# 获取 Debian 发行版代号,distro_codename=jammy, focal, bullseye, bookworm,并将对应上游仓库地址写入 APT List 文件
distro_codename=$(lsb_release -cs)
sudo tee /etc/apt/sources.list.d/pigsty-io.list > /dev/null <<EOF
deb [signed-by=/etc/apt/keyrings/pigsty.gpg] https://repo.pigsty.cc/apt/infra generic main
deb [signed-by=/etc/apt/keyrings/pigsty.gpg] https://repo.pigsty.cc/apt/pgsql/${distro_codename} ${distro_codename} main
EOF
# 刷新 APT 仓库缓存
sudo apt update
# 将 pigsty 的 gpg 公钥添加到你的系统钥匙链中,从而验证软件包签名
curl -fsSL https://repo.pigsty.io/key | sudo gpg --dearmor -o /etc/apt/keyrings/pigsty.gpg
# 获取 Debian 发行版代号,distro_codename=jammy, focal, bullseye, bookworm,并将对应上游仓库地址写入 APT List 文件
distro_codename=$(lsb_release -cs)
sudo tee /etc/apt/sources.list.d/pigsty-io.list > /dev/null <<EOF
deb [signed-by=/etc/apt/keyrings/pigsty.gpg] https://repo.pigsty.io/apt/infra generic main
deb [signed-by=/etc/apt/keyrings/pigsty.gpg] https://repo.pigsty.io/apt/pgsql ${distro_codename} main
EOF
# 刷新 APT 仓库缓存
sudo apt update
仓库内容
pigsty-pgsql
仓库包含以下内容:
pigsty-infra
仓库包含以下内容:
- 详情请参考 Infra Repo 。