Open Media Vault 是一款基于 Debian 的 NAS 操作系统,本站提供 OpenMediaVault 的镜像,以加快国内访问速度。
以下方法自 5.6.3-1 开始可用(2021-04-07)
登录到已经部署的 Open Media Vault 使用如下命令可以替换 Open Media Vault 镜像源。
omv-env set OMV_APT_REPOSITORY_URL "https://mirrors.wars.cat/OpenMediaVault/public"
omv-env set OMV_APT_ALT_REPOSITORY_URL "https://mirrors.wars.cat/OpenMediaVault/packages"
omv-env set OMV_APT_KERNEL_BACKPORTS_REPOSITORY_URL "https://mirrors.wars.cat/debian"
omv-env set OMV_APT_SECURITY_REPOSITORY_URL "https://mirrors.wars.cat/debian-security"
# 如果你有安装 omv-extras 则需要运行如下命令更改源
omv-env set OMV_EXTRAS_APT_REPOSITORY_URL "https://mirrors.wars.cat/OpenMediaVault/openmediavault-plugin-developers"
omv-env set OMV_DOCKER_APT_REPOSITORY_URL "https://mirrors.wars.cat/docker-ce/linux/debian"
omv-env set OMV_PROXMOX_APT_REPOSITORY_URL "https://mirrors.wars.cat/proxmox/debian"
# 使得环境变量更改生效
omv-salt stage run all
/etc/apt/source.list
中配置 backports 源会造成冲突。对于首次部署操作步骤以 https://openmediavault.readthedocs.io/en/latest/installation/on_debian.html 为准
我们仅对 Add the package repositories 段落做出如下调整
cat <<EOF > /etc/apt/sources.list.d/openmediavault.list
deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] https://mirrors.wars.cat/OpenMediaVault/public sandworm main
deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] https://mirrors.wars.cat/OpenMediaVault/packages sandworm main
## Uncomment the following line to add software from the proposed repository.
# deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] https://mirrors.wars.cat/OpenMediaVault/public sandworm-proposed main
# deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] https://mirrors.wars.cat/OpenMediaVault/packages sandworm-proposed main
## This software is not part of OpenMediaVault, but is offered by third-party
## developers as a service to OpenMediaVault users.
# deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] https://mirrors.wars.cat/OpenMediaVault/public sandworm partner
# deb [signed-by=/usr/share/keyrings/openmediavault-archive-keyring.gpg] https://mirrors.wars.cat/OpenMediaVault/packages sandworm partner
EOF
其中 sandworm
为 Open Media Vault 的 codename(本样例代码为 7.x 的 codename)