虚拟化之Proxmox VE更换apt源并更新软件包数据库

编程入门 行业动态 更新时间:2024-10-22 11:12:33

虚拟化之Proxmox VE更换apt源并更新<a href=https://www.elefans.com/category/jswz/34/1760240.html style=软件包数据库"/>

虚拟化之Proxmox VE更换apt源并更新软件包数据库

一、需求说明

  Proxmox VE(Proxmox Virtual Environment)系统软件源所有基于 Debian 的操作系统都使用 APT 命令作为软件包管理工具。软件源列表定义在 /etc/apt/sources.list 文件中,以及/etc/apt/sources.d 目录下后缀名为.list 的文件中。在执行apt-get update的时候会会报错,为了提高下载响应速度,需要更换国内镜像源。

二、更换步骤

1、查看当前镜像源配置

root@s129:~# cat /etc/apt/sources.list
deb bullseye main contrib

deb bullseye-updates main contrib

# security updates
deb bullseye-security main contrib

2、查看当前pve版本

#当前proxmox版本为7.0.2
root@s129:~# pveversion -v
proxmox-ve: 7.0-2 (running kernel: 5.11.22-1-pve)
pve-manager: 7.0-8 (running version: 7.0-8/b1dbf562)
pve-kernel-5.11: 7.0-3
pve-kernel-helper: 7.0-3
pve-kernel-5.11.22-1-pve: 5.11.22-2
ceph-fuse: 15.2.13-pve1
corosync: 3.1.2-pve2
criu: 3.15-1+pve-1
glusterfs-client: 9.2-1
ifupdown2: 3.0.0-1+pve5
ksm-control-daemon: 1.4-1
libjs-extjs: 7.0.0-1
libknet1: 1.21-pve1
libproxmox-acme-perl: 1.1.1
libproxmox-backup-qemu0: 1.2.0-1
libpve-access-control: 7.0-4
libpve-apiclient-perl: 3.2-1
libpve-common-perl: 7.0-4
libpve-guest-common-perl: 4.0-2
libpve-http-server-perl: 4.0-2
libpve-storage-perl: 7.0-7
libspice-server1: 0.14.3-2.1
lvm2: 2.03.11-2.1
lxc-pve: 4.0.9-2
lxcfs: 4.0.8-pve1
novnc-pve: 1.2.0-3
proxmox-backup-client: 2.0.1-1
proxmox-backup-file-restore: 2.0.1-1
proxmox-mini-journalreader: 1.2-1
proxmox-widget-toolkit: 3.2-4
pve-cluster: 7.0-3
pve-container: 4.0-5
pve-docs: 7.0-5
pve-edk2-firmware: 3.20200531-1
pve-firewall: 4.2-2
pve-firmware: 3.2-4
pve-ha-manager: 3.3-1
pve-i18n: 2.4-1
pve-qemu-kvm: 6.0.0-2
pve-xtermjs: 4.12.0-1
qemu-server: 7.0-7
smartmontools: 7.2-1
spiceterm: 3.2-2
vncterm: 1.7-1
zfsutils-linux: 2.0.4-pve1

3、注释默认中科大apt源配置

注释默认配置,修改为阿里云镜像源
root@s129:/etc/apt# cat sources.list
#deb bullseye main contrib
#deb bullseye-updates main contrib
# security updates
#deb bullseye-security main contrib

deb bullseye main contrib
deb bullseye-updates main contrib
deb bullseye-security main contrib

4、注释proxmox企业版更新源

因为我们安装的是社区版,没有订阅企业版的服务,这个默认启用,所以会报错,使用时我们可以注释掉它。
root@s129:/etc/apt# cat sources.list.d/pve-enterprise.list
#deb bullseye pve-enterprise

5、运行 apt update 更新索引以生效

root@s129:/etc/apt# apt update
Get:1 bullseye InRelease [116 kB]
Get:2 bullseye-updates InRelease [39.4 kB]
Get:3 bullseye-security InRelease [44.1 kB]
Get:4 bullseye/main amd64 Packages [8,180 kB]
Get:5 bullseye/main Translation-en [6,241 kB]
Get:6 bullseye/contrib amd64 Packages [50.5 kB]
Get:7 bullseye/contrib Translation-en [46.9 kB]
Get:8 bullseye-updates/main amd64 Packages [2,592 B]
Get:9 bullseye-updates/main Translation-en [2,343 B]
Get:10 bullseye-security/main amd64 Packages [97.5 kB]
Get:11 bullseye-security/main Translation-en [60.5 kB]
Fetched 14.9 MB in 4s (4,073 kB/s)
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
91 packages can be upgraded. Run ‘apt list --upgradable’ to see them.

6、查看可以更新的包

root@s129:/etc/apt# apt list --upgradable
Listing… Done
base-files/stable 11.1+deb11u1 amd64 [upgradable from: 11.1]
base-passwd/stable 3.5.51 amd64 [upgradable from: 3.5.49]
bash/stable 5.1-2+b3 amd64 [upgradable from: 5.1-2+b2]
bind9-dnsutils/stable-security 1:9.16.22-1~deb11u1 amd64 [upgradable from: 1:9.16.15-1]
bind9-host/stable-security 1:9.16.22-1~deb11u1 amd64 [upgradable from: 1:9.16.15-1]
bind9-libs/stable-security 1:9.16.22-1~deb11u1 amd64 [upgradable from: 1:9.16.15-1]
bsdextrautils/stable 2.36.1-8 amd64 [upgradable from: 2.36.1-7]
bsdutils/stable 1:2.36.1-8 amd64 [upgradable from: 1:2.36.1-7]
busybox/stable 1:1.30.1-6+b3 amd64 [upgradable from: 1:1.30.1-6+b2]
cifs-utils/stable 2:6.11-3.1 amd64 [upgradable from: 2:6.11-3]
console-setup-linux/stable 1.205 all [upgradable from: 1.203]
console-setup/stable 1.205 all [upgradable from: 1.203]
curl/stable 7.74.0-1.3+b1 amd64 [upgradable from: 7.74.0-1.3]
debconf-i18n/stable 1.5.77 all [upgradable from: 1.5.75]
debconf/stable 1.5.77 all [upgradable from: 1.5.75]
distro-info-data/stable 0.51 all [upgradable from: 0.50]
eject/stable 2.36.1-8 amd64 [upgradable from: 2.36.1-7]
fdisk/stable 2.36.1-8 amd64 [upgradable from: 2.36.1-7]
grub-common/stable 2.04-20 amd64 [upgradable from: 2.04-19]
grub-efi-amd64-bin/stable 2.04-20 amd64 [upgradable from: 2.04-19]
grub-pc-bin/stable 2.04-20 amd64 [upgradable from: 2.04-19]
grub-pc/stable 2.04-20 amd64 [upgradable from: 2.04-19]
grub2-common/stable 2.04-20 amd64 [upgradable from: 2.04-19]
keyboard-configuration/stable 1.205 all [upgradable from: 1.203]
krb5-locales/stable 1.18.3-6+deb11u1 all [upgradable from: 1.18.3-5]
libblkid1/stable 2.36.1-8 amd64 [upgradable from: 2.36.1-7]
libc-bin/stable 2.31-13+deb11u2 amd64 [upgradable from: 2.31-12]
libc-l10n/stable 2.31-13+deb11u2 all [upgradable from: 2.31-12]
libc6/stable 2.31-13+deb11u2 amd64 [upgradable from: 2.31-12]
libcurl3-gnutls/stable 7.74.0-1.3+b1 amd64 [upgradable from: 7.74.0-1.3]
libcurl4/stable 7.74.0-1.3+b1 amd64 [upgradable from: 7.74.0-1.3]
libdebconfclient0/stable 0.260 amd64 [upgradable from: 0.259]
libdns-export1110/stable 1:9.11.19+dfsg-2.1 amd64 [upgradable from: 1:9.11.19+dfsg-2]
libfdisk1/stable 2.36.1-8 amd64 [upgradable from: 2.36.1-7]
libgssapi-krb5-2/stable 1.18.3-6+deb11u1 amd64 [upgradable from: 1.18.3-5]
libgstreamer1.0-0/stable 1.18.4-2.1 amd64 [upgradable from: 1.18.4-2]
libicu67/stable 67.1-7 amd64 [upgradable from: 67.1-6]
libisc-export1105/stable 1:9.11.19+dfsg-2.1 amd64 [upgradable from: 1:9.11.19+dfsg-2]
libk5crypto3/stable 1.18.3-6+deb11u1 amd64 [upgradable from: 1.18.3-5]
libkrb5-3/stable 1.18.3-6+deb11u1 amd64 [upgradable from: 1.18.3-5]
libkrb5support0/stable 1.18.3-6+deb11u1 amd64 [upgradable from: 1.18.3-5]
libldb2/stable-security 2:2.2.3-2~deb11u1 amd64 [upgradable from: 2:2.2.0-3.1]
libmount1/stable 2.36.1-8 amd64 [upgradable from: 2.36.1-7]
libnftables1/stable 0.9.8-3.1 amd64 [upgradable from: 0.9.8-3]
libnss-systemd/stable 247.3-6 amd64 [upgradable from: 247.3-5]
libnss3/stable-security 2:3.61-1+deb11u1 amd64 [upgradable from: 2:3.61-1]
libpam-modules-bin/stable 1.4.0-9+deb11u1 amd64 [upgradable from: 1.4.0-7]
libpam-modules/stable 1.4.0-9+deb11u1 amd64 [upgradable from: 1.4.0-7]
libpam-runtime/stable 1.4.0-9+deb11u1 all [upgradable from: 1.4.0-7]
libpam-systemd/stable 247.3-6 amd64 [upgradable from: 247.3-5]
libpam0g/stable 1.4.0-9+deb11u1 amd64 [upgradable from: 1.4.0-7]
libperl5.32/stable 5.32.1-4+deb11u2 amd64 [upgradable from: 5.32.1-4]
libsmartcols1/stable 2.36.1-8 amd64 [upgradable from: 2.36.1-7]
libsmbclient/stable-security 2:4.13.13+dfsg-1~deb11u2 amd64 [upgradable from: 2:4.13.5+dfsg-2]
libsndfile1/stable 1.0.31-2 amd64 [upgradable from: 1.0.31-1]
libssl1.1/stable,stable-security 1.1.1k-1+deb11u1 amd64 [upgradable from: 1.1.1k-1]
libsystemd0/stable 247.3-6 amd64 [upgradable from: 247.3-5]
libudev1/stable 247.3-6 amd64 [upgradable from: 247.3-5]
libuuid1/stable 2.36.1-8 amd64 [upgradable from: 2.36.1-7]
libuv1/stable 1.40.0-2 amd64 [upgradable from: 1.40.0-1]
libwbclient0/stable-security 2:4.13.13+dfsg-1~deb11u2 amd64 [upgradable from: 2:4.13.5+dfsg-2]
libx11-6/stable 2:1.7.2-1 amd64 [upgradable from: 2:1.7.1-1]
libx11-data/stable 2:1.7.2-1 all [upgradable from: 2:1.7.1-1]
locales/stable 2.31-13+deb11u2 all [upgradable from: 2.31-12]
mount/stable 2.36.1-8 amd64 [upgradable from: 2.36.1-7]
nftables/stable 0.9.8-3.1 amd64 [upgradable from: 0.9.8-3]
openssl/stable,stable-security 1.1.1k-1+deb11u1 amd64 [upgradable from: 1.1.1k-1]
perl-base/stable 5.32.1-4+deb11u2 amd64 [upgradable from: 5.32.1-4]
perl-modules-5.32/stable 5.32.1-4+deb11u2 all [upgradable from: 5.32.1-4]
perl/stable 5.32.1-4+deb11u2 amd64 [upgradable from: 5.32.1-4]
python-apt-common/stable 2.2.1 all [upgradable from: 2.2.0]
python3-apt/stable 2.2.1 amd64 [upgradable from: 2.2.0]
python3-debconf/stable 1.5.77 all [upgradable from: 1.5.75]
python3-ldb/stable-security 2:2.2.3-2~deb11u1 amd64 [upgradable from: 2:2.2.0-3.1]
python3-pkg-resources/stable 52.0.0-4 all [upgradable from: 52.0.0-3]
python3-reportbug/stable 7.10.3+deb11u1 all [upgradable from: 7.10.3]
python3-six/stable 1.16.0-2 all [upgradable from: 1.16.0-1]
python3-urllib3/stable 1.26.5-1~exp1 all [upgradable from: 1.26.4-1]
python3-yaml/stable 5.3.1-5 amd64 [upgradable from: 5.3.1-4]
reportbug/stable 7.10.3+deb11u1 all [upgradable from: 7.10.3]
rsync/stable 3.2.3-4+deb11u1 amd64 [upgradable from: 3.2.3-4]
samba-common/stable-security 2:4.13.13+dfsg-1~deb11u2 all [upgradable from: 2:4.13.5+dfsg-2]
samba-libs/stable-security 2:4.13.13+dfsg-1~deb11u2 amd64 [upgradable from: 2:4.13.5+dfsg-2]
smbclient/stable-security 2:4.13.13+dfsg-1~deb11u2 amd64 [upgradable from: 2:4.13.5+dfsg-2]
systemd-sysv/stable 247.3-6 amd64 [upgradable from: 247.3-5]
systemd/stable 247.3-6 amd64 [upgradable from: 247.3-5]
tasksel-data/stable 3.68 all [upgradable from: 3.67]
tasksel/stable 3.68 all [upgradable from: 3.67]
tzdata/stable-updates 2021a-1+deb11u2 all [upgradable from: 2021a-1]
udev/stable 247.3-6 amd64 [upgradable from: 247.3-5]
util-linux/stable 2.36.1-8 amd64 [upgradable from: 2.36.1-7]

7、执行软件包数据库更新

root@s129:/etc/apt# apt update && apt upgrade -y
apt update && apt upgrade -y
Hit:1 bullseye InRelease
Get:2 bullseye-updates InRelease [39.4 kB]
Hit:3 bullseye-security InRelease


8、也可以在页面更新

更多推荐

虚拟化之Proxmox VE更换apt源并更新软件包数据库

本文发布于:2024-03-08 05:47:22,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1719974.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:软件包   数据库   Proxmox   apt

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!