约 4 分钟阅读
其他

PVE 安装 (基于最新PVE8)及相关基础配置(换 Debian 源和 PVE 企业源)

本文介绍 PVE 8 的安装及 Debian 源的更换和 PVE 源的更换

PVE 安装 (基于最新PVE8)及相关基础配置(换 Debian 源和 PVE 企业源)
SYSTEM更新于 Jun 26, 2024
15524 次阅读约 4 分钟阅读
专栏系列PVE & OpenWRT
本文目录大纲

什么是 PVE ?

Proxmox VE 是一款开源免费的服务器虚拟化环境,你可以将它想象成一个专门用于跑虚拟机的宿主系统 (虚拟机管理平台),它同时支持两种虚拟化技术:KVM 虚拟机和 LXC 容器。你能在 VPS 服务器或普通 PC 电脑上安装它,就能随意创建多个虚拟机,同时运行各种各样操作系统。

通过 PVE,你可以很方便地在一台主机上运行多种不同用途的系统,或安装各类应用容器,从而打造出一台适合你自用的“万能用途”的超级 All in One 多合一主机。比如安装:OpenWRT 旁路由 + 黑群晖 DSM + 离线下载 + NGINX + 私有网盘 + HTPC 影音播放平台 + 远程打印 + Windows + Linux 系统等等,大家可以发挥想象力让其满足你的各种需求。

最近 PVE 发布了 8 版本。PVE 8 基于最新的 Debian12(代码代号为 Bookworm)开发而来,使用了较新的 Linux 6.2 内核,虚拟环境中的主要开源组件也都更新到了新版本,如 QEMU 8.0.2、LXC 5.0.2、ZFS 2.1.12 和 Ceph Quincy 17.2.6 等等,可以享受到更多新的技术特性。

如何安装

  1. 准备一个 U 盘(大小2G以上)

  2. 下载 PVE 8 proxmox-ve_8.2-1.iso

  3. 使用 Rufus 或 Ventoy 等工具,将 ISO 制作成可启动的 U 盘

    Rufus 下载 | Ventory 下载

    Rufus 制作启动盘:

    Ventoy 制作启动盘:

    1. 下载解压后,运行里面的Ventoy2Disk.exe 写入准备的 U 盘

    2. 把下载的镜像 proxmox-ve_8.2-1.iso 拷贝进 U 盘

  4. 插入 U 盘引导启动,选择 Install Proxmox VE,根据界面提示一步一步安装(注意设置网卡和网络信息)

    注意选择网卡和配置网络,网络地址即为之后的管理地址

安装完成后,用网线把刚刚配置的网口和电脑连接,并修改电脑的 IP 与 PVE 的网段一致,通过 http://xxx.xxx.xxx.xxx:8006 就可以访问管理界面。

换源

由于国内访问国外的源会出现问题或者速度太慢,所以把 Debian 源换到国内的镜像源,同时更换 PVE 源解决订阅的问题。

更换 Debian 源

国内的镜像很多:

我能以第一个为例:

  1. 备份

    SH
    mv /etc/apt/sources.list /etc/apt/sources.list.bak
  2. 更换新源

    SH
    # 编辑 sources.list
    nano /etc/apt/sources.list
    
    # 改为如下内容
    deb https://mirrors.ustc.edu.cn/debian/ bookworm main non-free non-free-firmware contrib
    deb-src https://mirrors.ustc.edu.cn/debian/ bookworm main non-free non-free-firmware contrib
    deb https://mirrors.ustc.edu.cn/debian-security/ bookworm-security main
    deb-src https://mirrors.ustc.edu.cn/debian-security/ bookworm-security main
    deb https://mirrors.ustc.edu.cn/debian/ bookworm-updates main non-free non-free-firmware contrib
    deb-src https://mirrors.ustc.edu.cn/debian/ bookworm-updates main non-free non-free-firmware contrib
    deb https://mirrors.ustc.edu.cn/debian/ bookworm-backports main non-free non-free-firmware contrib
    deb-src https://mirrors.ustc.edu.cn/debian/ bookworm-backports main non-free non-free-firmware contrib

更换 PVE 源

SH
# 编辑文件 pve-no-subscription.list
nano /etc/apt/sources.list.d/pve-subscription.list
# 添加如下内容
deb https://mirrors.ustc.edu.cn/proxmox/debian bookworm pve-no-subscription
# 注释下面内容
#deb https://enterprise.proxmox.com/debian/pve bookworm pve-enterprise

# 编辑 PVE ceph 源
nano /etc/apt/sources.list.d/ceph.list
# 改成如下内容
deb https://mirrors.ustc.edu.cn/proxmox/debian/ceph-quincy bookworm no-subscription
#deb https://enterprise.proxmox.com/debian/ceph-quincy bookworm enterprise

最后执行更新:

SH
apt update

更新 LXC(CT Template)源

SH
# 备份
cp /usr/share/perl5/PVE/APLInfo.pm /usr/share/perl5/PVE/APLInfo.pm_back
# 更换为新源
sed -i 's|http://download.proxmox.com|https://mirrors.ustc.edu.cn/proxmox|g' /usr/share/perl5/PVE/APLInfo.pm
# 重启服务
systemctl restart pvedaemon.service

更新 PVE 到最新发行版本

SH
# 首先执行更新,如果没有报错,那就可以进行继续更新
apt update

# 更新发行包
apt dist-upgrade

# 更新完就升级到了最新版本,按道理是不需要重启的

评论交流

暂无评论,欢迎分享您的见解