#备份软件源列表
cp /etc/apt/sources.list /etc/apt/sources.list.bak
nano /etc/apt/sources.list
deb http://mirrors.163.com/debian/ bullseye main non-free contrib
deb http://mirrors.163.com/debian/ bullseye-updates main non-free contrib
deb http://mirrors.163.com/debian/ bullseye-backports main non-free contrib
deb-src http://mirrors.163.com/debian/ bullseye main non-free contrib
deb-src http://mirrors.163.com/debian/ bullseye-updates main non-free contrib
deb-src http://mirrors.163.com/debian/ bullseye-backports main non-free contrib
#deb http://mirrors.163.com/debian-security/ bullseye/updates main non-free contrib
#deb http://mirrors.ustc.edu.cn/debian-security/ bullseye/updates main non-free contrib
#deb-src http://mirrors.163.com/debian-security/ bullseye/updates main non-free contrib
#deb-src http://mirrors.ustc.edu.cn/debian-security/ bullseye/updates main non-free contrib
deb http://mirrors.ustc.edu.cn/debian-security/ stable-security main non-free contrib
deb-src http://mirrors.ustc.edu.cn/debian-security/ stable-security main non-free contrib
apt-get update
安装NFS工具
apt update
apt install nfs-common
挂载命令
mount -t nfs 192.168.0.3:/volume1/Movie /mnt/share/Movie
查看是否挂载成功
df -h
或
cd /mnt/share/Movie
ls
必须先手动挂载成功后挂载相同的路径,然后设置开机自动挂载,否则重启失效。
设置为开机自动挂载
nano /etc/fstab
文件底部加入
192.168.0.3:/volume1/Movie /mnt/share/Movie nfs defaults 0 0
重启查看挂载情况
reboot
df-h
挂载成功
安装SMB工具
apt-get install cifs-utils
apt install samba
apt install samba-client
mkdir /mnt/share
尝试登陆
smbclient -L 192.168.0.3 -U conn
建立文件夹用于挂载
mkdir /mnt/share/Stock
mkdir /mnt/share/Movie
挂载命令
mount -o username=conn,password=xxx //192.168.0.3/Stock /mnt/share/Stock
mount -o username=conn,password=xxx //192.168.0.3/Movie /mnt/share/Movie
查看是否挂载成功
df -h
或
cd /mnt/share/Movie
ls
必须先手动挂载成功后挂载相同的路径,然后设置开机自动挂载,否则重启失效。
设置为开机自动挂载
nano /etc/fstab
文件底部加入
//192.168.0.3/Stock /mnt/share/Stock cifs defaults,username=conn,password=xxx
//192.168.0.3/Movie /mnt/share/Movie cifs defaults,username=conn,password=xxx
重启查看挂载情况
reboot
df-h
挂载成功
docker run -d --name=jellyfin -e PUID=1000 -e PGID=1000 -e TZ=Asia/Shanghai -p 8096:8096 -v /mnt/share:/media -v /root/jellyfin/config:/config --device /dev/dri:/dev/dri --restart unless-stopped nyanmisaka/jellyfin:latest
命令 | 解释 |
---|---|
-d | 后台运行容器,并返回容器ID |
–name=jellyfin | 容器命名为jellyfin |
-e PUID=1000 | 登录用户后在命令行输入id查看,环境变量PUID=1000 |
-e PGID=1000 | 登录用户后在命令行输入id查看,环境变量PGID=1000 |
-e TZ=Asia/Shanghai | 环境变量时区上海 |
-p 8096:8096 | 容器内端口映射到主机端口 |
-v /mnt/share:/media | 映射主机/mnt/share文件夹到docker的media文件夹 |
-v /root/jellyfin/config:/config | 映射主机/root/jellyfin/config文件夹到docker的config文件夹 |
–device /dev/dri:/dev/dri | 调用主机核显 |
–restart unless-stopped | 表示容器退出时总是重启,但是不考虑docker运行时就已经停止的容器 |
docker run -d --name watchtower -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower --cleanup --run-once
命令 | 解释 |
---|---|
-d | 后台运行容器,并返回容器ID |
–name=watchtower | 容器命名为watchtower |
-v /var/run/docker.sock:/var/run/docker.sock | 映射主机/var/run/docker.sock到docker的/var/run/docker.sock |
–cleanup | 每次更新都会把旧的镜像清理掉 |
–run-once | 手动启动watchtower更新,完成后自动退出 |
安装
apt-get update && apt install intel-gpu-tools -y
查看gpu监控
intel_gpu_top
watch cat /sys/devices/system/cpu/cpu[0-9]*/cpufreq/scaling_cur_freq
添加PCI设备后,原网卡的序号被添加的PCI顶替,导致原来网卡和添加的PCI设备都不能使用。
解决方法
查看网卡名:ifconfig
将两处网卡名称修改正确
nano /etc/network/interfaces
reboot
en代表Ethernet(以太网)
p1s0代表PCI接口的物理位置为(1, 0), 其中横座标代表bus,纵座标代表slot