操作步骤:

首先拥有一台服务器

搬瓦工

安装crul:

1
$ yum update -y && yum install curl -y

安装arai2

1
$ wget -N git.io/aria2.sh && chmod +x aria2.sh && ./aria2.sh 

1.安装rclone:

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

1.1配置rclone

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
在vps上输入
"rclone config"
然后进行配置
输入"n" 然后"name"自己填一个 要记得 后面要用的
1 / 1Fichier \ "fichier"

2 / Alias for an existing remote \ "alias"

3 / Amazon Drive \ "amazon cloud drive"

4 / Amazon S3 Compliant Storage Provider (AWS, Alibaba, Ceph, Digital Ocean, Dreamhost, IBM COS, Minio, etc) \ "s3"

5 / Backblaze B2 \ "b2"

6 / Box \ "box"

7 / Cache a remote \ "cache"

8 / Citrix Sharefile \ "sharefile"

9 / Dropbox \ "dropbox"

10 / Encrypt/Decrypt a remote \ "crypt"

11 / FTP Connection \ "ftp"

12 / Google Cloud Storage (this is not Google Drive) \ "google cloud storage"

13 / Google Drive \ "drive"

14 / Google Photos \ "google photos"

15 / Hubic \ "hubic"

16 / In memory object storage system. \ "memory"

17 / JottaCloud \ "jottacloud"

18 / Koofr \ "koofr"

19 / Local Disk \ "local"

20 / Mail.ru Cloud \ "mailru"

21 / Mega \ "mega"

22 / Microsoft Azure Blob Storage \ "azureblob"

23 / Microsoft OneDrive \ "onedrive"

24 / OpenDrive \ "opendrive"

25 / Openstack Swift (Rackspace Cloud Files, Memset Memstore, OVH) \ "swift"

26 / Pcloud \ "pcloud"

27 / Put.io \ "putio"

28 / QingCloud Object Storage \ "qingstor"

29 / SSH/SFTP Connection \ "sftp"

30 / Sugarsync \ "sugarsync"

31 / Transparently chunk/split large files \ "chunker"

32 / Union merges the contents of several remotes \ "union"

33 / Webdav \ "webdav"

34 / Yandex Disk \ "yandex"

35 / http Connection \ "http"

36 / premiumize.me \ "premiumizeme"
这里选择"13"

lient_id"留空"

client_secret也"留空"

1 / Full access all files, excluding Application Data Folder. \ "drive"

2 / Read-only access to file metadata and file contents. \ "drive.readonly" / Access to files created by rclone only.

3 | These are visible in the drive website. | File authorization is revoked when the user deauthorizes the app. \ "drive.file" / Allows read and write access to the Application Data folder.

4 | This is not visible in the drive website. \ "drive.appfolder" / Allows read-only access to file metadata but

5 | does not allow any access to read or download file content. \ "drive.metadata.readonly"
这里选择"1"

.root_folder_id"留空"

service_account_file也"留"

Edit advanced config输入"n"

Use auto config也输入"n"
13.这里会显示一条链接 复制这条链接到浏览器 获取验证代码填入即可

14.输入"q" 退出 这样Rclone就与google Drive关联了

2.更改aria2设置

输入

1
nano /root/.aria2c/aria2.conf

找到“下载完成后执行的命令”,把clean.sh改为upload.sh
找到“下载暂停后的命令”,# 删除.aria2文件
#on-download-complete=/root/.aria2/delete.aria2.sh
在on-download-complete=/root/.aria2/delete.aria2.sh前加上#去掉
#on-download-complete=/root/.aria2/upload.sh前面的#
输入

1
nano /root/.aria2c/script.conf 

更改网盘名称 就是刚刚配置rclone的名称(不是谷歌网盘的名称)

网盘名称(RCLONE配置时填写的 name)
drive-name=OneDrive

更改下载目录
folder=’/DRIVEX/Download’
谷歌网盘里的文件夹,留空为网盘根目录

重启Aria2:

1
service aria2 restart

输入

1
/root/.aria2c/upload.sh

返回
success
就代表成功

备注:
aria2记得开启bt更新源 直接输入

1
wget -N git.io/aria2.sh && chmod +x aria2.sh && ./aria2.sh

选择自动更新bt源 这样下载就会快很多

3.配置谷歌网盘

输入

1
mkdir /google

(创建挂载目录)
输入

1
rclone mount name

(就是刚刚创建rclone的名称): /home/gdrive(这个是挂载目录 可以自己更改)

rclone mount google: /google --allow-other --allow-non-empty --vfs-cache-mode writes
22.如果出现2020/03/04 18:58:16 Fatal error: failed to mount FUSE fs: fusermount: exec: “fusermount”: executable file not found in $PATH 则需要安装fuse

输入

1
yum install -y fuse

(CentOS/Fedora 安装 fuse:)

输入

1
apt install -y fuse

(Ubuntu/Debian 安装 fuse)
安装好ruse 重新输入

1
rclone mount google: /google --allow-other --allow-non-empty --vfs-cache-mode writes

如果卡了就重新创建个界面

输入

1
df -h 

查询挂载状况
出现你所挂载的那个名称 内存是1p的 证明挂载成功

卸载磁盘:

1
fusermount -qzu LocalFolder

先将ExecStart后面的指令改成自己的 再将下面整段命令全部复制到终端一次执行

配置开机自动挂载:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
cat > /etc/systemd/system/rclone.service <<EOF
[Unit]
Description=Rclone
After=network-online.target

[Service]
Type=simple
ExecStart=/usr/bin/rclone mount emby:xiaoqingxin LocalFolder \
--umask 0000 \
--default-permissions \
--allow-non-empty \
--allow-other \
--transfers 4 \
--buffer-size 32M \
--low-level-retries 200
Restart=on-abort
User=root

[Install]
WantedBy=default.target
EOF

使用systemctl来启动rclone

1
systemctl start rclone

设置开机自启:

1
systemctl enable rclone

4.安装emby

输入

1
yum install https://github.com/MediaBrowser/Emby.Releases/releases/download/4.5.2.0/emby-server-rpm_4.5.2.0_x86_64.rpm

输入

1
2
3
yum localinstall emby-server-rpm_4.5.2.0_x86_64.rpm
systemctl status emby-server.service
netstat -anp | grep 8096

在浏览器上输入
http://ip:8096
然后就成功了

教程到此结束 欢迎多多提出建议 谢谢!!!!!