環境:debian 11 最小安裝,最後選擇安裝內容時只選 ssh server + 基本工具包即可,桌面環境可以不選。
手動安裝 Openmediavault 的金鑰:
apt-get install --yes gnupg
wget -O "/etc/apt/trusted.gpg.d/openmediavault-archive-keyring.asc" https://packages.openmediavault.org/public/archive.key
apt-key add "/etc/apt/trusted.gpg.d/openmediavault-archive-keyring.asc"
添加官方的程式庫
cat <<EOF >> /etc/apt/sources.list.d/openmediavault.list
deb http://packages.openmediavault.org/public shaitan main
# deb http://downloads.sourceforge.net/project/openmediavault/packages shaitan main
## Uncomment the following line to add software from the proposed repository.
# deb http://packages.openmediavault.org/public shaitan-proposed main
# deb http://downloads.sourceforge.net/project/openmediavault/packages shaitan-proposed main
## This software is not part of OpenMediaVault, but is offered by third-party
## developers as a service to OpenMediaVault users.
# deb http://packages.openmediavault.org/public shaitan partner
# deb http://downloads.sourceforge.net/project/openmediavault/packages shaitan partner
EOF
設定安裝語系與環境
export LANG=C.UTF-8
export DEBIAN_FRONTEND=noninteractive
export APT_LISTCHANGES_FRONTEND=none
更新程式庫清單並開始安裝 OMV 並跑一次更新
apt-get update
apt-get --yes --auto-remove --show-upgraded \
--allow-downgrades --allow-change-held-packages \
--no-install-recommends \
--option DPkg::Options::="--force-confdef" \
--option DPkg::Options::="--force-confold" \
install openmediavault-keyring openmediavault
#更新
omv-confdbadm populate
#顯示登入資訊
cat /etc/issue
按照顯示的登入資訊開啟瀏覽器連上,就可以開始使用 Openmediavault 管理儲存空間了。
如果要安裝 omv-extras 提供額外的附加程式與 docker 的話,可以順道一併安裝:
wget -O - https://github.com/OpenMediaVault-Plugin-Developers/packages/raw/master/install | bash
之後進 OMV 管理台安裝 docker 與附加程式即可。