Windows,Linux安装rclone,并配置挂载微软免费SharePoint 25T空间到本地(白嫖25T网盘指南)
Windows,Linux安装rclone,并配置挂载微软免费SharePoint 25T空间到本地(白嫖25T网盘指南)

Windows,Linux安装rclone,并配置挂载微软免费SharePoint 25T空间到本地(白嫖25T网盘指南)

内容纲要

Windows,Linux安装rclone,并配置挂载微软免费SharePoint 25T空间到本地(白嫖25T网盘指南)

介绍

在本教程中,我们将介绍如何在Linux操作系统上安装rclone,并使用其配置挂载微软SharePoint25T空间到本地。rclone是一个命令行程序,可以用于在不同的云存储服务之间传输文件,还可以将这些存储服务挂载到本地。这样你就拥有了一块25T的免费网盘,美滋滋( ´∀`)。(我只能说微软真的是个大善人)

准备

在开始安装rclone之前,您需要具备以下条件:

  • 一台运行Linux操作系统的计算机或者Windows
  • 管理员权限以安装软件
  • E5账号
  • 一个微软SharePoint账户
  • 安装好rclone

如果你没有E5或者不知道怎么创建,可以参考我之前的文章。

创建微软Office 365 E5订阅并永久续期

如果你不会安装rclone可以查看之前的相关文章

Linux环境下安装rclone配置google drive上传教程

SharePoint

什么是SharePoint

SharePoint是由Microsoft提供的一种团队协作工具,用于组织、共享和管理文件、数据和应用程序。它是一种强大的企业级工具,可用于创建团队网站、协作和共享文档、记录和跟踪任务等。

如何创建SharePoint和配置存储

要创建一个新的SharePoint站点和配置存储,请执行以下步骤:

  1. 登录Microsoft 365管理员中心,选择“管理中心”>“SharePoint”>“网站”>“活动站点”>“创建站点”。

    截屏2023-03-20 1.37.57

  2. 输入新站点的名称、URL、所有者和描述完成创建(其实也可以不用创建,直接用现成的也行)

  3. 在设置里面配置存储限制为手动并保存

    截屏2023-03-20 1.41.49

创建微软API(记录client_idclient_secret

下面是使用 Microsoft Azure 平台注册应用并获取 OneDrive API 的流程:

  1. 打开 https://portal.azure.com/ 并使用您的 Microsoft 帐户登录。

  2. 点击“应用注册”。

  3. 点击“新注册”创建一个新的应用程序注册。

  4. 输入您的应用程序名称,选择“A任何组织目录(任何 Azure AD 目录 – 多租户)中的帐户和个人 Microsoft 帐户(例如,Skype、Xbox)”作为受支持的帐户类型,重定向 URI (可选)选择web

    重定向 URI**填http://localhost

    **截屏2023-03-20 1.50.55

  5. 点击“注册”按钮以创建应用程序注册

  6. 在创建后,复制“Application (client) ID” (应用程序(客户端) ID)的值。

  7. 在“Certificates & secrets”选项卡中,点击“New client secret”按钮,并输入一个说明以创建客户端密钥。请注意,客户端密钥将仅在创建时显示,因此请务必复制并保存它(client_secret)。

  8. 点击“API permissions”选项卡,然后点击“Add a permission”按钮。

  9. 选择“Microsoft Graph”API,然后选择“Delegated permissions”。

  10. 在“Common permissions”下,选择“Files.ReadWrite.All”、“Files.Read.All”、“Files.Read”、Files.ReadWrite”、“offline_access”和“User.Read”权限。

    截屏2023-03-20 2.06.44

  11. 点击“代表MSFT授予管理员同意”按钮。

    现在,您已经成功注册了一个应用程序,并获得了一组凭据,用于在使用 OneDrive API 时进行身份验证。请注意,您需要使用“Application (client) ID”和“Client secret”这两个值来配置 rclone OneDrive remotes。

安装Rclone并挂载rclone

因为要调用浏览器认证,但是我们服务器没有浏览器,所以我们需要现在Windows上来获取token和配置文件信息。当然如果你是直接挂载到Windows上,配置好之后就可以直接用了,Linux直接复制Windows上配置好的信息就可以了。

打开Windows的CMD

输入 rclone config

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>n (选n)
Enter name for new remote.
name> sp1 (输入名称)

Option Storage.
Type of storage to configure.
Choose a number from below, or type in your own value.
1 / 1Fichier
\ (fichier)
2 / Akamai NetStorage
\ (netstorage)
3 / Alias for an existing remote
\ (alias)
4 / Amazon Drive
\ (amazon cloud drive)
5 / Amazon S3 Compliant Storage Providers including AWS, Alibaba, Ceph, China Mobile, Cloudflare, ArvanCloud, Digital Ocean, Dreamhost, Huawei OBS, IBM COS, IDrive e2, Lyve Cloud, Minio, Netease, RackCorp, Scaleway, SeaweedFS, StackPath, Storj, Tencent COS and Wasabi
\ (s3)
6 / Backblaze B2
\ (b2)
7 / Better checksums for other remotes
\ (hasher)
8 / Box
\ (box)
9 / Cache a remote
\ (cache)
10 / Citrix Sharefile
\ (sharefile)
11 / Combine several remotes into one
\ (combine)
12 / Compress a remote
\ (compress)
13 / Dropbox
\ (dropbox)
14 / Encrypt/Decrypt a remote
\ (crypt)
15 / Enterprise File Fabric
\ (filefabric)
16 / FTP
\ (ftp)
17 / Google Cloud Storage (this is not Google Drive)
\ (google cloud storage)
18 / Google Drive
\ (drive)
19 / Google Photos
\ (google photos)
20 / HTTP
\ (http)
21 / Hadoop distributed file system
\ (hdfs)
22 / HiDrive
\ (hidrive)
23 / Hubic
\ (hubic)
24 / In memory object storage system.
\ (memory)
25 / Internet Archive
\ (internetarchive)
26 / Jottacloud
\ (jottacloud)
27 / Koofr, Digi Storage and other Koofr-compatible storage providers
\ (koofr)
28 / Local Disk
\ (local)
29 / Mail.ru Cloud
\ (mailru)
30 / Mega
\ (mega)
31 / Microsoft Azure Blob Storage
\ (azureblob)
32 / Microsoft OneDrive
\ (onedrive)
33 / OpenDrive
\ (opendrive)
34 / OpenStack Swift (Rackspace Cloud Files, Memset Memstore, OVH)
\ (swift)
35 / Pcloud
\ (pcloud)
36 / Put.io
\ (putio)
37 / QingCloud Object Storage
\ (qingstor)
38 / SSH/SFTP
\ (sftp)
39 / Sia Decentralized Cloud
\ (sia)
40 / Storj Decentralized Cloud Storage
\ (storj)
41 / Sugarsync
\ (sugarsync)
42 / Transparently chunk/split large files
\ (chunker)
43 / Union merges the contents of several upstream fs
\ (union)
44 / Uptobox
\ (uptobox)
45 / WebDAV
\ (webdav)
46 / Yandex Disk
\ (yandex)
47 / Zoho
\ (zoho)
48 / premiumize.me
\ (premiumizeme)
49 / seafile
\ (seafile)
Storage>32 (找到onedirve我的是32)

Option client_id.
OAuth Client Id.
Leave blank normally.
Enter a value. Press Enter to leave empty.
client_id> (输入记录的client_id)

Option client_secret.
OAuth Client Secret.
Leave blank normally.
Enter a value. Press Enter to leave empty.
client_secret> (输入记录的client_secret)

Option region.
Choose national cloud region for OneDrive.
Choose a number from below, or type in your own string value.
Press Enter for the default (global).
1 / Microsoft Cloud Global
\ (global)
2 / Microsoft Cloud for US Government
\ (us)
3 / Microsoft Cloud Germany
\ (de)
4 / Azure and Office 365 operated by 21Vianet in China
\ (cn)
region>1 (选1)

Edit advanced config?
y) Yes
n) No (default)
直接回车

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>直接回车

2023/03/20 02:26:58 NOTICE: Log in and authorize rclone for access
2023/03/20 02:26:58 NOTICE: Waiting for code…
2023/03/20 02:27:15 NOTICE: Got code
Option config_type.
Type of connection
Choose a number from below, or type in an existing string value.
Press Enter for the default (onedrive).
1 / OneDrive Personal or Business
\ (onedrive)
2 / Root Sharepoint site
\ (sharepoint)
/ Sharepoint site name or URL
3 | E.g. mysite or https://contoso.sharepoint.com/sites/mysite
\ (url)
4 / Search for a Sharepoint site
\ (search)
5 / Type in driveID (advanced)
\ (driveid)
6 / Type in SiteID (advanced)
\ (siteid)
/ Sharepoint server-relative path (advanced)
7 | E.g. /teams/hr
\ (path)
config_type>
*(重点来了,这里选择2,如果你想自定义位置可以选3,具体的网址就和他的示范是一样的,找到你的站点地址填入就行)

最后一路回车完成配置

完成配置我们Windows就完成了,正常挂载就可以了。

Linux配置和挂载

我们找到windows的路径

C:\Users\用户名\AppData\Roaming\rclone

打开rclone.conf文件,复制里面的内容来到Linux

  1. 安装rclone
apt-get update curl https://rclone.org/install.sh | sudo bash
  1. 我们还需要安装Fuse系统
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install fuse && sudo apt-get install fuse3

编辑/root/.config/rclone/rclone.conf文件,如果没有直接创建一个就行了。

vim /root/.config/rclone/rclone.conf

粘贴复制windows上面配置好的信息即可。

挂载网盘

rclone mount sp:/ /home/sp/ --allow-other --attr-timeout 5m --vfs-cache-mode full --vfs-cache-max-age 24h --vfs-cache-max-size 100G --vfs-read-chunk-size-limit 100M --buffer-size 1024M --cache-dir=/home/hdd/rclone_cache &

结论

在本教程中,我们介绍了如何在Linux操作系统上安装和配置rclone,并使用其挂载微软SharePoint站点到本地文件系统中。我们还介绍了如何创建一个新的SharePoint站点,并自动挂载该站点。rclone是一个强大的工具,可以用于在不同的云存储服务之间传输文件,并将这些存储服务挂载到本地。如果您还没有尝试过rclone,请在自己的系统上安装它并尝试挂载您的云存储服务。

2条评论

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注