- 获取OneDrive
申请微软的Office 365开发者计划,地址:免费获得一年的21TB OneDrive和Microsoft Office 365企业版本
- 安装
1、安装宝塔
#Centos系统
yum install -y wget && wget -O install.sh http://download.bt.cn/install/install.sh && sh install.sh
#Ubuntu系统
wget -O install.sh http://download.bt.cn/install/install-ubuntu.sh && sudo bash install.sh
#Debian系统
wget -O install.sh http://download.bt.cn/install/install-ubuntu.sh && bash install.sh
安装完成后,进入面板安装PHP 5.6+、Nginx之类的必要建站组件
2、安装OneIndex
先添加域名,然后上传程序文件到网站根目录/www/wwwroot/xx.com,将文件解压出来,并设置config/、cache/可读写权限,程序下载:OneIndex.zip。
再点击域名设置,添加Nginx伪静态:
if (!-f $request_filename){
set $rule_0 1$rule_0;
}
if (!-d $request_filename){
set $rule_0 2$rule_0;
}
if ($rule_0 = "21"){
rewrite ^/(.*)$ /index.php?/$1 last;
}
后台地址:https://xx.com/?/admin,默认密码:oneindex。
3、安装Aria2
这里用的逗比的脚本,使用命令:
wget -N --no-check-certificate https://raw.githubusercontent.com/ToyoDAdoubi/doubi/master/aria2.sh && chmod +x aria2.sh && bash aria2.sh
4、安装AriaNg
和安装OneIndex差不多
- 配置Aria2上传
1、安装脚本
安装curl,用于访问API:
#Ubuntu和Debian系统
apt-get install -y curl
#Centos系统
yum install curl -y
运行命令安装脚本:
wget --no-check-certificate -q -O /tmp/OneDrive.sh "https://raw.githubusercontent.com/iiiiiii1/OneDrive/master/OneDrive.sh" && chmod +x /tmp/OneDrive.sh && bash /tmp/OneDrive.sh
本脚本需要三个参数Client ID、Secret、Reply URL,均需要在/usr/local/etc/OneDrive/onedrive.cfg文件里修改
2、运行命令onedrive -a,将返回的网址复制到浏览器打开(此处需要梯子),再登陆你的OneDrive for Business账号,登陆成功后复制地址栏中的地址,并提取code的字段(就是code=后面至&前面),粘贴到SSH客户端里,敲回车键即可。
如果返回以下字段:It seems like we have a refresh token, so we are ready to go,那就恭喜你,设置成功!
Aria2自动上传