常规方式部署EMBY教程(内附Rclone教程)

系列 - EMBY系列教程
警告
本文最后更新于 2022-02-07,文中内容可能已过时。

Emby常规部署方式

https://www.unvone.com/71884.html
1
curl https://rclone.org/install.sh | sudo bash

https://img.boalk.com/i/2021/11/29/MKVNA64Hh9pSyL1.png

1
rclone config

https://img.boalk.com/i/2021/11/29/ZoP2Q31TisCqrxD.png

name emby 随意取 但是后面的代码也会相应改变

https://img.boalk.com/i/2021/11/29/gV9UiYGe7H83SMN.png

Choose a number from below, or type in your own value 选谷歌 (13) 可能会因为版本的不同而改变 注意选择 Google drive

https://img.boalk.com/i/2021/11/29/Na9SXzGtmQAdj6i.png

client_id> 直接回车

https://img.boalk.com/i/2021/11/29/wCq6AnMERiuHrVW.png

client_secret> 直接回车

https://img.boalk.com/i/2021/11/29/PamYVGJy6lhAUrq.png

Choose a number from below, or type in your own value scope> 1 选1 有最大的使用权限

https://img.boalk.com/i/2021/11/29/rC6X2EqkiLxRW9N.png

root_folder_id>直接回车

service_account_file>直接回车

https://img.boalk.com/i/2021/11/29/pFydw6GDogvskfb.png

Edit advanced config? (y/n) y) Yes n) No (default) y/n> n #不用别的高级配置

https://img.boalk.com/i/2021/11/29/BIAnVqHJwvUejQC.png

Use auto config?

  • Say Y if not sure
  • Say N if you are working on a remote or headless machine y) Yes (default) n) No y/n> n #不用自动配置

https://img.boalk.com/i/2021/11/29/qNt9aBfJ6Dij1p2.png

Please go to the following link: https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Log in and authorize rclone for access

https://img.boalk.com/i/2021/11/29/n4VNhCgEKqIbBzH.png

登录谷歌账号授权

https://img.boalk.com/i/2021/11/29/s6Hed4WFwfcpxNi.png

https://img.boalk.com/i/2021/11/29/s6Hed4WFwfcpxNie5fb11ad0fe92196.png

https://img.boalk.com/i/2021/11/29/fiwZjzWc6Qvp9k3.png

https://img.boalk.com/i/2021/11/29/FWLVNj6E13pfdUK.png

Enter verification code>贴入你获取到的key

https://img.boalk.com/i/2021/11/29/89sadiPwymU5gec.png

Configure this as a team drive? y) Yes n) No (default) y/n> y

https://img.boalk.com/i/2021/11/29/V5ibHOk3MzZutJo.png

Choose a number from below, or type in your own value

1 / 共享硬盘 \ “XXXXXXXXXXXXXXXXXXX”

2 / 精英挂载NO1_HL02 \ “XXXXXXXXXXX”

3 / SYNC_115网盘 \ “XXXXXXXXXXXXXXX”

https://img.boalk.com/i/2021/11/29/wRr4mv9BMkLVTuH.png

y) Yes this is OK (default) e) Edit this remote d) Delete this remote y/e/d> y

https://img.boalk.com/i/2021/11/29/uFwDKNjnxtchEl5.png

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

https://img.boalk.com/i/2021/11/29/1XKYjDbVO7eRpnB.png

创建一个挂载目录,我们在/home/目录下创建gdrive文件夹作为挂载目录。

1
mkdir -p /home/gdrive

https://img.boalk.com/i/2021/11/29/ra5LEF6GuUnKoCN.png

挂载Google Drive

1
2
3
4
5
6
7
8
9
/usr/bin/rclone mount emby: /home/gdrive \
 --umask 0000 \
 --default-permissions \
 --allow-non-empty \
 --allow-other \
 --buffer-size 32M \
 --dir-cache-time 12h \
 --vfs-read-chunk-size 64M \
 --vfs-read-chunk-size-limit 1G &

https://img.boalk.com/i/2021/11/29/image.png

上面这些可以根据需要自己改参数,如果VPS配置高可以吧数字改大一点。

如果出现如下提示:

https://img.boalk.com/i/2021/11/29/image9e996b1197f5b5c2.png

运行图下命令之后从新挂载

CentOS系统

1
yum install fuse -y

debian/Ubuntu系统

1
apt-get install fuse 
1
df -h

https://img.boalk.com/i/2021/11/29/image58ea98180f3c1b64.png

VPS终端运行如下命令就可以了

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
cat > /etc/systemd/system/rclone.service <<EOF
[Unit]
Description=Rclone
AssertPathIsDirectory=LocalFolder
After=network-online.target
 
[Service]
Type=simple
ExecStart=/usr/bin/rclone mount emby: /home/gdrive \
 --umask 0000 \
 --default-permissions \
 --allow-non-empty \
 --allow-other \
 --buffer-size 32M \
 --dir-cache-time 12h \
 --vfs-read-chunk-size 64M \
 --vfs-read-chunk-size-limit 1G
ExecStop=/bin/fusermount -u LocalFolder
Restart=on-abort
User=root
 
[Install]
WantedBy=default.target
EOF

运行完上面的代码就可以用如下的命令进行控制了。

1
2
3
systemctl start rclone   #启动
systemctl stop rclone    #停止
systemctl enable rclone  #允许开机自动启动

官网:Emby – The open media solution

https://img.boalk.com/i/2021/11/29/20211129150322.png

Emby是市面上为数不多的私人多媒体服务器软件,它有最强大的影片搜刮能力(没有之一),并且可以非常便捷远程维护其媒体库。作为一个完美的媒体播放解决方案,它提供了包括但不限于:播放、转码、刮削媒体信息、管理资料库、电视直播等功能。使用体验非常舒适,并且提供全平台客户端和web端支持。

进入官网后,点击【Download】–【Linux】

https://img.boalk.com/i/2021/11/29/202111291511275e95b98ab7e31d61.png

我使用的是Debian X64系统,安装方法如下(其他Linux系统同理):

https://img.boalk.com/i/2021/11/29/20211129151232.png

具体方法如下

1
apt-get install wget && wget https://github.com/MediaBrowser/Emby.Releases/releases/download/4.5.2.0/emby-server-deb_4.5.2.0_amd64.deb

https://img.boalk.com/i/2021/11/29/20211129151247.png

1
dpkg -i emby-server-deb_4.5.2.0_amd64.deb

https://img.boalk.com/i/2021/11/29/20211129151257.png

如果没有报错,安装就完成了。

浏览器打开,配置看图操作。

1
http://VPS的IP地址:8096

https://img.boalk.com/i/2021/11/29/20211129151308.png

https://img.boalk.com/i/2021/11/29/20211129151319.png

https://img.boalk.com/i/2021/11/29/20211129151335.png

这里暂时不添加媒体库

https://img.boalk.com/i/2021/11/29/20211129151357.png

https://img.boalk.com/i/2021/11/29/20211129151411.png

https://img.boalk.com/i/2021/11/29/20211129151422.png

https://img.boalk.com/i/2021/11/29/20211129151433.png

https://img.boalk.com/i/2021/11/29/20211129151444.png

进入Emby后,我们发现里面什么都没有,是因为我们没有添加媒体库。我们点击右侧的【设置】开始添加媒体库。

https://img.boalk.com/i/2021/11/29/20211129151453.png

点击左侧的【媒体库】,参照下命的图片设置。

https://img.boalk.com/i/2021/11/29/20211129151503.png

https://img.boalk.com/i/2021/11/29/20211129151516.png

https://img.boalk.com/i/2021/11/29/20211129151530.png

https://img.boalk.com/i/2021/11/29/20211129151543.png

https://img.boalk.com/i/2021/11/29/20211129151553.png

https://img.boalk.com/i/2021/11/29/20211129151606.png

https://img.boalk.com/i/2021/11/29/20211129151615.png

https://img.boalk.com/i/2021/11/29/20211129151626.png

https://img.boalk.com/i/2021/11/29/20211129151635.png

https://img.boalk.com/i/2021/11/29/20211129151644.png

https://img.boalk.com/i/2021/11/29/20211129151656.png

到这里Emby的一个媒体库就添加完成了,我们可以用同样的方法添加其他的媒体库。

添加完成媒体库需要等待Emby检索数据,等一下就行了。

效果如图:

https://img.boalk.com/i/2021/11/29/20211129151705.png

Emby、不限于于如此,还可以播放音乐、电视直播等功能。感兴趣可以自己研究一下。