当前位置:首页 > CN2资讯 > 正文内容

macos上安装mysql8 macos上安装rclone

2天前CN2资讯


###在Mac/Centos上使用rclone挂载OneDrive网盘

说明:我们很多人喜欢用VPS做离线下载,不过由于有的服务器硬盘太小了,装不了太多电影资源啥的,我们就需要想办法了,之前说过可以通过挂载FTP来增大空间。
也可以使用rclone,可以挂载OneDrive/Google Drive/Amazon Drive等云存储,同时还支持全平台,意味着您可以在Windows、Mac OS、Linux上进行使用,本文将讲述挂载FTP,和onedrive,本人在测试googledrive 时会timeout,原因大家都懂得。

前提说明:服务器上CentOS大部分未安装图形界面,但是Rclone必须要在有内置浏览器的电脑才能正常完成授权,因此这里使用的办法是先在本地Windows/Mac电脑安装Rclone并获取授权后的token,再将其复制到CentOS的服务器上。刚好也可以证明支持全平台。

Linux 通过安装curlFTtpFS来挂载FTP

##安装
系统要求 debian Ubantu centos

####1、 安装CurlFtpFS

centos系统

1、yum -y install epel-release && yum -y install curlftpfs

ubantu系统

apt-get install curlftpfs -y

####2、挂载FTP

1、 创建目录,路径及名称
mkdir /home/tmp
2、 挂载FTP
curlftpfs /home/ftp -o user=username:password

参数说明

#FTP地址

/home/ftp #本地目录

username #FTP用户名

password #FTP密码

####3、 检查
输入df -h命令查下是否挂载成功

linux 通过rclone挂载onedrive

##mac 安装rclone

默认:在本地mac电脑上下载rclone,下载地址:二进制

通过 Termial 下载

cd && curl -O https://downloads.rclone.org/rclone-current-osx-amd64.zip

解压

unzip -a rclone-current-osx-amd64.zip && cd rclone-*-osx-amd64

移动到相应的位置

sudo mkdir -p /usr/local/bin sudo mv rclone /usr/local/bin/

##获取TOKEN

初始化配置

rclone config

显示结果

n) New remote s) Set configuration password q) Quit config n/s/q> n name> onedrive #随便填,后面要用到 Type of storage to configure. Choose a number from below, or type in your own value 1 / Amazon Drive \ "amazon cloud drive" 2 / Amazon S3 (also Dreamhost, Ceph, Minio) \ "s3" 3 / Backblaze B2 \ "b2" 4 / Box \ "box" 5 / Cache a remote \ "cache" 6 / Dropbox \ "dropbox" 7 / Encrypt/Decrypt a remote \ "crypt" 8 / FTP Connection \ "ftp" 9 / Google Cloud Storage (this is not Google Drive) \ "google cloud storage" 10 / Google Drive \ "drive" 11 / Hubic \ "hubic" 12 / Local Disk \ "local" 13 / Microsoft Azure Blob Storage \ "azureblob" 14 / Microsoft OneDrive \ "onedrive" 15 / Openstack Swift (Rackspace Cloud Files, Memset Memstore, OVH) \ "swift" 16 / Pcloud \ "pcloud" 17 / QingCloud Object Storage \ "qingstor" 18 / SSH/SFTP Connection \ "sftp" 19 / Webdav \ "webdav" 20 / Yandex Disk \ "yandex" 21 / http Connection \ "http" Storage> 14 #选择14,Microsoft OneDrive Microsoft App Client Id - leave blank normally. client_id> #留空 Microsoft App Client Secret - leave blank normally. client_secret> #留空 Remote config 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 Use auto config? * Say Y if not sure * Say N if you are working on a remote or headless machine y) Yes n) No y/n> n #选择n For this to work, you will need rclone available on a machine that has a web browser available. Execute the following on your machine: rclone authorize "onedrive" Then paste the result below: result> {"access_token":""} #复制{xx}整个内容,**包括大括号{}**,后面需要用到 -------------------- [Rats] client_id = client_secret = token = {"access_token":""} -------------------- y) Yes this is OK e) Edit this remote d) Delete this remote y/e/d> y 选择y Current remotes: Name Type ==== ==== onedrive onedrive 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 #选择q退出

onedrive大伙可去网上找相关文档申请免费5T

到此 基本算是完成配置,可以尝试在mac挂载

首次挂载会出错,因为mac文件系统原因找不到OSXFUSE

1、 Fatal error: failed to mount FUSE fs: cannot locate OSXFUSE 2、 error: Directory is not empty: /data If you want to mount it anyway use: --allow-non-empty option 3、 mount helper error: mount_osxfuse: failed to mount /onedrive@/dev/osxfuse0: Operation not permitted Fatal error: failed to mount FUSE fs: mount_osxfusefs: exit status 71

解决方案:

下载相应的版本
1、osxfuse

2、目录可以重新创建一个

3、目录创建到当前用户下 mac/Users/xxxx

##centos 安装rclone
直接使用官方的一键安装命令即可,输入下面的命令:

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

CentOS挂载Onedrive

接下来操作方法和mac完全一样,就不重复了,唯一的区别是“Use auto config?”这里选择n,并输入之前获取的token

是否自动配置

Use auto config? * Say Y if not sure * Say N if you are working on a remote or headless machine y) Yes n) Noy/n> n #在这里输入nFor this to work, you will need rclone available on a machine that has a web browser available.

输入TOKEN

Execute the following on your machine: rclone authorize "onedrive"Then paste the result below:result> {"access_token":""} #粘贴之前在客户端授权的内容,包括大括号一起粘贴进去

###挂载 OneDrive为磁盘

#新建本地文件夹,路径自己定,即下面的LocalFolder

mkdir /root/OneDrive
#挂载为磁盘

rclone mount DriveName:Folder LocalFolder --copy-links --no-gzip-encoding --no-check-certificate --allow-other --allow-non-empty --umask 000

DriveName为初始化配置填的name,Folder为oneDrive里的文件夹,可以为/,LocalFolder为centos上的本地文件夹。

###查看挂载情况
df -h

centos需要下载fuse

#安装fuse

yum -y install fuse

#创建挂载目录

mkdir -p /home/onedrive

#挂载

#如果需要后台保持运行,使用下面的命令

nohup rclone mount remote:path/to/files /home/onedrive &


    你可能想看:

    扫描二维码推送至手机访问。

    版权声明:本文由皇冠云发布,如需转载请注明出处。

    本文链接:https://www.idchg.com/info/19536.html

    分享给朋友:

    “macos上安装mysql8 macos上安装rclone” 的相关文章

    如何充分利用AWS EC2免费流量:12个月节省成本的终极指南

    AWS EC2 免费流量的定义 AWS EC2 免费流量是亚马逊云服务(AWS)为新客户提供的一项福利,允许他们在注册后的12个月内享受一定量的免费数据传输。这项服务是 AWS 免费套餐的一部分,旨在帮助新用户在没有额外成本的情况下体验 AWS 的强大功能。免费流量主要分为两类:互联网传出流量和跨区...

    DMIT VPS评测:高性能与稳定性的完美结合

    在了解DMIT VPS之前,我想先分享一下我对这家公司的最初印象。记得第一次听到DMIT时,它的名字总是在VPS领域中流传。人们提到它时,无一不带着敬仰,增加了我对它的好奇心。自从它在2017年成立以来,DMIT便以其优秀的服务和产品迅速吸引了不少用户。我也开始关注起它背后的故事。 DMIT的崛起显...

    mac ssh工具推荐:提升远程工作效率的最佳选择

    在现代计算机网络中,SSH(Secure Shell)是一个重要的工具。它为用户提供了一种安全的远程登录协议,广泛应用于网络管理、服务器配置等场景。我自己在处理多台服务器时,总是通过SSH来保证安全性和网络的高效性。通过SSH,我可以在远程计算机上执行命令和操作,感觉就像在本地电脑上一样。 在Mac...

    DC2:动画创作、网络安全与汽车文化的多重魅力探索

    DC2 可谓是一个充满魔力的词汇,它在不同的领域中有着不同的意义。这种多样性让它成为了动画爱好者、汽车迷,甚至网络安全专家的共同话题。我对这些含义的探索,给我带来了许多启发和乐趣,让我对这个小小的组合字母有了更深刻的理解。 首先,提到 DC2,许多人可能会想到 DC2 动画软件。这款软件不仅在手机动...

    甲骨文云的永久免费服务:开发者的理想选择

    在现代云计算的环境中,甲骨文云(Oracle Cloud)作为一种强有力的云计算服务,凭借其永久免费服务吸引了许多用户。回想我初次接触甲骨文云时,正是被它提供的多种Always Free服务所吸引,比如我可以免费使用2个实例和20GB的存储空间。这让我在学习和开发上有了更加广阔的可能性,不用担心一开...

    如何使用DigitalOcean优惠码获取200美元免费额度

    DigitalOcean是一家备受赞誉的云计算服务提供商,专门致力于为开发者和初创公司提供一流的云基础设施解决方案。通过其简单易用的界面和高效的性能,DigitalOcean帮助用户轻松地部署和扩展应用程序。我在使用DigitalOcean时,深刻感受到了它为开发者量身定制的便捷性,毫无疑问,这使得...