|
本帖最后由 Alonewolf1 于 2025-5-4 15:11 编辑
安装PVE就是为了方便折腾系统挂了删掉再创建一个就行,不用麻烦再去刷OEC了,关于性能什么的管他做甚能用就行了
本教程为OEC安装PVE,镜像使用的是Flash_Armbian_25.05.0_rockchip_efused-wxy-oec_bookworm_6.1.99_server_2025.03.20.img
需要安装PVE先刷Flash_Armbian_25.05.0_rockchip_efused-wxy-oec_bookworm_6.1.99_server_2025.03.20.img这个镜像再继续
镜像下载地址:https://pan.baidu.com/s/1w_Rt0ckVd70kBqk8fX8pAg?pwd=qv2g
新增夸克网盘:https://pan.quark.cn/s/f10b717e2e8c
有个问题这个帖子步骤不全改了几次都被删了一部分命令,添加上去又被删了自行对照如果不全请直接到我网站查看即可:https://masuc.cn/46113.html
刷的时候要去掉 LoaderToDDR 勾选
单独只刷Flash_Armbian_25.05.0_rockchip_efused-wxy-oec_bookworm_6.1.99_server_2025.03.20.img 镜像可能会刷不进去
经测试先正常刷oec-jp.img 镜像 下载完成后 再选择Flash_Armbian_25.05.0_rockchip_efused-wxy-oec_bookworm_6.1.99_server_2025.03.20.img 就可以正常刷机了
1、编辑 /etc/hosts 文件
原本的host文件
127.0.0.1 localhost
127.0.1.1 armbian
::1 localhost armbian ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouter
更新内容如下,IP按你自己的对应修改,直接删除原来的把下面的改成你的IP复制进去也行:
- 127.0.0.1 localhost.localdomain localhost
- 192.168.0.178 armbian.pvetest.com armbian
- ::1 localhost ip6-localhost ip6-loopback
- fe00::0 ip6-localnet
- ff00::0 ip6-mcastprefix
- ff02::1 ip6-allnodes
- ff02::2 ip6-allrouters
复制代码 2、重新启动网络服务
- sudo systemctl restart networking
复制代码 3、验证配置
输出如下就可以了
root@armbian:~# hostname --ip-address
::1 192.168.0.178
4、安装并启用 ifupdown2
查询是否安装 ifupdown2
有输出就是安装了,没输出就是没安装进行安装
- sudo apt install ifupdown2
复制代码
5、配置固定静态IP
编辑/etc/network/interfaces 文件,创建vmbr0 桥接网络
- sudo nano /etc/network/interfaces
复制代码
复制下面内容填入,IP和网关改成你自己的
- auto lo
- iface lo inet loopback
- iface eth0 inet manual
- auto vmbr0
- iface vmbr0 inet static
- address 192.168.0.178/24
- gateway 192.168.0.1
- bridge-ports eth0
- bridge-stp off
- bridge-fd 0
- source /etc/network/interfaces.d/*
复制代码
6、 禁用 NetworkManager
查询是否使用 NetworkManager 有输出网卡就是使用了
停止 NetworkManager服务并禁用它
- sudo systemctl stop NetworkManager
- sudo systemctl disable NetworkManager
复制代码
卸载 NetworkManager
- sudo apt remove --purge network-manager
复制代码
7、停止并禁用 systemd-resolved 服务
查询是否启用 systemd-resolved
- systemctl status systemd-resolved
复制代码
如果启用就停止
- sudo systemctl stop systemd-resolved
- sudo systemctl disable systemd-resolved
复制代码
8、删除符号链接 /etc/resolv.conf
9、卸载 systemd-resolved
- sudo apt remove --purge systemd-resolved
复制代码
10、手动创建 /etc/resolv.conf
- sudo nano /etc/resolv.conf
复制代码
复制下面内容到里面
- nameserver 8.8.8.8
- nameserver 8.8.4.4
复制代码
11、重新加载所有配置
12、重新启动网络服务
保存并退出编辑器后,重新启动网络服务来应用新的静态 IP 配置
- sudo systemctl restart networking
复制代码
13、 检查网络配置
使用ip a 命令检查新的网络配置是否生效:
您应该能看到vmbr0 接口的 IP 地址为您设置的静态 IP(如 192.168.0.78)IP是上面配置的
14、 测试连接
配置好网络后最好重启一下
15、换源,更换系统源和添加PVE源
直接删除/etc/apt/sources.list.d/下的所有文件
- sudo rm -rf /etc/apt/sources.list.d/*
复制代码 使用nano编辑器打开/etc/apt/sources.list文件
- nano /etc/apt/sources.list
复制代码 把下面的源复制粘贴进去,粘贴后检查一下是否有误,有些编辑器复制进去会内容会断头的,就是第一行会被删几个字符自行检查好
- deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
- # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
- deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
- # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
- deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
- # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
- deb https://mirrors.apqa.cn/proxmox/debian/pve bookworm port
- # 这是PVE 源直接一起加就行了
复制代码 16、添加key
- curl https://mirrors.apqa.cn/proxmox/debian/pveport.gpg -o /etc/apt/trusted.gpg.d/pveport.gpg
复制代码 17、更新源和升级软件
- apt update && apt full-upgrade -y
复制代码 18、安装一些工具
- sudo apt install bridge-utils isc-dhcp-client -y
复制代码 19、开始安装PVE
- apt install proxmox-ve postfix open-iscsi chrony -y
复制代码 20、配置开机自启,这个应该默认就配置了不确定因为有几次安装始终没启动都是手动启动的弄上吧
- systemctl enable pvedaemon
- systemctl enable pve-cluster
复制代码 如果安装过程提示:Please select the mail server configuration type that best meets your needs. 则选择No configuration。
安装完毕即可通过主机当前ip加上端口访问,如https://你的IP:8006
用户名为root,密码为Debian系统的root密码
注意:重启OEC或者重新上电开机正常进系统后需要等30秒或者一分钟左右PVE才能启动完成,反正就行开机后等一会再访问才能打开
安装后访问不了先检查一下是不是没启动,如果启动了访问不了大概率是证书问题就操作下面部分的,重新生成证书
查询PVE状态
- systemctl status pvedaemon
- systemctl status pve-cluster
复制代码 如果未启动就启动服务
- systemctl start pvedaemon
- systemctl start pve-cluster
复制代码 启用 pvedaemon 和 pve-cluster 服务开机自启
- systemctl enable pvedaemon
- systemctl enable pve-cluster
复制代码 确认服务的自启状态
- systemctl is-enabled pvedaemon
- systemctl is-enabled pve-cluster
复制代码 证书的修复
手动删除并重新生成证书:
- sudo rm -f /etc/pve/local/pve-ssl.key /etc/pve/local/pve-ssl.pem
- sudo pveproxy restart
复制代码 确保文件权限
- sudo chmod 600 /etc/pve/local/pve-ssl.key
- sudo chmod 644 /etc/pve/local/pve-ssl.pem
复制代码 尝试重新生成证书:
- generating pve root certificate failed
复制代码 手动生成根证书
- sudo openssl genpkey -algorithm RSA -out /etc/pve/priv/pve-root-ca.key
- sudo openssl req -new -x509 -key /etc/pve/priv/pve-root-ca.key -out /etc/pve/pve-root-ca.pem -days 3650 -subj "/CN=Proxmox Virtual Environment/OU=Cluster/O=PVE"
复制代码 重启相关服务
- sudo systemctl restart pveproxy
- sudo systemctl restart pvedaemon
复制代码 然后再访问应该就可以了
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
×
|