返回文章

文章 2025

啊鸡儿折腾 NAS 之《媒体管理篇》

NAS 媒体管理

NASPVEStorageMedia
本文目录4
  1. 简介
  2. 开始吧
  3. a. LXC 容器准备
  4. Reference

简介

接上篇,在媒体 SMB 已经准备好的情况下,需要用到一些媒体管理软件来提升使用体验:

  • 照片和视频类:Immich,这里不选择 DSM Photo是因为不想依赖不太稳定的黑群晖系统

  • 电影电视剧类:jellyfin

开始吧

a. LXC 容器准备

创建容器

image-3938d664.png

image-1e368560.png

image-f36c5732.png

更改时区
shell
date
timedatectl set-timezone Asia/Shanghai
换源
shell
# source 换成清华源
vi /etc/apt/sources.list
text
# https://mirrors.tuna.tsinghua.edu.cn/help/debian/
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware

deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware

image-a09ea90c.png

shell
# 更新软件源
apt-get update && apt-get upgrade -y

# 安装常用命令
apt-get install vim
安装 docker
shell
# Uninstall old versions
for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do pt-get remove $pkg; done

# Add Docker's official GPG key:
apt-get update
apt-get install ca-certificates curl
install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
chmod a+r /etc/apt/keyrings/docker.asc

# Add the repository to Apt sources:
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \
  $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
  tee /etc/apt/sources.list.d/docker.list > /dev/null
apt-get update

# 安装 Docker
apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

# 启动 docker 并设为开机自启动
systemctl start docker
systemctl enable docker

# 配置源
vim /etc/docker/daemon.json

image-08a82b93.png

shell
# 重新启动 docker
systemctl daemon-reload
systemctl restart docker
安装 Portainer
shell
# 创建数据卷
docker volume create portainer_data

# 查看数据卷的存储地址
ls -al /var/lib/docker/volumes/

image-6bcafc7a.png

shell
# 拉取 portainer 并运行
docker run -d -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce 

Reference

https://www.oryoy.com/news/ru-he-zai-pve-huan-jing-zhong-an-zhuang-docker-bing-pei-zhi-tu-xing-hua-guan-li-jie-mian.html

返回首页
上一篇啊鸡入坑硬件之《ESP32³ Spectrum 律动盒子》下一篇啊鸡折腾 NAS 之《存储与系统篇》

Discussion

留言与讨论

想法、补充和不同意见都欢迎。