tagetage 发表于 2020-9-8 11:07

【树莓派4B测评】树莓派4安装NAS系统OpenMediaVault

<div class='showpostmsg'><p style="text-align:justify">&nbsp;</p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:16.0pt"><span style="font-family:宋体">1</span></span><span style="font-size:16.0pt"><span style="font-family:宋体">,OpenMediaVault介绍</span></span></span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif">OpenMediaVault<span style="font-family:宋体">,是一个开源的基于</span> Debian Linux <span style="font-family:宋体">的下一代网络附加存储</span>(NAS)<span style="font-family:宋体">解决方案。它包含众多服务,如</span> SSH<span style="font-family:宋体">、</span>(S)FTP<span style="font-family:宋体">、</span>SMB / CIFS<span style="font-family:宋体">、</span>DAAP <span style="font-family:宋体">媒体服务器、</span>RSync<span style="font-family:宋体">、</span>BitTorrent <span style="font-family:宋体">客户机等。并具有通过插件可增强的模块化设计框架特性。</span></span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif"><span style="font-family:宋体">官网地址:</span>https://www.openmediavault.org/</span></span></p>

<p style="text-align:justify">&nbsp;</p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:16.0pt"><span style="font-family:宋体">2</span></span><span style="font-size:16.0pt"><span style="font-family:宋体">,安装树莓派系统</span></span></span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif">OpenMediaVault<span style="font-family:宋体">简称</span>OMV,<span style="font-family:宋体">最新的版本是</span>OMV5<span style="font-family:宋体">,树莓派</span>4<span style="font-family:宋体">上安装</span>OMV5<span style="font-family:宋体">和前几代的树莓派有根本的不同,上一代的树莓派安装时候</span>OMV<span style="font-family:宋体">提供一个</span>ISO<span style="font-family:宋体">镜像文件,直接写入</span>TF<span style="font-family:宋体">卡就可以了。</span>OMV5<span style="font-family:宋体">的安装则需要在树莓派系统的基础上安装。也就是说你想要用</span>OMV5<span style="font-family:宋体">的系统,必须先安装树莓派的官方系统,安装树莓派系统我以前的帖子有具体说明,这里就不具体说明了。到这里假设你已经安装好了树莓派的系统了。</span></span></span></p>

<p style="text-align:justify">&nbsp;</p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:16.0pt"><span style="font-family:宋体">3</span></span><span style="font-size:16.0pt"><span style="font-family:宋体">,更换国内的源</span></span></span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif"><span style="font-family:宋体">安装</span>OMV5<span style="font-family:宋体">的时候需要更新软件源,树莓派官方的软件源速度非常慢,必须换成国内的软件源。下面是换为清华大学的源。</span></span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif"><span style="font-family:宋体">命令行输入命令</span></span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif">sudo nano /etc/apt/sources.list</span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif"><span style="font-family:宋体">将树莓派官方的源换为下列地址</span></span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif">deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ buster main contrib non-free rpi</span></span></p>

<p style="text-align:justify">&nbsp;</p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif"><span style="font-family:宋体">命令行输入命令</span></span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif">sudo nano /etc/apt/sources.list.d/raspi.list</span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif"><span style="font-family:宋体">将树莓派官方的源换为下列地址</span></span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif">deb http://mirrors.tuna.tsinghua.edu.cn/raspberrypi/ buster main ui</span></span></p>

<p style="text-align:justify">&nbsp;</p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:16.0pt"><span style="font-family:宋体">4</span></span><span style="font-size:16.0pt"><span style="font-family:宋体">,添加GitHub的hosts地址</span></span></span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif"><span style="font-family:宋体">先说明一下</span>hosts</span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif">hosts<span style="font-family:宋体">是一个没有扩展名的系统文件,可以用记事本等工具打开,其作用就是将一些常用的网址域名与其对应的</span>IP<span style="font-family:宋体">地址建立一个关联&ldquo;数据库&rdquo;,当用户在浏览器中输入一个需要登录的网址时,系统会首先自动从</span>Hosts<span style="font-family:宋体">文件中寻找对应的</span>IP<span style="font-family:宋体">地址,一旦找到,系统会立即打开对应网页,如果没有找到,则系统会再将网址提交</span>DNS<span style="font-family:宋体">域名解析服务器进行</span>IP<span style="font-family:宋体">地址的解析。</span></span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif"><span style="font-family:宋体">需要注意的是,</span>Hosts<span style="font-family:宋体">文件配置的映射是静态的,如果网络上的计算机更改了请及时更新</span>IP<span style="font-family:宋体">地址,否则将不能访问。</span></span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif">hosts<span style="font-family:宋体">文件在不同操作系统的位置是不一样的。</span></span></span></p>

<p style="text-align:justify">&nbsp;</p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif">OMV5<span style="font-family:宋体">的安装命令是放在</span>GitHub<span style="font-family:宋体">上的,而国内访问</span>GitHub<span style="font-family:宋体">非常慢,甚至不能访问,如果你不能科学上网,就只好通过更改</span>hosts<span style="font-family:宋体">的方法来访问</span>GitHub<span style="font-family:宋体">,这个方法不光是适合用再树莓派上,</span>PC<span style="font-family:宋体">上也是适合的。</span></span></span></p>

<p style="text-align:justify">&nbsp;</p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif"><span style="font-family:宋体">添加</span>hosts</span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif"><span style="font-family:宋体">命令行输入</span> sudo nano /etc/hosts</span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif"><span style="font-family:宋体">添加以下内容,如果你看我的文章距离我写的时间较久,请到以下的网址查询最新的</span>IP<span style="font-family:宋体">地址,自己修改。</span></span></span></p>

<p style="text-align:justify">&nbsp;</p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif"># GitHub Start</span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif">140.82.114.4 github.com</span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif">140.82.113.3 gist.github.com</span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif">185.199.108.153 assets-cdn.github.com</span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif">199.232.68.133 raw.githubusercontent.com</span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif">199.232.68.133 gist.githubusercontent.com</span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif">199.232.68.133 cloud.githubusercontent.com</span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif">199.232.68.133 camo.githubusercontent.com</span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif">199.232.68.133 avatars0.githubusercontent.com</span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif">199.232.68.133 avatars1.githubusercontent.com</span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif">199.232.68.133 avatars2.githubusercontent.com</span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif">199.232.68.133 avatars3.githubusercontent.com</span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif">199.232.68.133 avatars4.githubusercontent.com</span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif">199.232.68.133 avatars5.githubusercontent.com</span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif">199.232.68.133 avatars6.githubusercontent.com</span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif">199.232.68.133 avatars7.githubusercontent.com</span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif">199.232.68.133 avatars8.githubusercontent.com</span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif"># GitHub End</span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif"># <span style="font-family:宋体">查询最新域名的</span>IP<span style="font-family:宋体">地址请到</span> &quot;https://www.ipaddress.com/&quot;</span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif"># <span style="font-family:宋体">最后查询:</span>2020<span style="font-family:宋体">年</span>9<span style="font-family:宋体">月</span>4<span style="font-family:宋体">日</span></span></span></p>

<p style="text-align:justify">&nbsp;</p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:16.0pt"><span style="font-family:宋体">5</span></span><span style="font-size:16.0pt"><span style="font-family:宋体">,更新软件源和本地的包</span></span></span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif"><span style="font-family:宋体">命令行分别输入下列命令,等待几十分钟后会自动升级结束。</span></span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif">sudo apt-get update</span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif">sudo apt-get upgrade -y</span></span></p>

<p style="text-align:justify"></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:16.0pt"><span style="font-family:宋体">6</span></span><span style="font-size:16.0pt"><span style="font-family:宋体">,安装OMV5</span></span></span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif"><span style="font-family:宋体">命令行输入下列命令,然后等待几个小时就可以了,安装成功后会自动重启。</span></span></span></p>

<p align="left" style="text-align:left"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif">wget -O - https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/install | sudo bash</span></span></p>

<p style="text-align:justify"></p>

<p style="text-align:justify">&nbsp;</p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:16.0pt"><span style="font-family:宋体">7</span></span><span style="font-size:16.0pt"><span style="font-family:宋体">,安装OMV5后的树莓派桌面</span></span></span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif"><span style="font-family:宋体">安装完</span>OMV5<span style="font-family:宋体">后的树莓派可以看到桌面,但网络适配器显示不可使用,不用担心,是</span>OMV<span style="font-family:宋体">接管了网络适配器,并不是真的不能使用。</span></span></span></p>

<p style="text-align:justify"></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:16.0pt"><span style="font-family:宋体">8</span></span><span style="font-size:16.0pt"><span style="font-family:宋体">,扫描树莓派端口</span></span></span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif"><span style="font-family:宋体">安装完</span>OMV5<span style="font-family:宋体">后,</span>IP<span style="font-family:宋体">地址会改变,你可以到路由器下面去看</span>IP<span style="font-family:宋体">地址,但我习惯使用</span>ScanPort<span style="font-family:宋体">这个小软件扫描一下</span>22<span style="font-family:宋体">端口来找树莓派的地址。</span></span></span></p>

<p style="text-align:justify"></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:16.0pt"><span style="font-family:宋体">9</span></span><span style="font-size:16.0pt"><span style="font-family:宋体">,登录OMV5</span></span></span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif"><span style="font-family:宋体">在浏览器直接输入扫描到的</span>IP<span style="font-family:宋体">地址就可以看到</span>OMV<span style="font-family:宋体">的登录界面了。</span></span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif">OMV5<span style="font-family:宋体">的初始用户名:</span>admin <span style="font-family:宋体">密码:</span>openmediavault</span></span></p>

<p style="text-align:justify"></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:16.0pt"><span style="font-family:宋体">10</span></span><span style="font-size:16.0pt"><span style="font-family:宋体">,进入OMV管理界面</span></span></span></span></p>

<p style="text-align:justify"></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:16.0pt"><span style="font-family:宋体">11</span></span><span style="font-size:16.0pt"><span style="font-family:宋体">,修改自动登出时间和默认管理员密码</span></span></span></span></p>

<p style="text-align:justify"></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:16.0pt"><span style="font-family:宋体">12</span></span><span style="font-size:16.0pt"><span style="font-family:宋体">,更改时区正确显示时间</span></span></span></span></p>

<p style="text-align:justify"></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:16.0pt"><span style="font-family:宋体">13</span></span><span style="font-size:16.0pt"><span style="font-family:宋体">,查看磁盘信息,我这里插了一个128G的TF卡用作下载盘。</span></span></span></span></p>

<p style="text-align:justify"></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:Calibri,sans-serif"><span lang="EN-US" style="font-size:16.0pt"><span style="font-family:宋体">14</span></span><span style="font-size:16.0pt"><span style="font-family:宋体">,设置samba共享</span></span></span></span></p>

<p style="text-align:justify"></p>

<p style="text-align:justify">&nbsp;</p>

<p style="text-align:justify">&nbsp;</p>

<p style="text-align:justify">&nbsp;</p>

<p style="text-align:justify">&nbsp;</p>

<p style="text-align:justify">&nbsp;</p>

<p style="text-align:justify">&nbsp;</p>

<p style="text-align:justify">&nbsp;</p>

<p style="text-align:justify">&nbsp;</p>

<p style="text-align:justify">&nbsp;</p>

<p style="text-align:justify">&nbsp;</p>

<p style="text-align:justify">&nbsp;</p>

<p style="text-align:justify">&nbsp;</p>
</div><script>                                        var loginstr = '<div class="locked">查看本帖全部内容,请<a href="javascript:;"   style="color:#e60000" class="loginf">登录</a>或者<a href="https://bbs.eeworld.com.cn/member.php?mod=register_eeworld.php&action=wechat" style="color:#e60000" target="_blank">注册</a></div>';
                                       
                                        if(parseInt(discuz_uid)==0){
                                                                                                (function($){
                                                        var postHeight = getTextHeight(400);
                                                        $(".showpostmsg").html($(".showpostmsg").html());
                                                        $(".showpostmsg").after(loginstr);
                                                        $(".showpostmsg").css({height:postHeight,overflow:"hidden"});
                                                })(jQuery);
                                        }                </script><script type="text/javascript">(function(d,c){var a=d.createElement("script"),m=d.getElementsByTagName("script"),eewurl="//counter.eeworld.com.cn/pv/count/";a.src=eewurl+c;m.parentNode.insertBefore(a,m)})(document,523)</script>

okhxyyo 发表于 2020-9-14 11:34

<p><a href="https://bbs.eeworld.com.cn/thread-1137107-1-1.html" target="_blank">树莓派4B测评</a></p>

<p>汇总:<a href="https://bbs.eeworld.com.cn/thread-1137107-1-1.html">https://bbs.eeworld.com.cn/thread-1137107-1-1.html</a></p>

freebsder 发表于 2020-9-8 16:02

<p>真羡慕你们有这么多时间精力玩</p>
页: [1]
查看完整版本: 【树莓派4B测评】树莓派4安装NAS系统OpenMediaVault