树莓派NAS——OMV安装篇(一)
20170902 初成文
20180607 更新omv4.x(debian 9 stretch),见文末
建议直接使用OMV树莓派官方版镜像,Win32DiskImager写进SD卡,本文是介绍基于Debian8上安装OMV
跑nas之前做过大量压力测试,usb外接硬盘(ext4或btrfs;用ntfs是很难满速的,调用ntfs-3g还得占用cpu)读写百兆网卡可以达到满速,可以跑docker,bt/pt常用下载工具正常使用。蓝光原盘码率大都在50Mbps以下,百兆带宽已经绰绰有余,实测局域网可以同时流畅播放两个原盘,也还算满意。
文章图片
安装大部分应用后,可跑docker
目前稳定版OpenMediaVault 3.X.X(erasmus)是基于Debian8的,所以只能安装在基于Debian8的Jessie上,比如DietPi(Jessie)、Raspbian(2017-7-5及以前版本)。
一、Jessie更换软件源为国内更快速的软件源
sudo nano /etc/apt/sources.list二、添加OMV的软件源
【树莓派NAS——OMV安装篇(一)】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
这步需要在root权限下,因为sudo只是让 echo 命令具有了 root 权限,
但是没有让 “>” 命令也具有root 权限。
sudo su更新:目前已发布测试版OMV4.X,基于Debian9(可在Raspbian Stretch上安装),此步将erasmus改为arrakis,其余不变,即:
echo "deb http://packages.openmediavault.org/public erasmus main" > /etc/apt/sources.list.d/openmediavault.list
exit
sudo su三、设置环境变量并更新软件包索引
echo "deb http://packages.openmediavault.org/public arrakis main" > /etc/apt/sources.list.d/openmediavault.lis
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、出现 Postfix Configuration选择的时候,选择No configuration
2、出现Configuring mdadm的时候,键入none.
3、Do you want to start MD arrays automatically?选择 YES
4、When the 'ProFTPD configuration' dialogue is displayed choose 选择 standalone
五、安装完成后初始化系统和数据库,重启前注意配置好ssh
sudo apt install resolvconf六、OMV3.X安装OMV 3.X最新版插件包
sudo omv-initsystem//初始化
sudo nano /etc/ssh/sshd_config//AllowGroups添加ssh远程用户
sudo /etc/init.d/ssh restart
sudo reboot now
wget http://omv-extras.org/openmediavault-omvextrasorg_latest_all3.deb直接在浏览器输入树莓派ip地址,初始账户为admin密码为openmediavault
sudo dpkg -i openmediavault-omvextrasorg_latest_all3.deb
七、其他
更新OMV版本为最新:
sudo omv-updateOMV修复工具(IP配置重设、WEBGUI端口重置、密码修改、重置登录失败次数锁定、配置备份恢复、更新apt缓存):
sudo omv-firstaid
文章图片
omv-firstaid
在Debian9(Stretch)上安装OMV4.X,
在用户目录下,执行sudo nano omv4setup.sh , 复制粘贴下列信息后,Ctrl-X 退出并保存
#!/bin/sh终端继续执行:
cat <> /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
chmod +x omv4setup.sh
sudo bash omv4setup.sh
可能会出现错误提示:
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.pydef 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)
推荐阅读
- 做不了拼颜值的偶像派,那就拼勤奋
- 投稿|大厂派VS运营商派,云计算未来十年:四大局部战役
- javaee|JVM——运行时数据区、双亲委派模型、垃圾回收算法、垃圾收集器、Java内存模型
- NAS的系统应该怎么选择,Nas以后会往那个方向发展
- 树莓派|树莓派的常用系统配置
- 树莓派|树莓派镜像制作
- 够拼乐:多家快递下月上调派件费|够拼乐:多家快递下月上调派件费 你的快递会涨价吗()
- 野兽派花店调查
- 电子电路|基于树莓派4b的传感器数据可视化实现
- 叮当派“寻乐之旅”第二站(又一次实现了“音乐+绘画”的别样跨界)