645 字
3 分钟
Proxmox VE 安装记录

最近闲置下来一个小主机,就正好拿来做内网服务器吧。
Proxmox VE(英语:Proxmox Virtual Environment,通常简称为 PVE、Proxmox),是一个开源的服务器虚拟化环境Linux发行版。Proxmox VE 基于 Debian,使用基于 Ubuntu 的定制内核,包含安装程序、网页控制台和命令行工具,并且向第三方工具提供了 REST API,在 Affero 通用公共许可证第三版下发行。Proxmox VE 支持两类虚拟化技术:基于容器的 LXC(自4.0版开始,3.4版及以前使用 OpenVZ 技术)和硬件抽象层全虚拟化的KVM。
准备工作
- U 盘一个 https://www.ventoy.net/cn/download.html
- Proxmox Ve 7.4-1.iso https://www.proxmox.com/en/downloads
- HP Prodesk 800 G2 小主机一个
开始安装
引导至 U 盘镜像并选择 pve 安装镜像启动:
选择安装磁盘:
设置国家/地区&时区:
设置密码&邮箱:
选择网卡&设置主机名& ip 地址&网关& DNS 服务器:
最后安装完成:
访问 https://ip:8006 就可以进入 pve 的管理后台了。
ssh 默认用户是root
密码是刚刚安装时设置的密码。
优化
修改镜像源为中科大镜像源(基础系统 Debian 源文件) /etc/apt/sources.list
:
sed -i 's|^deb http://ftp.debian.org|deb https://mirrors.ustc.edu.cn|g' /etc/apt/sources.listsed -i 's|^deb http://security.debian.org|deb https://mirrors.ustc.edu.cn/debian-security|g' /etc/apt/sources.list
修改 Proxmox
的源文件
source /etc/os-releaseecho "deb https://mirrors.ustc.edu.cn/proxmox/debian/pve $VERSION_CODENAME pve-no-subscription" > /etc/apt/sources.list.d/pve-no-subscription.list
然后输入:
apt updateapt upgrade -y
安装 pvetools
cd ~git clone https://github.com/ivanhao/pvetools.gitcd pvetools/./pvetools.sh
内核
安装官方内核:
#查看已安装内核dpkg --get-selections |grep kernel
# 查询线上最新内核apt search pve-kernel|grep pve-kernel-
# 安装内核apt install pve-kernel-6.2.11-1-pveapt install pve-headers-6.2.11-1-pve
#查看当前内核uname -a
#查看当前系统内核启动顺序grep menuentry /boot/grub/grub.cfg
#修改内核启动顺序proxmox-boot-tool kernel pin 6.2.11-1-pve
#更新引导并重启update-grubreboot
#查看已安装`pve`内核dpkg -l |grep pve-kernel-
#卸载dpkg --remove pve-kernel-xxxx-1-pve
#清理dpkg --purge pve-kernel-xxxx-1-pve
第三方内核(Proxmox Edge kernels),具体情况到项目主页查看 https://github.com/fabianishere/pve-edge-kernel:
#First, set up our Debian repository on your Proxmox installation:
#Add the repository's GPG key:curl -1sLf 'https://dl.cloudsmith.io/public/pve-edge/kernel/gpg.8EC01CCF309B98E7.key' | gpg --dearmor -o /usr/share/keyrings/pve-edge-kernel.gpg
#Set up the pve-edge-kernel repository:echo "deb [signed-by=/usr/share/keyrings/pve-edge-kernel.gpg] https://dl.cloudsmith.io/public/pve-edge/kernel/deb/debian bullseye main" > /etc/apt/sources.list.d/pve-edge-kernel.list
#Install a kernel package:apt updateapt install pve-kernel-6.0-edge
本地编译最新官方内核:
#安装依赖
apt install asciidoc-base automake bc bison cpio debhelper dh-python file flex gcc git kmod libdw-dev libelf-dev libiberty-dev libnuma-dev libpve-common-perl libslang2-dev libssl-dev libtool lintian lz4 perl-modules python-minimal rsync sed sphinx-common tar xmlto zlib1g-dev
#克隆 pve-kernel 源码
git clone https://git.proxmox.com/git/pve-kernel.git
#初始化子项目
make submodule
#编译&安装
make
dpkg -i *.deb
至此,所有工作完成,后面遇到问题再记录上来。
参考资料
Proxmox VE 安装记录
https://encorexin.online/posts/pve-installation-log/
评论
评论系统加载失败
无法连接到评论服务,请检查网络连接或稍后再试。