个人NAS方案,终端字符界面浏览器



前言

个人nas需要满足的需求:

  1. 可以通过浏览器访问nas中的文件、图片、视频
  2. 支持像访问本地分区一样访问nas,对应用程序来讲文件在nas和本地是透明的

需求分析

硬件方面可用arm开发版+外置大硬盘
软件方面采用 Linux系统 + 一系列服务程序实现

总结一下就是,开发板安装Linux系统,作为服务端,对外提供大容量硬盘的访问

对于需求1,可找到满足要求的开源http服务、流媒体服务等,并且软件要尽量简单,最好可直接安装到Linux

对于需求2,可以用文件共享的方式采用smb协议,Linux安装smb服务,即可支持Windows、Linux、macos等客户端的访问

Linux配置smb服务

- Linux服务端配置

 sudo apt-get install samba

该服务会启动两个守护进程
smbd.service, nmbd.service
通过配置文件 /etc/samb/smb.conf 配置要共享的目录、权限、设置用户等

配置示例:

[global]
    workgroup = WORKGROUP
    server string = Samba Server

    map to guest = Bad User
    passdb backend = tdbsam
    load printers = no

    # 协议兼容性(Windows 10+ 建议设置)


    # 日志配置
    log file = /var/log/samba/log.%m
    max log size = 1000

# 共享用户家目录(可选)
[homes]
    comment = Home Directories
    browseable = yes
    writable = yes
    valid users = no

# 自定义共享目录
[shared]
    comment = Public Shared Folder
    path = /var/smbd
    writable = yes
    browsable = yes
    guest ok = yes

通过testparm指令检查配置是否合法

重启服务使之生效 sudo systemctl restart smbd.service

- windows客户端配置

windows需要开启网络发现功能
win+R 调出运行框,输入smb服务地址
在这里插入图片描述

选择添加一个网络位置功能,网络位置为\\sherver\share

在这里插入图片描述

Linux安装流媒体服务

EMBY: https://emby.media/linux-server.html

推荐immich

Successfully deployed Immich!
You can access the website or the mobile app at http://192.168.31.138:2283
---------------------------------------------------
If you want to configure custom information of the server, including the database, Redis information, or the backup (or up                                                                                                                                                                load) location, etc.

  1. First bring down the containers with the command 'docker compose down' in the immich-app directory,

  2. Then change the information that fits your needs in the '.env' file,

  3. Finally, bring the containers back up with the command 'docker compose up --remove-orphans -d' in the immich-app directory

在终端界面中浏览网页

在这里插入图片描述

https://www.bilibili.com/video/BV1HiNteDEUS/?spm_id_from=333.1007.tianma.2-1-4.click&vd_source=958f6d67dcb53d9bc90830f02a9c75a4
https://www.brow.sh/
https://github.com/fathyb/carbonyl


references

https://blog.youkuaiyun.com/xuetaoxuetao/article/details/78857106
https://emby.media/
少数派家庭NAS https://sspai.com/post/88810
olimi的博客 https://olimi.icu/article/53f13921-9ab3-45c2-89f1-cb9ae6d83a60
免费开源图片图库对比 https://meichthys.github.io/foss_photo_libraries/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值