410开发板刷debian个人记录
<h1><span style="font-size: 18pt">一.刷入Debian11</span></h1><p>项目地址:https://github.com/OpenStick/OpenStick</p>
<p>wiki地址:https://www.kancloud.cn/handsomehacker/openstick/2637559</p>
<h1><span style="font-size: 18pt">二</span>.完成刷入后,通过<span style="background-color: rgba(255, 255, 255, 1); color: rgba(255, 0, 0, 1)">adb shell指令<span style="color: rgba(0, 0, 0, 1)">进入控制台并连接网络</span></span></h1>
<h2><span style="background-color: rgba(255, 255, 255, 1); color: rgba(255, 0, 0, 1)"><span style="color: rgba(0, 0, 0, 1)">1.配置网络环境</span></span></h2>
<div class="cnblogs_code">
<pre>export TERM=linux</pre>
</div>
<h2> <span style="color: rgba(255, 0, 0, 1)"><span style="color: rgba(0, 0, 0, 1)">2.进入网络管理</span></span></h2>
<div class="cnblogs_code">
<pre>sudo nmtui</pre>
</div>
<h2><span style="font-size: 18pt">3.修改root用户密码</span></h2>
<div class="cnblogs_code">
<pre>passwd root 密码</pre>
</div>
<h2> </h2>
<h1><span style="font-size: 18pt">三.安装基本软件</span></h1>
<p>1.更新软件列表并安装wget和curl</p>
<div class="cnblogs_code">
<pre>sudo apt-<span style="color: rgba(0, 0, 255, 1)">get</span><span style="color: rgba(0, 0, 0, 1)"> update
apt</span>-<span style="color: rgba(0, 0, 255, 1)">get</span><span style="color: rgba(0, 0, 0, 1)"> install wget
apt</span>-<span style="color: rgba(0, 0, 255, 1)">get</span> install curl</pre>
</div>
<h2>2.安装docker和fastos docker面板/portainer面板</h2>
<div class="cnblogs_code">
<pre>//安装docker<br>sudo apt-<span style="color: rgba(0, 0, 255, 1)">get</span><span style="color: rgba(0, 0, 0, 1)"> update
curl </span>-sSL https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">get.daocloud.io/docker | sh</span></pre>
<div class="cnblogs_code">
<pre><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">设置docker自启</span>
<span style="color: rgba(0, 0, 0, 1)">sudo systemctl enable docker
sudo systemctl start docker<br></span></pre>
</div>
</div>
<div class="cnblogs_code">
<pre><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">安装可视化面板fastos docker</span>
docker run --restart always -p <span style="color: rgba(128, 0, 128, 1)">8081</span>:<span style="color: rgba(128, 0, 128, 1)">8081</span> -d -v /<span style="color: rgba(0, 0, 255, 1)">var</span>/run/docker.sock:/<span style="color: rgba(0, 0, 255, 1)">var</span>/run/docker.sock -v /etc/docker/:/etc/docker/ wangbinxingkong/fast:latest</pre>
</div>
<p><span style="color: rgba(255, 0, 0, 1)">ps:首次登录需要注册,注册成功后即可正常使用</span></p>
<p><span style="color: rgba(255, 0, 0, 1)">可视化面板项目地址:https://hub.docker.com/r/wangbinxingkong/fast</span></p>
<div class="cnblogs_code">
<pre><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">安装portainer面板</span>
docker run -d -p <span style="color: rgba(128, 0, 128, 1)">8080</span>:<span style="color: rgba(128, 0, 128, 1)">9000</span> --restart=always -v /<span style="color: rgba(0, 0, 255, 1)">var</span>/run/docker.sock:/<span style="color: rgba(0, 0, 255, 1)">var</span>/run/docker.sock --name prtainerportainer/portainer</pre>
</div>
<p><span style="background-color: rgba(255, 255, 255, 1); color: rgba(255, 0, 0, 1)"><span style="color: rgba(0, 0, 0, 1)">汉化包地址:</span>https://www.u-share.cn/forum.php?mod=viewthread&tid=192866&highlight=portainer</span></p>
<h2>3.设置DDNS</h2>
<p>项目地址:https://github.com/jeessy2/ddns-go</p>
<div class="cnblogs_code">
<pre><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">拉取ddns镜像并部署</span>
docker run -d --name ddns-go --restart=always --net=host jeessy/ddns-go</pre>
</div>
<ul dir="auto">
<li>
<p dir="auto">在浏览器中打开<span style="color: rgba(0, 0, 0, 1); background-color: rgba(255, 204, 153, 1)"><strong><code>http://主机IP:9876</code></strong></span>,修改你的配置,成功</p>
</li>
<li>[可选] 支持启动带参数 <span style="background-color: rgba(255, 204, 153, 1)"><code>-l</code></span>监听地址 <span style="background-color: rgba(255, 204, 153, 1)"><code>-f</code></span>间隔时间(秒)</li>
</ul>
<div class="cnblogs_code">
<pre>docker run -d --name ddns-go --restart=always --net=host jeessy/ddns-go -l :<span style="color: rgba(128, 0, 128, 1)">9877</span> -f <span style="color: rgba(128, 0, 128, 1)">600</span></pre>
</div>
<h1>四.进阶部分</h1>
<h2>1.开启ssh登陆root账户</h2>
<ul>
<li>安装nano编辑器</li>
</ul>
<div class="cnblogs_code">
<pre>sudo apt-<span style="color: rgba(0, 0, 255, 1)">get</span> install nano</pre>
</div>
<ul>
<li>编辑sshd_config</li>
</ul>
<div class="cnblogs_code">
<pre>sudo nano /etc/ssh/sshd_config</pre>
</div>
<p> 将34行#<code><span style="font-family: arial, helvetica, sans-serif">PermitRootLogin prohibit-password</span></code>改为PermitRootLogin yes</p>
<p> 将58行#<code><span style="font-family: arial, helvetica, sans-serif">PasswordAuthentication yes</span></code>的#去掉</p>
<ul>
<li>重启</li>
</ul>
<div class="cnblogs_code">
<pre>reboot</pre>
</div>
<h2>2.修改host加速GitHub访问</h2>
<p> 使用winscp打开/etc/hosts,并加入以下内容(末尾为项目地址)</p>
<div class="cnblogs_code">
<pre><span style="color: rgba(0, 0, 0, 1)"># GitHub520 Host Start
</span><span style="color: rgba(128, 0, 128, 1)">140.82</span>.<span style="color: rgba(128, 0, 128, 1)">112.25</span><span style="color: rgba(0, 0, 0, 1)"> alive.github.com
</span><span style="color: rgba(128, 0, 128, 1)">140.82</span>.<span style="color: rgba(128, 0, 128, 1)">112.25</span><span style="color: rgba(0, 0, 0, 1)"> live.github.com
</span><span style="color: rgba(128, 0, 128, 1)">185.199</span>.<span style="color: rgba(128, 0, 128, 1)">108.154</span><span style="color: rgba(0, 0, 0, 1)"> github.githubassets.com
</span><span style="color: rgba(128, 0, 128, 1)">140.82</span>.<span style="color: rgba(128, 0, 128, 1)">112.21</span><span style="color: rgba(0, 0, 0, 1)"> central.github.com
</span><span style="color: rgba(128, 0, 128, 1)">185.199</span>.<span style="color: rgba(128, 0, 128, 1)">108.133</span><span style="color: rgba(0, 0, 0, 1)"> desktop.githubusercontent.com
</span><span style="color: rgba(128, 0, 128, 1)">185.199</span>.<span style="color: rgba(128, 0, 128, 1)">108.153</span> assets-<span style="color: rgba(0, 0, 0, 1)">cdn.github.com
</span><span style="color: rgba(128, 0, 128, 1)">185.199</span>.<span style="color: rgba(128, 0, 128, 1)">108.133</span><span style="color: rgba(0, 0, 0, 1)"> camo.githubusercontent.com
</span><span style="color: rgba(128, 0, 128, 1)">185.199</span>.<span style="color: rgba(128, 0, 128, 1)">108.133</span><span style="color: rgba(0, 0, 0, 1)"> github.map.fastly.net
</span><span style="color: rgba(128, 0, 128, 1)">199.232</span>.<span style="color: rgba(128, 0, 128, 1)">69.194</span> github.<span style="color: rgba(0, 0, 255, 1)">global</span><span style="color: rgba(0, 0, 0, 1)">.ssl.fastly.net
</span><span style="color: rgba(128, 0, 128, 1)">140.82</span>.<span style="color: rgba(128, 0, 128, 1)">113.4</span><span style="color: rgba(0, 0, 0, 1)"> gist.github.com
</span><span style="color: rgba(128, 0, 128, 1)">185.199</span>.<span style="color: rgba(128, 0, 128, 1)">108.153</span><span style="color: rgba(0, 0, 0, 1)"> github.io
</span><span style="color: rgba(128, 0, 128, 1)">140.82</span>.<span style="color: rgba(128, 0, 128, 1)">114.4</span><span style="color: rgba(0, 0, 0, 1)"> github.com
</span><span style="color: rgba(128, 0, 128, 1)">192.0</span>.<span style="color: rgba(128, 0, 128, 1)">66.2</span><span style="color: rgba(0, 0, 0, 1)"> github.blog
</span><span style="color: rgba(128, 0, 128, 1)">140.82</span>.<span style="color: rgba(128, 0, 128, 1)">114.6</span><span style="color: rgba(0, 0, 0, 1)"> api.github.com
</span><span style="color: rgba(128, 0, 128, 1)">185.199</span>.<span style="color: rgba(128, 0, 128, 1)">108.133</span><span style="color: rgba(0, 0, 0, 1)"> raw.githubusercontent.com
</span><span style="color: rgba(128, 0, 128, 1)">185.199</span>.<span style="color: rgba(128, 0, 128, 1)">108.133</span> user-<span style="color: rgba(0, 0, 0, 1)">images.githubusercontent.com
</span><span style="color: rgba(128, 0, 128, 1)">185.199</span>.<span style="color: rgba(128, 0, 128, 1)">108.133</span><span style="color: rgba(0, 0, 0, 1)"> favicons.githubusercontent.com
</span><span style="color: rgba(128, 0, 128, 1)">185.199</span>.<span style="color: rgba(128, 0, 128, 1)">108.133</span><span style="color: rgba(0, 0, 0, 1)"> avatars5.githubusercontent.com
</span><span style="color: rgba(128, 0, 128, 1)">185.199</span>.<span style="color: rgba(128, 0, 128, 1)">108.133</span><span style="color: rgba(0, 0, 0, 1)"> avatars4.githubusercontent.com
</span><span style="color: rgba(128, 0, 128, 1)">185.199</span>.<span style="color: rgba(128, 0, 128, 1)">108.133</span><span style="color: rgba(0, 0, 0, 1)"> avatars3.githubusercontent.com
</span><span style="color: rgba(128, 0, 128, 1)">185.199</span>.<span style="color: rgba(128, 0, 128, 1)">108.133</span><span style="color: rgba(0, 0, 0, 1)"> avatars2.githubusercontent.com
</span><span style="color: rgba(128, 0, 128, 1)">185.199</span>.<span style="color: rgba(128, 0, 128, 1)">108.133</span><span style="color: rgba(0, 0, 0, 1)"> avatars1.githubusercontent.com
</span><span style="color: rgba(128, 0, 128, 1)">185.199</span>.<span style="color: rgba(128, 0, 128, 1)">108.133</span><span style="color: rgba(0, 0, 0, 1)"> avatars0.githubusercontent.com
</span><span style="color: rgba(128, 0, 128, 1)">185.199</span>.<span style="color: rgba(128, 0, 128, 1)">108.133</span><span style="color: rgba(0, 0, 0, 1)"> avatars.githubusercontent.com
</span><span style="color: rgba(128, 0, 128, 1)">140.82</span>.<span style="color: rgba(128, 0, 128, 1)">112.10</span><span style="color: rgba(0, 0, 0, 1)"> codeload.github.com
</span><span style="color: rgba(128, 0, 128, 1)">52.216</span>.<span style="color: rgba(128, 0, 128, 1)">21.147</span> github-<span style="color: rgba(0, 0, 0, 1)">cloud.s3.amazonaws.com
</span><span style="color: rgba(128, 0, 128, 1)">52.217</span>.<span style="color: rgba(128, 0, 128, 1)">229.65</span> github-<span style="color: rgba(0, 0, 0, 1)">com.s3.amazonaws.com
</span><span style="color: rgba(128, 0, 128, 1)">52.217</span>.<span style="color: rgba(128, 0, 128, 1)">96.28</span> github-production-release-asset-<span style="color: rgba(0, 0, 0, 1)">2e65be.s3.amazonaws.com
</span><span style="color: rgba(128, 0, 128, 1)">52.217</span>.<span style="color: rgba(128, 0, 128, 1)">77.92</span> github-production-user-asset-<span style="color: rgba(0, 0, 0, 1)">6210df.s3.amazonaws.com
</span><span style="color: rgba(128, 0, 128, 1)">52.217</span>.<span style="color: rgba(128, 0, 128, 1)">172.9</span> github-production-repository-file-<span style="color: rgba(0, 0, 0, 1)">5c1aeb.s3.amazonaws.com
</span><span style="color: rgba(128, 0, 128, 1)">185.199</span>.<span style="color: rgba(128, 0, 128, 1)">108.153</span><span style="color: rgba(0, 0, 0, 1)"> githubstatus.com
</span><span style="color: rgba(128, 0, 128, 1)">64.71</span>.<span style="color: rgba(128, 0, 128, 1)">144.202</span><span style="color: rgba(0, 0, 0, 1)"> github.community
</span><span style="color: rgba(128, 0, 128, 1)">23.100</span>.<span style="color: rgba(128, 0, 128, 1)">27.125</span><span style="color: rgba(0, 0, 0, 1)"> github.dev
</span><span style="color: rgba(128, 0, 128, 1)">140.82</span>.<span style="color: rgba(128, 0, 128, 1)">114.21</span><span style="color: rgba(0, 0, 0, 1)"> collector.github.com
</span><span style="color: rgba(128, 0, 128, 1)">13.107</span>.<span style="color: rgba(128, 0, 128, 1)">43.16</span><span style="color: rgba(0, 0, 0, 1)"> pipelines.actions.githubusercontent.com
</span><span style="color: rgba(128, 0, 128, 1)">185.199</span>.<span style="color: rgba(128, 0, 128, 1)">108.133</span><span style="color: rgba(0, 0, 0, 1)"> media.githubusercontent.com
</span><span style="color: rgba(128, 0, 128, 1)">185.199</span>.<span style="color: rgba(128, 0, 128, 1)">108.133</span><span style="color: rgba(0, 0, 0, 1)"> cloud.githubusercontent.com
</span><span style="color: rgba(128, 0, 128, 1)">185.199</span>.<span style="color: rgba(128, 0, 128, 1)">108.133</span><span style="color: rgba(0, 0, 0, 1)"> objects.githubusercontent.com
# Update time: </span><span style="color: rgba(128, 0, 128, 1)">2022</span>-<span style="color: rgba(128, 0, 128, 1)">02</span>-24T14:<span style="color: rgba(128, 0, 128, 1)">06</span>:<span style="color: rgba(128, 0, 128, 1)">14</span>+<span style="color: rgba(128, 0, 128, 1)">08</span>:<span style="color: rgba(128, 0, 128, 1)">00</span><span style="color: rgba(0, 0, 0, 1)">
# Update url: https:</span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">raw.hellogithub.com/hosts</span>
# Star me: https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">github.com/521xueweihan/GitHub520</span>
# GitHub520 Host End</pre>
</div>
<p>重启生效</p>
<h2>3.设置USB拓展</h2>
<p>切换USB模式</p>
<div class="cnblogs_code">
<pre>sudo -<span style="color: rgba(0, 0, 0, 1)">s
echo host </span>> /sys/kernel/debug/usb/ci_hdrc.<span style="color: rgba(128, 0, 128, 1)">0</span>/role</pre>
</div>
<p>挂载外接存储</p>
<div class="cnblogs_code">
<pre>fdisk -<span style="color: rgba(0, 0, 0, 1)">l
sudo mount </span>-t /sd?<span style="color: rgba(128, 0, 128, 1)">1</span> /你要挂载的目录(?字母参考上条代码输出路径)</pre>
</div>
<p>(如显示fdisk未安装)</p>
<div class="cnblogs_code">
<pre>sudo apt-<span style="color: rgba(0, 0, 255, 1)">get</span> install -y fdisk</pre>
</div>
<h2> 3.1显示没有写权限的解决方案(NTFS)</h2>
<p>安装ntfs-3g</p>
<div class="cnblogs_code">
<pre>apt-<span style="color: rgba(0, 0, 255, 1)">get</span> install -y ntfs-3g</pre>
</div>
<p>修复NTFS</p>
<div class="cnblogs_code">
<pre>sudo ntfsfix /dev/sd?<span style="color: rgba(128, 0, 128, 1)">1</span></pre>
</div>
<p>返回结果</p>
<div class="cnblogs_code">
<pre>Mounting volume… The disk contains an unclean file system (<span style="color: rgba(128, 0, 128, 1)">0</span>, <span style="color: rgba(128, 0, 128, 1)">0</span><span style="color: rgba(0, 0, 0, 1)">).
Metadata kept </span><span style="color: rgba(0, 0, 255, 1)">in</span><span style="color: rgba(0, 0, 0, 1)"> Windows cache, refused to mount.
FAILED
Attempting to correct errors…
Processing $MFT and $MFTMirr…
Reading $MFT… OK
Reading $MFTMirr… OK
Comparing $MFTMirr to $MFT… OK
Processing of $MFT and $MFTMirr completed successfully.
Setting required flags on partition… OK
Going to empty the journal ($LogFile)… OK
Checking the alternate boot sector… OK
NTFS volume version </span><span style="color: rgba(0, 0, 255, 1)">is</span> <span style="color: rgba(128, 0, 128, 1)">3.1</span><span style="color: rgba(0, 0, 0, 1)">.
NTFS partition </span>/dev/vdb2 was processed successfully.</pre>
</div>
<p>最后正常挂载</p>
<div class="cnblogs_code">
<pre>mount -t ntfs /dev/ad?<span style="color: rgba(128, 0, 128, 1)">1</span> /xxx</pre>
</div>
<h2>3.2通过udisks2安全弹出外接硬盘</h2>
<div class="cnblogs_code">
<pre>udisksctl unmount -b /dev/<span style="color: rgba(0, 0, 0, 1)">sda1
</span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">卸载挂载点。相当与(umount /devsda1)</span>
udisksctl power-off -b /dev/<span style="color: rgba(0, 0, 0, 1)">sda1
</span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">安全关闭驱动器</span></pre>
</div>
<p>参考:https://qastack.cn/unix/178638/eject-safely-remove-vs-umount</p>
<h2>3.2-1通过udisks2断电外接硬盘</h2>
<div class="cnblogs_code">
<pre>udisksctl power-off --block-device /dev/sdb</pre>
</div>
<p>参考:https://forum.ubuntu.org.cn/viewtopic.php?t=480394</p>
<h2>3.3关闭LED灯</h2>
<p>参考openstick Wiki</p>
<div class="cnblogs_code">
<pre>cd /sys/<span style="color: rgba(0, 0, 255, 1)">class</span>/leds/<span style="color: rgba(0, 0, 0, 1)">red:os
echo usb</span>-gadget ><span style="color: rgba(0, 0, 0, 1)"> trigger
cd </span>/sys/<span style="color: rgba(0, 0, 255, 1)">class</span>/leds/<span style="color: rgba(0, 0, 0, 1)">blue:wifi
echo usb</span>-gadget > trigger</pre>
</div>
<p>这样就可以把wifi灯和系统指示灯关了(开着太nm闪了)</p>
<h2>3.4更新源出现报错的解决方案</h2>
<h3>更换默认源</h3>
<p>安装CA</p>
<div class="cnblogs_code">
<pre>apt install apt-transport-https ca-certificates</pre>
</div>
<p>更新源</p>
<div class="cnblogs_code">
<pre>sudo nano /etc/apt/sources.list</pre>
</div>
<p>更换为以下内容</p>
<div class="cnblogs_code">
<pre><span style="color: rgba(0, 0, 0, 1)"># 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释</span></pre>
<pre class="debian">deb http://mirrors.ustc.edu.cn/debian/ bullseye main contrib non-free
#deb-src http://mirrors.ustc.edu.cn/debian/ bullseye main contrib non-free
deb http://mirrors.ustc.edu.cn/debian/ bullseye-updates main contrib non-free
#deb-src http://mirrors.ustc.edu.cn/debian/ bullseye-updates main contrib non-free
deb http://mirrors.ustc.edu.cn/debian/ bullseye-backports main contrib non-free
#deb-src http://mirrors.ustc.edu.cn/debian/ bullseye-backports main contrib non-free
deb http://mirrors.ustc.edu.cn/debian-security/ bullseye-security main contrib non-free
#deb-src http://mirrors.ustc.edu.cn/debian-security/ bullseye-security main contrib non-free</pre>
<pre><span style="color: rgba(0, 0, 0, 1)"> </span></pre>
</div>
<p>禁用Mobian源</p>
<div class="cnblogs_code">
<pre>sudo sed -i <span style="color: rgba(128, 0, 0, 1)">'</span><span style="color: rgba(128, 0, 0, 1)">1c #deb http://repo.mobian-project.org/ bullseye main non-free</span><span style="color: rgba(128, 0, 0, 1)">'</span> /etc/apt/sources.list.d/mobian.list</pre>
</div>
<p>删除不可用仓库</p>
<div class="cnblogs_code">
<pre>cd /etc/apt/<span style="color: rgba(0, 0, 0, 1)">source.list.d
rm </span>-r ./需要删除的仓库</pre>
</div>
<p> </p>
<p>最后正常执行apt-get update</p>
<h2>4.安装OMV</h2>
<h3>4.1.卸载重装python3</h3>
<div class="cnblogs_code">
<pre><span style="color: rgba(128, 0, 128, 1)">1</span><span style="color: rgba(0, 0, 0, 1)">、卸载python3
sudo apt</span>-<span style="color: rgba(0, 0, 255, 1)">get</span><span style="color: rgba(0, 0, 0, 1)"> remove python3
</span><span style="color: rgba(128, 0, 128, 1)">2</span><span style="color: rgba(0, 0, 0, 1)">、卸载python3及其依赖
sudo apt</span>-<span style="color: rgba(0, 0, 255, 1)">get</span> remove --auto-<span style="color: rgba(0, 0, 0, 1)">remove python3
</span><span style="color: rgba(128, 0, 128, 1)">3</span><span style="color: rgba(0, 0, 0, 1)">、清除python3
sudo apt</span>-<span style="color: rgba(0, 0, 255, 1)">get</span><span style="color: rgba(0, 0, 0, 1)"> purge python3
or
sudo apt</span>-<span style="color: rgba(0, 0, 255, 1)">get</span> purge --auto-<span style="color: rgba(0, 0, 0, 1)">remove python3
</span><span style="color: rgba(128, 0, 128, 1)">4</span><span style="color: rgba(0, 0, 0, 1)">.安装python3
sudo apt</span>-<span style="color: rgba(0, 0, 255, 1)">get</span> install python3</pre>
</div>
<p> </p>
<h3>4.2.修改hosts,拉取一键安装脚本</h3>
<p>通过该网站获取github以及raw的地址</p>
<p>raw.Githubusercontent.com | Easy, Fast and FREE (ipaddress.com)</p>
<p>把ip加入/etc/hosts中即可</p>
<div class="cnblogs_code">
<pre><span style="color: rgba(0, 0, 0, 1)">例如</span></pre>
<p>140.82.112.4 github.com</p>
<p>185.199.108.133 raw.githubusercontent.com</p>
</div>
<p>完成hosts添加后,往下</p>
<p>一键安装omv脚本项目地址:OpenMediaVault-Plugin-Developers/installScript: script that installs omv-extras and openmediavault if not installed already. (github.com)<br></p>
<p>离线安装:</p>
<div class="cnblogs_code">
<pre>wget https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/install</span>
chmod +<span style="color: rgba(0, 0, 0, 1)">x install
sudo .</span>/install -n</pre>
</div>
<p>curl拉取(适用于网络条件差的情况):</p>
<div class="cnblogs_code">
<pre>sudo curl -sSL https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/install | sudo bash</span></pre>
</div>
<p>执行sudo ./install -n 开始自动安装,等待安装完成即可</p>
<h3>4.3.报错解决办法</h3>
<p>填坑:解决Unit file is masked问题<br>在某些机器(如VPS)上手动安装OMV时,常常会出现“Unit file is masked”的问题。该问题非常致命,会中断OMV后续的安装进程。</p>
<p>Failed to preset unit: Unit file /etc/systemd/system/openmediavault-cleanup-php.service is masked.<br>/usr/bin/deb-systemd-helper: error: systemctl preset failed on openmediavault-cleanup-php.service: No such file or directory<br>dpkg: error processing package openmediavault (--configure):<br>installed openmediavault package post-installation script subprocess returned error exit status 1<br>Errors were encountered while processing:<br>openmediavault<br>E: Sub-process /usr/bin/dpkg returned an error code (1)</p>
<p>实际上,了解systemd对服务的管理机制,就不难得知,这里的“mask”是系统服务的一个状态,相当于被“屏蔽”。据此,解决办法很简单,但凡有一个服务提示被masked,就运行下面的命令来unmask,然后重新安装,直到安装过程能够顺利继续:</p>
<p># systemctl unmask <被报错的服务名>,例如:<br>systemctl unmask openmediavault-cleanup-php.service </p>
<h2>5.安装snap和hacs</h2>
<p>为确保蓝牙功能能正常使用,需要先安装蓝牙程序</p>
<div class="cnblogs_code">
<pre>apt install bluetooth</pre>
</div>
<p>安装完成后确认蓝牙设备是否启动</p>
<div class="cnblogs_code">
<pre>hcioconfig -a</pre>
</div>
<p>显示为DOWN则未开启,手动开启</p>
<div class="cnblogs_code">
<pre>hciconfig hci0 up</pre>
</div>
<p>接下来安装snap和core</p>
<div class="cnblogs_code">
<pre>apt install snapd</pre>
</div>
<p>安装完snap后注销用户或重启</p>
<div class="cnblogs_code">
<pre>snap install core</pre>
</div>
<p>安装完成snap后,即可安装hacs(snapcraft.io)</p>
<div class="cnblogs_code">
<pre>sudo snap install home-assistant-hacs</pre>
</div>
<p>安装完成后重启,之后进入<span style="text-decoration: underline">localhost:8123</span>,手动配置HACS</p><br><br>
来源:https://www.cnblogs.com/umi02/p/15931779.html
頁:
[1]