云服务器使用EmbyServer及挂载Google Drive
本文最后更新于 281 天前,其中的信息可能已经有所发展或是发生改变。

1.安装emby

wget https://github.com/MediaBrowser/Emby.Releases/releases/download/4.4.2.0/emby-server-deb_4.4.2.0_amd64.deb

dpkg -i emby-server-deb_4.4.2.0_amd64.deb

接下来浏览器输入ip:8096

若成功应出现 Emby LOGO

2.挂载Google Drive

1.安装rclone

curl https://rclone.org/install.sh | sudo bash

2. 配置

rclone config

接下来根据此顺序输入

o remotes found - make a new one
n) New remote
s) Set configuration password
q) Quit config
n/s/q> n   //输入n

name emby  //随意输入,如此处改变,后面的代码也会相应改变

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

13 //可能会因为版本的不同而改变 注意选择 Google drive

client_id>  //直接回车

------

client_secret>  //直接回车

------

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

------

ID of the root folder
Leave blank normally.

Fill in to access "Computers" folders (see docs), or for rclone to use
a non root folder as its starting point.

Note that if this is blank, the first time rclone runs it will fill it
in with the ID of the root folder.

Enter a string value. Press Enter for the default ("").
root_folder_id>  //空,直接回车。空是跟路径如果想用别的根路径

------

Service Account Credentials JSON file path
Leave blank normally.
Needed only if you want use SA instead of interactive login.
Enter a string value. Press Enter for the default ("").
service_account_file> //直接回车

------

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

------

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  //因为我们是vps操作,不能auto config
Please go to the following link: [https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx](https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/)
//访问此网址,用又管理员权限的账号登录
Log in and authorize rclone for access
Enter verification code> //贴入你获取到的key
Configure this as a team drive?
y) Yes
n) No (default)
y/n> y
Choose a number from below, or type in your own value
1 / xxxxx
\ "0XXXXXXXXXXXXXXXX"
2 / 电影
\ "0XXXXXXXXXXXXXXXX"
Enter a Team Drive ID>  //输入你需要选择的ID(1/2)
y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
y/e/d> y

------

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  //输入退出

3.挂载

mkdir -p /home/gdrive

/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 &
//此处我是emby,如果你在第二部的名称不是emby,请自行输入你的磁盘名称

4.查看挂载

df -h

5.自动挂载

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

6.设置启动

systemctl start rclone

7.开启启动

systemctl enable rclone

8.安装网络加速插件

wget -N --no-check-certificate "https://raw.githubusercontent.com/chiakge/Linux-NetSpeed/master/tcp.sh" && chmod +x tcp.sh && ./tcp.sh

9.虚拟内存

wget https://www.moerats.com/usr/shell/swap.sh && bash swap.sh

//此处建议是RAM两倍,例如我的内存是1024,则输入2048
暂无评论

发送评论 编辑评论


|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇

Warning: include(): Filename cannot be empty in /www/wwwroot/tangzhiqian.cn/wp-content/plugins/apoyl-baidupush/public/class-apoyl-baidupush-public.php on line 45

Warning: include(): Failed opening '' for inclusion (include_path='.:') in /www/wwwroot/tangzhiqian.cn/wp-content/plugins/apoyl-baidupush/public/class-apoyl-baidupush-public.php on line 45