20170902 初成文
20180607 更新omv4.x(debian 9 stretch),見文末
建議直接使用OMV樹莓派官方版鏡像停撞,Win32DiskImager寫進SD卡苇本,本文是介紹基于Debian8上安裝OMV
跑nas之前做過大量壓力測試,usb外接硬盤(ext4或btrfs期丰;用ntfs是很難滿速的全封,調(diào)用ntfs-3g還得占用cpu)讀寫百兆網(wǎng)卡可以達到滿速毕莱,可以跑docker贮折,bt/pt常用下載工具正常使用锹锰。藍光原盤碼率大都在50Mbps以下,百兆帶寬已經(jīng)綽綽有余享怀,實測局域網(wǎng)可以同時流暢播放兩個原盤蹂匹,也還算滿意。
目前穩(wěn)定版OpenMediaVault 3.X.X(erasmus)是基于Debian8的,所以只能安裝在基于Debian8的Jessie上忍啸,比如DietPi(Jessie)仰坦、Raspbian(2017-7-5及以前版本)。
一计雌、Jessie更換軟件源為國內(nèi)更快速的軟件源
sudo nano /etc/apt/sources.list
deb http://mirrors.ustc.edu.cn/raspbian/raspbian/ jessie main non-free contrib rpi
sudo nano /etc/apt/sources.list.d/raspi.list
deb https://mirrors.ustc.edu.cn/archive.raspberrypi.org/ jessie main ui
sudo apt update
二悄晃、添加OMV的軟件源
這步需要在root權限下,因為sudo只是讓 echo 命令具有了 root 權限,
但是沒有讓 “>” 命令也具有root 權限妈橄。
sudo su
echo "deb http://packages.openmediavault.org/public erasmus main" > /etc/apt/sources.list.d/openmediavault.list
exit
更新:目前已發(fā)布測試版OMV4.X庶近,基于Debian9(可在Raspbian Stretch上安裝),此步將erasmus改為arrakis眷蚓,其余不變鼻种,即:
sudo su
echo "deb http://packages.openmediavault.org/public arrakis main" > /etc/apt/sources.list.d/openmediavault.lis
三、設置環(huán)境變量并更新軟件包索引
export LANG=C
export DEBIAN_FRONTEND=noninteractive
export APT_LISTCHANGES_FRONTEND=none
四沙热、開始安裝:
sudo apt install dirmngr
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 7E7A6C592EF35D13 24863F0C716B980B
sudo apt update
sudo apt --allow-unauthenticated install openmediavault-keyring
sudo apt --yes --force-yes --auto-remove --show-upgraded --no-install-recommends --option Dpkg::Options::="--force-confdef" --option DPkg::Options::="--force-confold" install postfix openmediavault
注意點:
1叉钥、出現(xiàn) Postfix Configuration選擇的時候,選擇No configuration
2篙贸、出現(xiàn)Configuring mdadm的時候投队,鍵入none.
3、Do you want to start MD arrays automatically?選擇 YES
4爵川、When the 'ProFTPD configuration' dialogue is displayed choose 選擇 standalone
五敷鸦、安裝完成后初始化系統(tǒng)和數(shù)據(jù)庫,重啟前注意配置好ssh
sudo apt install resolvconf
sudo omv-initsystem ? ? ? ? ? ? ? ? ? ? ? //初始化
sudo nano /etc/ssh/sshd_config? ? ? //AllowGroups添加ssh遠程用戶
sudo /etc/init.d/ssh restart
sudo reboot now
六寝贡、OMV3.X安裝OMV 3.X最新版插件包
wget http://omv-extras.org/openmediavault-omvextrasorg_latest_all3.deb
sudo dpkg -i openmediavault-omvextrasorg_latest_all3.deb
直接在瀏覽器輸入樹莓派ip地址扒披,初始賬戶為admin密碼為openmediavault
七、其他
更新OMV版本為最新:
sudo omv-update
OMV修復工具(IP配置重設兔甘、WEBGUI端口重置谎碍、密碼修改、重置登錄失敗次數(shù)鎖定洞焙、配置備份恢復蟆淀、更新apt緩存):
sudo omv-firstaid
在Debian9(Stretch)上安裝OMV4.X,
在用戶目錄下澡匪,執(zhí)行sudo nano omv4setup.sh , 復制粘貼下列信息后熔任,Ctrl-X 退出并保存
#!/bin/sh
cat <<EOF >> /etc/apt/sources.list.d/openmediavault.list
deb http://packages.openmediavault.org/public arrakis main
# deb http://downloads.sourceforge.net/project/openmediavault/packages arrakis main
## Uncomment the following line to add software from the proposed repository.
# deb http://packages.openmediavault.org/public arrakis-proposed main
# deb http://downloads.sourceforge.net/project/openmediavault/packages arrakis-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 arrakis partner
# deb http://downloads.sourceforge.net/project/openmediavault/packages arrakis partner
EOF
export LANG=C
export DEBIAN_FRONTEND=noninteractive
export APT_LISTCHANGES_FRONTEND=none
apt-get update
apt-get --allow-unauthenticated install openmediavault-keyring
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 postfix openmediavault
# Initialize the system and database.
omv-initsystem
sudo apt install resolvconf
wget http://omv-extras.org/openmediavault-omvextrasorg_latest_all4.deb
dpkg -i openmediavault-omvextrasorg_latest_all4.deb
apt update
終端繼續(xù)執(zhí)行:
chmod +x?omv4setup.sh
sudo bash omv4setup.sh
可能會出現(xiàn)錯誤提示:
Exception ignored in:.remove at 0x76125420>Traceback (most recent call last): File "/usr/lib/python3.5/weakref.py", line 117, in removeTypeError: 'NoneType' object is not callableException ignored in:.remove at 0x76125420>
Traceback (most recent call last):
? File "/usr/lib/python3.5/weakref.py", line 117, in remove
TypeError: 'NoneType' object is not callable
解決辦法:
sudo nano /usr/lib/python3.5/weakref.py
def remove(wr, selfref=ref(self)):
修改為
def remove(wr, selfref=ref(self), _atomic_removal=_remove_dead_weakref):
_remove_dead_weakref(d, wr.key)
修改為
_atomic_removal(d, wr.key)