安装PVE8.0

下载镜像

PVE官网 https://www.proxmox.com/en/downloads
下载 Proxmox VE 8.0 ISO Installer 当前最新版本

制作启动盘

使用任意U盘启动制作工具,将下载的ISO文件写入U盘制作成启动盘
这里习惯使用UltraISO软碟通,先打开刚下载的ISO文件,然后启动-写入硬盘影映像
格式选raw(应该是默认)
注意:制作启动盘需要格式化U盘,所以U盘上的数据注意备份。
重启电脑,从U盘启动,开始安装 这里有个坑,刚做完启动盘重启进Bios进不去,黑屏卡死,关机再开机就好了。

安装系统

估计是英特尔独显的问题,怎么都进不去图形安装界面(Graphical),只能用命令行(Console)形式安装,好在也是命令行形式渲染的界面,装过debain的话应该不陌生,也挺傻瓜式的,流程也不长,不能截图就不贴图了,需要的话下次重装再详细记录。

修改软件源

默认的软件源是商业源,需要订阅,这里我们改成免费源

apt update
apt install vim
apt install apt-transport-https ca-certificates
cp -rp /etc/apt/sources.list /etc/apt/sources.list.bak
vim /etc/apt/sources.list

修改为如下内容

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
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.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware

# deb https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
# # deb-src https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
cp -rp /etc/apt/sources.list.d/pve-enterprise.list /etc/apt/sources.list.d/pve-enterprise.list.bak
vim /etc/apt/sources.list.d/pve-enterprise.list

修改为如下内容

deb https://mirrors.tuna.tsinghua.edu.cn/proxmox/debian/pve bookworm pve-no-subscription

修复更新时源报401错

cp -rp /etc/apt/sources.list.d/ceph.list /etc/apt/sources.list.d/ceph.list.bak
vim /etc/apt/sources.list.d/ceph.list

修改文件内容如下

deb http://download.proxmox.com/debian/ceph-quincy bookworm no-subscription
wget https://enterprise.proxmox.com/debian/proxmox-release-bookworm.gpg -O /etc/apt/trusted.gpg.d/proxmox-release-bookworm.gpg
apt update && apt dist-upgrade

创建常用账户

useradd -m -s /bin/bash sketcherly cd /home/sketcherly mkdir .ssh chmod 700 .ssh cd .ssh cp /root/.ssh/id_rsa* . touch authorized_keys cat /root/.ssd/authorized_keys » authorized_keys chown sketcherly:sketcherly .ssh

急救

有时候改完配置机器重启成功但是内网穿透重启失败了,不在家的时候机器就失联了,这个系统可以盲发指令,执行一些命令,急救一下。

mkdir /root/all_in_boom
vim /root/all_in_boom/crontab_exec.sh
#!/bin/bash

filename='/root/all_in_boom/version.txt'
local_cnt=0

if [ -f "${filename}" ];then
    local_cnt=$(cat ${filename})
fi

# echo ${local_cnt}

cnt=$(curl -s 'http://dashboard.sketcherly.xyz/all_in_boom/version.txt')
# echo $cnt


# 本地和远程比较版本号,不同的话执行
if [ ${local_cnt} != ${cnt} ]; then
    curl -s 'http://dashboard.sketcherly.xyz/all_in_boom/exec.sh' | bash

    echo ${cnt} > ${filename}
else
    echo "no"
fi
*/1 * * * * /root/all_in_boom/crontab_exec.sh