玩机日记 12 群晖部署AList并配置SSL,安装opkg,使用rclone挂载到本地

news/2025/2/21 11:36:33

目录

ssl-toc" name="tableOfContents" style="margin-left:80px">1、部署alist,配置ssl

安装alist

参考官方文档添加网盘

ssl-toc" name="tableOfContents" style="margin-left:120px">配置ssl

开启webdav访问

2、安装opkg

修改环境变量

添加计划任务

3、安装配置rclone挂载alist

安装rclone,新建remote

安装fuse3

挂载AList

添加计划任务


ssl" name="1%E3%80%81%E9%83%A8%E7%BD%B2alist%EF%BC%8C%E9%85%8D%E7%BD%AEssl">1、部署alist,配置ssl

确保你的套件中心添加了矿神源

安装alist

默认账号/密码是admin/alist,打开之后点击底下的管理,第一件事先修改账号密码

参考官方文档添加网盘

通用项 | AList文档

ssl" name="%E9%85%8D%E7%BD%AEssl">配置ssl

下载crt证书,可参考

玩机日记 1 前期准备工作:申请公网ipv4、购买域名、申请SSL证书-CSDN博客玩机日记 3 PVE配置SSL证书,主路由端口转发,实现远程访问PVE-CSDN博客

把保存crt证书的共享文件夹修改一下权限,确保alist可以访问

下载下来可能是三个文件,一个public.crt,一个chain.crt,需要把它们合成一个完整的证书

cat public.crt chain.crt > fullchain.crt

修改alist的config.json

vim /volume1/@appdata/alist3/config.json
#如果你的alist不是安装在储存空间1,比如说在储存空间2,那就把volume1改成volume2

找到这一段

修改成这样,两个file就是存放crt证书的路径

重启alist

成功添加了证书

开启webdav访问

2、安装opkg

opkg是一个第三方的包管理器,可以像apt一样在终端很方便的安装各类软件。

root执行

wget -O - http://bin.entware.net/x64-k3.2/installer/generic.sh | /bin/sh

根据安装后的提示进行操作:

修改环境变量
vim /etc/profile

找到这一行

在结尾添加

:/opt/bin:/opt/sbin

添加完之后

添加计划任务

/opt/etc/init.d/rc.unslung start

完成之后重启群晖

此时已经安装好opkg了

3、安装配置rclone挂载alist

安装rclone,新建remote
opkg install rclone



rclone config

接下来根据提示操作,其实并不复杂

root@RiNG:~# rclone config
No remotes found, make a new one?
n) New remote
s) Set configuration password
q) Quit config
n/s/q> n #新建remote

Enter name for new remote.
name> AList  #给新建的remote起个名字,随便什么都可以

Option Storage.
Type of storage to configure.
Choose a number from below, or type in your own value.
 1 / 1Fichier
   \ (fichier)
 2 / Akamai NetStorage
   \ (netstorage)
 3 / Alias for an existing remote
   \ (alias)
 4 / Amazon S3 Compliant Storage Providers including AWS, Alibaba, ArvanCloud, Ceph, ChinaMobile, Cloudflare, DigitalOcean, Dreamhost, GCS, HuaweiOBS, IBMCOS, IDrive, IONOS, LyveCloud, Leviia, Liara, Linode, Magalu, Minio, Netease, Petabox, RackCorp, Rclone, Scaleway, SeaweedFS, StackPath, Storj, Synology, TencentCOS, Wasabi, Qiniu and others
   \ (s3)
 5 / Backblaze B2
   \ (b2)
 6 / Better checksums for other remotes
   \ (hasher)
 7 / Box
   \ (box)
 8 / Cache a remote
   \ (cache)
 9 / Citrix Sharefile
   \ (sharefile)
10 / Combine several remotes into one
   \ (combine)
11 / Compress a remote
   \ (compress)
12 / Dropbox
   \ (dropbox)
13 / Encrypt/Decrypt a remote
   \ (crypt)
14 / Enterprise File Fabric
   \ (filefabric)
15 / FTP
   \ (ftp)
16 / Files.com
   \ (filescom)
17 / Gofile
   \ (gofile)
18 / Google Cloud Storage (this is not Google Drive)
   \ (google cloud storage)
19 / Google Drive
   \ (drive)
20 / Google Photos
   \ (google photos)
21 / HTTP
   \ (http)
22 / Hadoop distributed file system
   \ (hdfs)
23 / HiDrive
   \ (hidrive)
24 / ImageKit.io
   \ (imagekit)
25 / In memory object storage system.
   \ (memory)
26 / Internet Archive
   \ (internetarchive)
27 / Jottacloud
   \ (jottacloud)
28 / Koofr, Digi Storage and other Koofr-compatible storage providers
   \ (koofr)
29 / Linkbox
   \ (linkbox)
30 / Local Disk
   \ (local)
31 / Mail.ru Cloud
   \ (mailru)
32 / Mega
   \ (mega)
33 / Microsoft Azure Blob Storage
   \ (azureblob)
34 / Microsoft Azure Files
   \ (azurefiles)
35 / Microsoft OneDrive
   \ (onedrive)
36 / OpenDrive
   \ (opendrive)
37 / OpenStack Swift (Rackspace Cloud Files, Blomp Cloud Storage, Memset Memstore, OVH)
   \ (swift)
38 / Oracle Cloud Infrastructure Object Storage
   \ (oracleobjectstorage)
39 / Pcloud
   \ (pcloud)
40 / PikPak
   \ (pikpak)
41 / Pixeldrain Filesystem
   \ (pixeldrain)
42 / Proton Drive
   \ (protondrive)
43 / Put.io
   \ (putio)
44 / QingCloud Object Storage
   \ (qingstor)
45 / Quatrix by Maytech
   \ (quatrix)
46 / SMB / CIFS
   \ (smb)
47 / SSH/SFTP
   \ (sftp)
48 / Sia Decentralized Cloud
   \ (sia)
49 / Storj Decentralized Cloud Storage
   \ (storj)
50 / Sugarsync
   \ (sugarsync)
51 / Transparently chunk/split large files
   \ (chunker)
52 / Uloz.to
   \ (ulozto)
53 / Union merges the contents of several upstream fs
   \ (union)
54 / Uptobox
   \ (uptobox)
55 / WebDAV
   \ (webdav)
56 / Yandex Disk
   \ (yandex)
57 / Zoho
   \ (zoho)
58 / premiumize.me
   \ (premiumizeme)
59 / seafile
   \ (seafile)
Storage> 55  #选择webdav,也就是55号,alist只支持通过webdav挂载 
#注意!!!这个编号随着更新是会变的,看清楚webdav是几号,不要无脑输入55!

Option url.
URL of http host to connect to.
E.g. https://example.com.
Enter a value.
url> https://localhost:5244/dav #注意/dav是必须加的

Option vendor.
Name of the WebDAV site/service/software you are using.
Choose a number from below, or type in your own value.
Press Enter to leave empty.
 1 / Fastmail Files
   \ (fastmail)
 2 / Nextcloud
   \ (nextcloud)
 3 / Owncloud
   \ (owncloud)
 4 / Sharepoint Online, authenticated by Microsoft account
   \ (sharepoint)
 5 / Sharepoint with NTLM authentication, usually self-hosted or on-premises
   \ (sharepoint-ntlm)
 6 / rclone WebDAV server to serve a remote over HTTP via the WebDAV protocol
   \ (rclone)
 7 / Other site/service or software
   \ (other)
vendor> 7  #alist不属于上述类型,因此选择others

Option user.
User name.
In case NTLM authentication is used, the username should be in the format 'Domain\User'.
Enter a value. Press Enter to leave empty.
user> #这里输入你的alist用户名

Option pass.
Password.
Choose an alternative below. Press Enter for the default (n).
y) Yes, type in my own password
g) Generate random password
n) No, leave this optional password blank (default)
y/g/n> y  #是的,输入自己的密码
Enter the password:
password: #输入你的alist密码
Confirm the password:
password: #确认密码

Option bearer_token.
Bearer token instead of user/pass (e.g. a Macaroon).
Enter a value. Press Enter to leave empty.
bearer_token> 

Edit advanced config?
y) Yes
n) No (default)
y/n> n  #不更改高级选项

Configuration complete.
Options:
- type: webdav
- url: https://192.168.1.141:5244/dav
- vendor: other
- user: 你的alist用户名
- pass: *** ENCRYPTED ***
Keep this "AList" remote?
y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
y/e/d> y  #是的,以上设置没有问题

Current remotes:

Name                 Type
====                 ====
AList                webdav

e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q> q  #退出rclone配置

创建好一个remote之后,我们还需要配置连接到它

安装fuse3

rclone挂载依赖fuse3,先安装一下

opkg install fuse3-utils
挂载AList

事先新建好用来挂载的文件夹

 找一个共享文件夹新建一个AList.sh,注意不要放在用来挂载AList的目录中

比如我放在/volume2/Share文件夹里面

vim /volume2/Share/AList.sh

输入以下内容

#!/bin/bash

export PATH=/opt/bin:/opt/sbin:/usr/local/bin:/usr/bin:/bin

sleep 2              # Alist开机自启需要时间,所以小睡2秒再挂载

rclone mount AList:/ /volume1/群晖网盘/AList \
--copy-links \
--no-gzip-encoding \
--no-check-certificate \
--allow-other \
--allow-non-empty \
--umask 000 \
--use-mmap \
--vfs-cache-mode full

chmod +x /volume2/Share/AList.sh #给予可执行权限
/volume2/Share/AList.sh          #运行一下试试看

像这样卡住不动就是挂载成功了,因为我们没有加后台运行的参数

切回群晖看一眼

在Windows11上面也可以顺利访问

关闭群晖的file station和Windows11的文件资源管理器,返回终端,按ctrl+c取消挂载

添加计划任务

添加计划任务以实现开机自动挂载

添加完可以尝试运行一下

挂载成功

接下来重启群晖看看能不能自动挂载

挂载失败了。其实对于我的配置来说,sleep时间要设为3才能挂载成功

再次重启群晖

这次就挂载成功了。对于不同的机器,需要sleep的时间也不一样,你的机器也许只要sleep1秒就能挂载,也有可能要sleep1分钟才能挂载。如果实在找不到挂载失败的原因,也可以照上图提示添加日志,自行查错。


http://www.niftyadmin.cn/n/5860785.html

相关文章

【Blender】二、建模篇--05,阵列修改器与晶格形变

阵列修改器是bender里面一个比较常用的修改器,所以我们单独开口来讲,我们会先从几片树叶出发,然后我们用阵列修改器把这几片树叶变成这样的造型和这样的造型。这两个造型分别就代表着阵列修改器最常用的两种偏移方法,我们现在就开始我们先来做几个树叶。 1.树叶建模 首先…

npm、pnpm和yarn有什么区别

1. 性能和速度 npm:在较早的版本中,速度较慢,尤其是在安装大型依赖集时。自npm 5以后的版本引入了缓存机制,性能有所提升。yarn:由Facebook开发,主要目标是提高安装速度。使用了缓存和并行安装(…

Matplotlib 高级图表绘制与交互式可视化(ipywidgets)

目录: ipywidgets 介绍 1. 什么是 ipywidgets 直接开始: 动态调整正弦波频率 随机散点图 启用交互式模式 使用滑块和下拉菜单调整图表样式 使用布局管理器创建复杂界面 使用动画创建动态图表 最后: 综合示例:动态仪表盘 ipywidgets 介绍 1. 什么是 ipywidgets i…

Vue 中组件通信的方式有哪些,如何实现父子组件和非父子组件之间的通信?

一、父子组件通信&#xff08;垂直通信&#xff09; 1. Props 传值&#xff08;父 → 子&#xff09; 实现方案&#xff1a; <!-- Parent.vue --> <template><Child :user"userData" /> </template><script setup> import { ref } …

[kubelet-check] It seems like the kubelet isn‘t running or healthy.

执行k8s时报错&#xff1a; [kubelet-check] It seems like the kubelet isn’t running or healthy. [kubelet-check] The HTTP call equal to ‘curl -sSL http://localhost:10248/healthz’ failed with error: Get "http://localhost:10248/heal ** 解决办法如下&a…

Lineageos 22.1(Android 15)Launcer简单调整初始化配置

一、前言 Launcer的初始化配置主要在如下的xml文件夹下&#xff0c;默认读取的5x5 这里我们把device_profiles调整一下&#xff0c;然后新建一个default_workspace_my.xml作为我们自己的配置就行。 二、配置 注意Lineageos 的Launcer是在lineageos/packages/apps/Trebuchet…

Python数据结构实战:链表的构建与操作

Python数据结构实战&#xff1a;链表的构建与操作 一、链表&#xff08;LinkedList&#xff09;基础 1. 定义与特性 链表是一种动态数据结构&#xff0c;其特点如下&#xff1a; 元素&#xff08;节点&#xff09;通过指针连接&#xff0c;内存空间非连续插入/删除时间复杂…

Python学习心得面向对象的三大特征

一、封装 我们清楚的知道有些内容我们可以去开源&#xff0c;但是有内容我们需要去限制用户对其的操作&#xff0c;以至于维持整个系统的正常操作。下面要讲的内容就是关于权限控制的知识。 1.封装的定义&#xff1a;隐藏内部细节&#xff0c;对外是提供一些操作方式。 2.权…