R3300L安装armbian(bullseye 23.08.0)并装OMV

最近在折腾机顶盒,把折腾过程记录一下,仅作参考,不负任何责任。
一、硬件准备:
百视通R3300L机顶盒一台;
普通miniUSB数据线一条;
晶晨HDMI刷机神器一个;
读卡器和TF卡或者U盘一个(都不要小于8G)
win10电脑一台。

二、软件准备:
晶晨的刷机工具USB_Burning_Tool;
开心电视助手4;下载地址:
链接:https://pan.baidu.com/s/1JXVGVndXeBDu2OQ4QbPA1A?pwd=8pgq
提取码:8pgq
R3300L的安卓6线刷固件(img镜像);下载地址:
https://pan.baidu.com/s/1US2DZTHGGFOik3qLnHwJig?pwd=vjvz

安卓app:Reboot to LibreElec;下载地址:
https://pan.baidu.com/s/1-aTnerW7vhmG-wlP-zLAHw?pwd=avox

Rufus刷镜像(或者winImg32等刷镜像的也行);

Armbian_23.08.0_amlogic_s905lb-r3300l_bullseye_6.1.38_server_2023.07.08.img
下载地址:https://github.com/ophub/amlogic-s9xxx-armbian/releases

三、制作armbian启动TF卡
把TF装进读卡器,插进电脑USB口,打开Rufus,选择下载的armbian镜像,确认一下被刷进的设备是不是你要用的TF卡,按确定,刷好之后,改uEnv.Txt和extlinuxconf文件。

四、刷安卓6固件,然后用U盘安装Reboot To LibreElec,并运行,期间会弹出Root权限询问对话框,请选择允许。
警告:如果用Reboot To LibreElec重启进入tf卡或者u盘的armbian,再进行安装的话,会导致只要usb口或者tf卡槽有设备就不能顺利引导安装在emmc的armbian系统。要想避免这个bug,应该利用《开心电视助手4》中“调试”→"从u盘/SD卡启动",从而引导tf卡或u盘的armbian镜像启动,再安装。
以上四步可以在互联网找到很多教程,不再赘述。

五、插入TF卡,启动armbian,第一次启动要你重设Root的密码的,其它要设置的直接按Ctrl+C取消跳过,在终端输入:

armbian-install -m yes

稍等十分钟左右,就可以安装进机顶盒里的emmc了。安装完毕会提示输入:

poweroff

关掉电源,取出TF卡,再开机顶盒就可以从emmc启动刚装的armbian了。进去后,更换国内源:

nano /etc/apt/sources.list

在打开的文件中,给每一行的最前面添加#号,这样就可以注释掉里面的内容,把以下内容复制进去。

#这是原来内容,在行首添加了#号,注释掉
#deb http://deb.debian.org/debian bullseye main contrib non-free
#deb-src http://deb.debian.org/debian bullseye main contrib non-free

#deb http://deb.debian.org/debian bullseye-updates main contrib non-free
#deb-src http://deb.debian.org/debian bullseye-updates main contrib non-free

#deb http://deb.debian.org/debian bullseye-backports main contrib non-free
#deb-src http://deb.debian.org/debian bullseye-backports main contrib non-free

#deb http://security.debian.org/ bullseye-security main contrib non-free
#deb-src http://security.debian.org/ bullseye-security main contrib non-free
#以上是原内容

#以下是我添加的源
# 默认注释了源码镜像以提高 apt update 速度
# 清华大学的软件源
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free 
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free 
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free 
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free 
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free 
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free 
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free 
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free

# 阿里云的软件源
 deb https://mirrors.aliyun.com/debian/ bullseye main non-free contrib
# deb-src https://mirrors.aliyun.com/debian/ bullseye main non-free contrib
 deb https://mirrors.aliyun.com/debian-security/ bullseye-security main
# deb-src https://mirrors.aliyun.com/debian-security/ bullseye-security main
 deb https://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib
# deb-src https://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib
 deb https://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib
# deb-src https://mirrors.aliyun.com/debian/ bullseye-backports main non-free contrib

# 中科大的软件源
 deb https://mirrors.ustc.edu.cn/debian/ bullseye main contrib non-free 
# deb-src https://mirrors.ustc.edu.cn/debian/ bullseye main contrib non-free 
 deb https://mirrors.ustc.edu.cn/debian/ bullseye-updates main contrib non-free 
# deb-src https://mirrors.ustc.edu.cn/debian/ bullseye-updates main contrib non-free 
 deb https://mirrors.ustc.edu.cn/debian/ bullseye-backports main contrib non-free 
# deb-src https://mirrors.ustc.edu.cn/debian/ bullseye-backports main contrib non-free 
 deb https://mirrors.ustc.edu.cn/debian-security bullseye-security main contrib non-free 
# deb-src https://mirrors.ustc.edu.cn/debian-security bullseye-security main contrib non-free

检查无误后,按Ctrl+O保存,按Ctrl+X退出。

nano /etc/apt/sources.list.d/armbian.list

把原内容注释掉,复制以下内容进去

#deb http://apt.armbian.com bullseye main bullseye-utils bullseye-desktop

deb https://mirrors.tuna.tsinghua.edu.cn/armbian bullseye main bullseye-utils bullseye-desktop

运行一下:

apt update && apt upgrade -y

等待更新完毕。

六、安装OMV
这部分内容参考了以下网页:
参考网址一:Installation on Debian
https://docs.openmediavault.org/en/5.x/installation/on_debian.html?highlight=debian
参考网址二:Installing OMV6 on Armbian Bullseye
https://wiki.omv-extras.org/doku.php?id=omv6:armbian_bullseye_install

手动安装 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"

添加清华源软件包储存库加速。这部分参考了:
https://mirrors.tuna.tsinghua.edu.cn/help/openmediavault/

cat <<EOF > /etc/apt/sources.list.d/openmediavault.list
deb https://mirrors.tuna.tsinghua.edu.cn/OpenMediaVault/public shaitan main
deb https://mirrors.tuna.tsinghua.edu.cn/OpenMediaVault/packages shaitan main
## Uncomment the following line to add software from the proposed repository.
# deb https://mirrors.tuna.tsinghua.edu.cn/OpenMediaVault/public shaitan-proposed main
# deb https://mirrors.tuna.tsinghua.edu.cn/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 https://mirrors.tuna.tsinghua.edu.cn/OpenMediaVault/public shaitan partner
# deb https://mirrors.tuna.tsinghua.edu.cn/OpenMediaVault/packages shaitan partner
EOF

其中 shaitan 为 Open Media Vault 的 codename(本样例代码为 6.x 的 codename)
↓以下内容不建议使用↓
运行以下内容:

#设置环境变量
export LANG=C.UTF-8
export DEBIAN_FRONTEND=noninteractive
export APT_LISTCHANGES_FRONTEND=none
#更新
apt-get update
#安装OMV
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环境
export PATH=$PATH:/usr/sbin
omv-confdbadm populate

期间可能会报Error,不用管,稍等一会看看OMV的登陆网页能不能打开,如果打不开就继续按照以下进行,如果能打开就到这里算安装完成,请忽略下一个命令。
↑以上内容不建议使用↑

↓建议使用以下内容↓**
以下命令是自动安装的脚本,装完后包含omv-extras插件:

wget -O - https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/install | sudo bash

可能要等不少于半小时吧,根据视网络情况而定。搞定后会自动重启。
在浏览器输入http://机顶盒的ip地址就可以打开OMV的登陆界面了,登录的默认账号是admin,默认密码是openmediavault。

七、安装docker
直接使用docker安装脚本

curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh --mirror Aliyun

这个脚本运行比较久,也需要耐心等待。
装好后,显示如下信息:

Client: Docker Engine - Community
 Version:           24.0.4
 API version:       1.43
 Go version:        go1.20.5
 Git commit:        3713ee1
 Built:             Fri Jul  7 14:50:52 2023
 OS/Arch:           linux/arm64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          24.0.4
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.20.5
  Git commit:       4ffc614
  Built:            Fri Jul  7 14:50:52 2023
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.6.21
  GitCommit:        3dce8eb055cbb6872793272b4f20ed16117344f8
 runc:
  Version:          1.1.7
  GitCommit:        v1.1.7-0-g860f061
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

为了确保portainer能正确运行,建议先装apparmor

apt install apparmor apparmor-utils auditd 

八、安装portainer:

#这个可不执行,搜索portainer镜像,我选portainer-ce
docker search portainer
#拉取portainer镜像
docker pull portainer/portainer-ce 
#创建一个名称为portainerTV端口为9000的容器,并运行。
docker run -d -p 9000:9000 --restart=always \
 -v /var/run/docker.sock:/var/run/docker.sock \
 --name portainerTV portainer/portainer-ce

在浏览器输入http://你的ip地址:9000就可以访问portainer了。

九、利用docker安装frpc内网穿透
本部分内容参考了https://doc.natfrp.com/frpc/usage.html的docker部分做法:
执行下面的命令就能创建一个容器并启动 frpc:

docker run \
    -d \
    --restart=on-failure:5 \
    --pull=always \
    --name=sakura1 \
    natfrp/frpc \
    -f <启动参数> --remote_control <远程控制密码>

请注意每行(除了最后一行)末尾都有一个 \,并且 \ 后面没有任何东西(包括空格)。

十、利用docker安装nextcloud
不要搞那个什么netxcloud/all-in-one的镜像,这是巨坑。
如果要求不高,不用安装mysql和apache,直接拉取镜像,创建容器就可以了:

拉取镜像:

docker pull nextcloud

启动容器:
这里创建了一个名称为nextcloud的容器,端口为81,可以根据自己的实际情况更改。

docker run -d --restart=always --name nextcloud -p 81:80 nextcloud

注意:前一个是物理主机端口,后一个是容器端口
创建好之后,就可以在浏览器打开:http://该机顶盒的ip地址:81,进行设置就可以了。

十一、利用docker安装qbittorrent
拉取qbittorrent的镜像

docker pull linuxserver/qbittorrent

创建qbittorrent容器

docker run -d \
  --name=qbittorrent \
  -p 7881:7881 \
  -p 7881:7881/udp \
  -p 18080:8080 \
  -v /srv/dev-disk-by-uuid-66c6577b-85d8-42e9-8cb0-d6224e90484b/qDLa:/downloads/qDLa \
  -v /srv/dev-disk-by-uuid-64aa4419-08ef-4205-b287-a5db1b230203/qDLb:/downloads/qDLb \
  --restart=always \
 linuxserver/qbittorrent

或者也可以用以下形式创建容器

docker run --name=qbittorrent \
  --network host -d \
  -e WEBUI_PORT=18080 \
  -e TZ="Asia/Shanghai" \
  -v /root/qb/:/downloads \
  --restart unless-stopped \
  linuxserver/qbittorrent

注意:-v 参数的格式是:宿主机文件夹的路径:容器的目录,在这里我使用了绝对路径。
十二、利用docker安装kms服务器
其实kms服务器的镜像有很多,这里选择了mikolatero/vlmcsd的镜像。

docker pull mikolatero/vlmcsd
docker run -d -p 1688:1688 --restart=always --name="vlmcsd" mikolatero/vlmcsd

注意:前一个是物理主机端口,后一个是容器端口
使用方法:
把以下内容保持为winkms.bat,其中ip地址和序列号,如果没有序列号,你可以把该行删去,否则要根据你自己实际情况来设置,保存好之后对其点击右键,选择以管理员身份运行即可。

winkms.bat

@echo off
slmgr /skms 192.168.60.111(你的IP地址):1688
slmgr /ipk 你的序列号
slmgr /ato
slmgr /xpr

officekms.bat,这部分激活office2021

cd C:\Program Files\Microsoft Office\Office16
cscript ospp.vbs /setprt:1688
cscript ospp.vbs /unpkey:6F7TH >nul
cscript ospp.vbs /inpkey:FXYTK-NJJ8C-GB6DW-3DYQT-6F7TH
cscript ospp.vbs /sethst:192.168.16.217
cscript ospp.vbs /act

十三、利用docker安装导航主页

十四、利用docker安装电子图书馆
以上待续……

  • 1
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 4
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值