Aria2+AriaNg+oneindex+rclone+onedrive

oneindex
# cd /var/www/html/
# git clone https://github.com/donwa/oneindex.git
Cloning into 'oneindex'...
remote: Counting objects: 222, done.
remote: Compressing objects: 100% (126/126), done.
remote: Total 222 (delta 117), reused 188 (delta 87), pack-reused 0
Receiving objects: 100% (222/222), 51.07 KiB | 25.00 KiB/s, done.
Resolving deltas: 100% (117/117), done.
# mv oneindex/.git ./ && rm -rf oneindex
# git reset --hard

设置权限(必须 777,不能 755):

# chown -R www:www *
# chmod 777 config config/base.php cache

Aria2+AriaNg
wget -N --no-check-certificate https://softs.loan/Bash/aria2.sh && chmod +x aria2.sh && bash aria2.sh

rclone

客户端授权
在本地Windows电脑上下载rclone,下载地址:https://rclone.org/downloads/。然后解压出来,比如我解压到D盘,文件夹命名rclone,此时点击Win+R,然后输入cmd,确定。再输入以下命令:

cd /d d:\rclone
rclone authorize “onedrive”
会出现以下信息:

C:\Users\Administrator>cd /d d:\rclone

d:\rclone>rclone authorize “onedrive”
2018/01/23 20:28:56 NOTICE: Config file “C:\\Users\\Administrator\\.config\\rclo
ne\\rclone.conf” not found – using defaults
Choose OneDrive account type?
* Say b for a OneDrive business account
* Say p for a personal OneDrive account
b) Business
p) Personal
b/p> p #这里选择个人版,你想挂载Business就选择b
If your browser doesn’t open automatically go to the following link: http://127.
0.0.1:53682/auth #接下来会弹出浏览器,要求你登录账号进行授权
Log in and authorize rclone for access
Waiting for code…
Got code
Paste the following into your remote machine —>
{“access_token”:”xxxx”} #请复制{xx}整个内容,后面需要用到
<—End paste


wget https://downloads.rclone.org/rclone-current-linux-amd64.zip 
unzip rclone-current-linux-amd64.zip 
chmod 0777 ./rclone-*/rclone 
cp ./rclone-*/rclone /usr/bin/ 
rm -rf ./rclone-*

curl -O http://downloads.rclone.org/rclone-current-linux-amd64.zip 
unzip rclone-current-linux-amd64.zip cd rclone-*-linux-amd64 
cp rclone /usr/sbin/ 
chown root:root /usr/sbin/rclone 
chmod 0755 /usr/sbin/rclone

rclone config

第一步:配置 config rclone 
第二部:选择新建 n # 新建配置 
第三步:起名字,这个随意填写,例如 MJJ MJJ #起名字 
第四步:选择存储类型,实例中选择的是 9 1 亚马逊云盘 2 亚马逊 S3 3 BackBlaze B2,这个后面也会写文章介绍 4 Box 网盘 5 Dropbox 6 不是很懂是啥 7 FTP 8 谷歌云存储(不是谷歌云盘) 9 谷歌云盘 Google Drive 10 Hubic,OVH 旗下存储服务,有介绍过, 免费最高 55G https://liyuans.com/archives/hubic.html 11 本地硬盘 12 Azure 云存储 13 微软 Onedrive(注意只支持个人版,不支持商业版、教育版) 14 Openstack Swift,不了解 15 Qing Cloud 青云 16 SSH 连接,也就是说支持 VPS 同步! 17 Yandex 网盘,俄罗斯的,有 10G 大小免费额度 18 HTTP 链接 
第五步:谷歌应用 ID,留空 
第六步:谷歌应用密钥,留空 
第七步:自动配置,选择手动 n # 手动配置 
第八步:复制链接到浏览器,登录谷歌,获取验证码 
第九步:填写验证码 
第十步:确认配置 y # 确认配置 
第十一步:退出配置 q # 退出配置

挂载
#新建本地文件夹,路径自己定,即下面的LocalFolder 
mkdir /root/OneDrive #挂载为磁盘 
rclone mount DriveName:Folder LocalFolder --copy-links --no-gzip-encoding --no-check-certificate --allow-other --allow-non-empty --umask 000

卸载
fusermount -qzu LocalFolder