omv设置
修改debian源
sed -i 's/httpredir.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list
sed -i 's#http://deb.debian.org#https://mirrors.ustc.edu.cn#g' /etc/apt/sources.list.d/openmediavault-os-security.list
sed -i 's#http://deb.debian.org#https://mirrors.ustc.edu.cn#g' /etc/apt/sources.list.d/openmediavault-kernel-backports.list
sed -i 's#http://security.debian.org/debian-security#https://mirrors.ustc.edu.cn/debian-security#g' /etc/apt/sources.list
修改omv源
omv软件源
sed -i 's#https://packages.openmediavault.org#https://mirrors.bfsu.edu.cn/OpenMediaVault#g' /etc/apt/sources.list.d/openmediavault.list
sed -i 's#http://packages.openmediavault.org#https://mirrors.bfsu.edu.cn/OpenMediaVault#g' /etc/apt/sources.list.d/openmediavault.list
os-security软件源
sed -i 's#http://security.debian.org#https://mirrors.bfsu.edu.cn#g' /etc/apt/sources.list.d/openmediavault-os-security.list
kernel-backports软件源
sed -i 's#http://httpredir.debian.org#https://mirrors.bfsu.edu.cn#g' /etc/apt/sources.list.d/openmediavault-kernel-backports.list
修改docker源
sed -i 's#download.docker.com#mirrors.tuna.tsinghua.edu.cn/docker-ce#g' /etc/apt/sources.list.d/docker.list
安装必要的软件
apt install htop screenfetch curl
安装omv-extras
wget -O - https://github.com/OpenMediaVault-Plugin-Developers/packages/raw/master/install | bash
换源安装
wget https://mirror.ghproxy.com/github.com/OpenMediaVault-Plugin-Developers/packages/raw/master/install
sed -i 's#https://github.com#https://mirror.ghproxy.com/https://github.com#g' install
bash install
rm install
修改omv-extras源
sed -i 's#openmediavault-plugin-developers.github.io/packages/debian#mirrors.bfsu.edu.cn/OpenMediaVault/openmediavault-plugin-developers#g' /etc/apt/sources.list.d/omvextras.list
软件源参考
已安装omv-extra并开启backports的源
sources.list
deb http://mirrors.bfsu.edu.cn/debian/ bullseye main
deb-src http://mirrors.bfsu.edu.cn/debian/ bullseye main
deb http://mirrors.bfsu.edu.cn/debian/ bullseye-updates main contrib non-free
deb-src http://mirrors.bfsu.edu.cn/debian/ bullseye-updates main contrib non-free
openmediavault.list
deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] http://packages.openmediavault.org/public/ shaitan main
deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] https://openmediavault.github.io/packages/ shaitan main
# deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] http://downloads.sourceforge.net/project/openmediavault/packages/ shaitan main
openmediavault-kernel-backports.list
deb [signed-by=/usr/share/keyrings/debian-archive-bullseye-automatic.gpg] http://httpredir.debian.org/debian bullseye-backports main contrib non-free
创建Gotify通知方式
安装curl
apt install curl
在目录/usr/share/openmediavault/notification/sink.d
下
98gotify
cat << EOF > /usr/share/openmediavault/notification/sink.d/98gotify
#!/bin/sh
nachricht=$(cat $OMV_NOTIFICATION_MESSAGE_FILE)
curl "http://localhost:4080/message?token=A7qMnMQSph8UxK6" -F "message=$nachricht" -F "title=$OMV_NOTIFICATION_SUBJECT"
EOF
chmod +x /usr/share/openmediavault/notification/sink.d/98gotify
连接到lxc容器
完整格式
virsh --connect lxc:///system console <container_name>
简写格式
virsh -c lxc:/// console <container_name>