本来期望直接安装PVE,奈何总装不成功,曲线救国,先装了一个Debian,然后再安装PVE。
Debian的安装看这个:https://ensky.tech/install-pve-failed/
Change Hosts File
对/etc/hosts
文件进行如下修改,添加如下内容
<ip> <hostname>.proxmox.com <hostname>
例如:192.168.3.10 ensky.proxmox.com ensky
ip可以是私有IP,也可以是公网IP。
指令内容:
127.0.0.1 localhost
192.168.3.10 ensky.proxmox.com ensky
修改完hosts文件后,设置服务器hostname为我们刚刚填加的hostname
hostnamectl set-hostname <hostname>
指令:
hostnamectl set-hostname ensky
检查:
配置好以后,使用命令hostname –ip-address测试一下,应该需要显示192.168.3.10,也就是显示配置好的IP才对。
hostname --ip-address
192.168.3.10 # should return your IP address here
Update Debian Source
确认源,安装Debian的时候,已经选择了一个国内源“清华大学”,所以不需要再配置了,注意把DVD这个屏蔽掉,已经没有DVD了。不屏蔽掉,会报错。
文件:/etc/apt/sources.list
# deb cdrom:[Debian GNU/Linux 11.3.0 _Bullseye_ - Official amd64 DVD Binary-1 20220326-11:23]/ bullseye contrib main
#deb cdrom:[Debian GNU/Linux 11.3.0 _Bullseye_ - Official amd64 DVD Binary-1 20220326-11:23]/ bullseye contrib main
deb http://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main
deb-src http://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main
deb http://security.debian.org/debian-security bullseye-security main contrib
deb-src http://security.debian.org/debian-security bullseye-security main contrib
# bullseye-updates, to get updates before a point release is made;
# see https://www.debian.org/doc/manuals/debian-reference/ch02.en.html#_updates_and_backports
deb http://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib
deb-src http://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib
这个配置很重要,如果配置错误,会导致软件安装有问题。
Install Proxmox VE
Add the Proxmox VE repository:
echo "deb [arch=amd64] http://download.proxmox.com/debian/pve bullseye pve-no-subscription" > /etc/apt/sources.list.d/pve-install-repo.list
Add the Proxmox VE repository key as root (or use sudo):
wget https://enterprise.proxmox.com/debian/proxmox-release-bullseye.gpg -O /etc/apt/trusted.gpg.d/proxmox-release-bullseye.gpg
Update your repository and system by running:
apt update && apt full-upgrade
Install Proxmox VE packages
apt install proxmox-ve postfix open-iscsi
执行这条指令以后,应该会进入一个正常安装流程,不应该报错。
Install Postfix
做没有用的情况下,Postfix选择Local就可以了
System Mail Name
随便写一个吧,目前用不到。或者默认的就行。
Delete os-prober
package
apt remove os-prober
然后重启电脑,访问https://IP:8006
进入PVE后台管理页面,其账号密码即为服务器ssh登录的账号密码。注意采用https
协议,否则进不去。
Resource Usage
安装成功以后,资源利用率如何?
在Debian桌面启用,连接PVE以后,资源利用率如下所示:
第二次重新安装后的资源利用率:
Error
错误01: unmet dependencies
没有解决
错误02:版本不对
没有解决掉
The following packages have unmet dependencies:
attr : Depends: libattr1 (= 1:2.4.48-4) but 1:2.4.48-6 is to be installed
libacl1-dev : Depends: libc6-dev but it is not going to be installed or
libc-dev
Depends: libacl1 (= 2.2.53-4) but 2.2.53-10 is to be installed
Depends: libattr1-dev (>= 1:2.4.46-8) but it is not going to be installed
libanyevent-perl : Depends: perlapi-5.28.1
Recommends: libasync-interrupt-perl but it is not going to be installed
Recommends: libev-perl but it is not going to be installed or
libevent-perl but it is not going to be installed
Recommends: libguard-perl but it is not going to be installed
libapt-pkg-perl : Depends: perlapi-5.28.0
libauthen-pam-perl : Depends: perlapi-5.28.0
libcommon-sense-perl : Depends: perlapi-5.28.1
Depends: perl (< 5.28.2~) but 5.32.1-4+deb11u2 is to be installed
libcrypt-openssl-random-perl : Depends: perlapi-5.28.0
libcrypt-openssl-rsa-perl : Depends: perlapi-5.28.0
Depends: libcrypt-openssl-bignum-perl but it is not going to be installed
libcrypt-ssleay-perl : Depends: perlapi-5.28.0
libfilesys-df-perl : Depends: perlapi-5.28.0
libgnutls-dane0 : Depends: libgnutls30 (= 3.6.7-4+deb10u7) but 3.7.1-5 is to be installed
libgnutlsxx28 : Depends: libgnutls30 (= 3.6.7-4+deb10u7) but 3.7.1-5 is to be installed
liblinux-inotify2-perl : Depends: perlapi-5.28.0
libnetaddr-ip-perl : Depends: perlapi-5.28.0
Recommends: libsocket6-perl but it is not going to be installed
libposix-strptime-perl : Depends: perlapi-5.28.0
libpve-access-control : Depends: libjson-xs-perl but it is not installable
librrds-perl : Depends: perlapi-5.28.1
libtemplate-perl : Depends: perlapi-5.28.0
libterm-readline-gnu-perl : Depends: perlapi-5.28.1
libuuid-perl : Depends: perlapi-5.28.1
libxml-libxml-perl : Depends: perlapi-5.28.1
libyaml-libyaml-perl : Depends: perlapi-5.28.1
proxmox-ve : Depends: pve-qemu-kvm but it is not installable
pve-cluster : Depends: corosync (>= 2.3.4-1) but it is not going to be installed
Depends: libqb100 (>= 2.0.1-1) but it is not installable
Depends: sqlite3 but it is not going to be installed
Depends: libcmap4 (>= 1.99.9) but it is not going to be installed
Depends: libcpg4 (>= 2.3.4-1) but it is not going to be installed
Depends: libquorum5 (>= 2.3.4-1) but it is not going to be installed
pve-firewall : Depends: ebtables but it is not installable
pve-manager : Depends: libproxmox-acme-plugins but it is not installable
python3-chardet : Breaks: python-chardet (< 3.0.4-6) but 3.0.4-3 is to be installed
python3-protobuf : Depends: python3 (< 3.8) but 3.9.2-3 is to be installed
python3-six : Breaks: libpython-stdlib (< 2.7.18) but 2.7.16-1 is to be installed
Breaks: python (< 2.7.18) but 2.7.16-1 is to be installed
Breaks: python-minimal (< 2.7.18) but 2.7.16-1 is to be installed
qemu-server : Depends: libjson-xs-perl but it is not installable
Depends: pve-qemu-kvm (>= 3.0.1-62) but it is not installable
spiceterm : Depends: pve-qemu-kvm but it is not installable
E: Unable to correct problems, you have held broken packages.
上述错误没有直接解决,可能是软件源配置不对,导致软件安装版本错误,找不到等。这个系统我安装了4次以上,最后通过开头写的教程安装后,不会再出现上述两个错误,可以一路畅通的安装好PVE。
Appendix
官方安装教程:https://pve.proxmox.com/wiki/Install_Proxmox_VE_on_Debian_11_Bullseye
Leave a Reply