扩展仓库

如何在 EL/Debian/Ubuntu 及其兼容操作系统上,使用 Pigsty 提供的补充插件仓库?

YUM仓库

Pigsty 目前针对 EL 系统提供了补充插件仓库,在官方 PGDG YUM 仓库的基础上提供了 65 个额外的 RPM 插件。

Pigsty Yum 仓库只收录那些 不存在于 PGDG Yum 仓库的扩展,一旦某个扩展进入 PGDG YUM 仓库,Pigsty Yum 仓库将移除此扩展或与 PGDG 仓库保持一致。

对于 EL 7/8/9 及其兼容系统,使用以下命令依次添加 Pigsty 仓库的 GPG 公钥与上游仓库文件:

curl -fsSL https://repo.pigsty.io/key      | sudo tee /etc/pki/rpm-gpg/RPM-GPG-KEY-pigsty >/dev/null  # 添加公钥
curl -fsSL https://repo.pigsty.io/yum/repo | sudo tee /etc/yum.repos.d/pigsty.repo        >/dev/null  # 添加仓库

中国大陆地区的用户,可以使用国内 CDN 镜像 YUM 仓库:

curl -fsSL https://repo.pigsty.cc/key      | sudo tee /etc/pki/rpm-gpg/RPM-GPG-KEY-pigsty >/dev/null  # 添加公钥
curl -fsSL https://repo.pigsty.cc/yum/repo | sudo tee /etc/yum.repos.d/pigsty.repo        >/dev/null  # 添加仓库

所有的 RPM 包都使用指纹为 9592A7BC7A682E7333376E09E7935D8DB9BD8B20 (B9BD8B20) 的 GPG 密钥进行签名。

手工写入Repo文件
sudo tee /etc/yum.repos.d/pigsty-io.repo > /dev/null <<-'EOF'
[pigsty-infra]
name=Pigsty Infra for $basearch
baseurl=https://repo.pigsty.io/yum/infra/$basearch
skip_if_unavailable = 1
enabled = 1
priority = 1
gpgcheck = 1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-pigsty
module_hotfixes=1

[pigsty-pgsql]
name=Pigsty PGSQL For el$releasever.$basearch
baseurl=https://repo.pigsty.io/yum/pgsql/el$releasever.$basearch
skip_if_unavailable = 1
enabled = 1
priority = 1
gpgcheck = 1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-pigsty
module_hotfixes=1
EOF
sudo yum makecache;

APT仓库

Pigsty 目前针对 Debian / Ubuntu 系统提供了补充插件仓库,在官方 PGDG YUM 仓库的基础上提供了 77 个额外的 DEB 插件包。

Pigsty APT 仓库只收录那些 不存在于 PGDG ATP 仓库的扩展:一旦某个扩展进入 PGDG APT 仓库,Pigsty APT 仓库将移除此扩展或与 PGDG 仓库保持一致。

对于 Debian / Ubuntu 及其兼容系统,使用以下命令依次添加 Pigsty 仓库的 GPG 公钥与上游仓库文件:

# 将 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

中国大陆地区的用户,可以使用国内 CDN 镜像 APT 仓库:

# 将 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

所有的 DEB 包都使用指纹为 9592A7BC7A682E7333376E09E7935D8DB9BD8B20 (B9BD8B20) 的 GPG 密钥进行签名。


扩展安装

Pigsty 目前针对 EL 系统提供了补充插件仓库,在官方 PGDG YUM 仓库的基础上提供了 65 个额外的 RPM 插件。

Pigsty Yum 仓库只收录那些 不存在于 PGDG Yum 仓库的扩展,一旦某个扩展进入 PGDG YUM 仓库,Pigsty Yum 仓库将移除此扩展或与 PGDG 仓库保持一致。


Last modified 2024-08-13: update ext repo usage doc (fbf8d36)