惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Secure Thoughts
罗磊的独立博客
T
The Blog of Author Tim Ferriss
人人都是产品经理
人人都是产品经理
博客园 - 叶小钗
Last Week in AI
Last Week in AI
美团技术团队
Google Online Security Blog
Google Online Security Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
D
Docker
G
Google Developers Blog
大猫的无限游戏
大猫的无限游戏
酷 壳 – CoolShell
酷 壳 – CoolShell
小众软件
小众软件
月光博客
月光博客
L
LINUX DO - 最新话题
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
W
WeLiveSecurity
H
Heimdal Security Blog
Vercel News
Vercel News
SecWiki News
SecWiki News
Forbes - Security
Forbes - Security
Blog — PlanetScale
Blog — PlanetScale
Google DeepMind News
Google DeepMind News
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
www.infosecurity-magazine.com
www.infosecurity-magazine.com
TaoSecurity Blog
TaoSecurity Blog
T
Troy Hunt's Blog
A
About on SuperTechFans
C
Check Point Blog
S
Security Affairs
Hacker News - Newest:
Hacker News - Newest: "LLM"
AI
AI
WordPress大学
WordPress大学
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Help Net Security
Help Net Security
博客园_首页
The Last Watchdog
The Last Watchdog
S
SegmentFault 最新的问题
Hugging Face - Blog
Hugging Face - Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
Engineering at Meta
Engineering at Meta
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
I
Intezer
K
Kaspersky official blog
M
MIT News - Artificial intelligence
J
Java Code Geeks
G
GRAHAM CLULEY
P
Palo Alto Networks Blog

思有云 - IOIOX - 腾讯云

群晖NAS网络服务 - docker 部署配置腾讯云 DNSPod DDNS 动态域名解析 - 思有云 腾讯云对象存储 COSCMD 工具安装配置与使用命令 - 思有云 腾讯云SCF云函数无服务器部署OneDrive分享网盘 - 思有云 - IOIOX GitHub Actions + 腾讯云COS + SCF云函数 + 自动刷新CDN 完美自动化部署静态网站 - 思有云 CentOS 7 挂载腾讯云COS对象存储教程 - 思有云
腾讯云对象存储 COSFS 工具安装配置与使用命令 - 思有云
博主: Stille · 2020-07-07 · via 思有云 - IOIOX - 腾讯云
  • 发布时间:
  • 8894 次浏览
  • 暂无评论
  • 2006字数
  • 分类: 技术教程
  1. 首页
  2. 正文  

前言

COSFS 工具是一款将腾讯云 COS 挂载到本地的工具,能像使用本地文件系统一样直接操作对象存储中的文件.本文将简单介绍在 Linux 系统中的安装,配置和常规挂载命令,更详细的用法请参考下文中的相关参考链接.

本文为 Stille 原创文章.经实践,测试,整理发布.如需转载请联系作者获得授权,并注明转载地址.


安装

获取源码

git clone https://github.com/tencentyun/cosfs /usr/cosfs

安装依赖软件

sudo yum install automake gcc-c++ git libcurl-devel libxml2-devel fuse-devel make openssl-devel fuse

编译和安装 COSFS

cd /usr/cosfs
./autogen.sh
./configure
make
sudo make install
cosfs --version
#查看 cosfs 版本号

  

配置

获取挂载信息

登录腾讯云 - 控制台 - 对象存储 - 存储桶获取相关信息

  • BucketName-APPID : test-1250000000 为存储桶名称
  • 区域地址 : https://cos.ap-shanghai.myqcloud.com 存储桶所在的区域域名.

登录腾讯云 - 控制台 - 访问管理

创建子账号并赋予 COS 相关权限,生成SecretIdSecretKey.

  • SecretId : XXXXXX
  • SecretKey : XXXXXX

配置密钥文件

官方样本

echo <BucketName-APPID>:<SecretId>:<SecretKey> > /etc/passwd-cosfs
chmod 640 /etc/passwd-cosfs

示例

echo test-1250000000:AKIDHTVVaVR6e3:PdkhT9e2rZCfy6 > /etc/passwd-cosfs
chmod 640 /etc/passwd-cosfs

  

命令

挂载

官方样本

cosfs <BucketName-APPID> <MountPoint> -ourl=<CosDomainName> -odbglevel=info

相关参数

-o nonempty # 挂载到本地的目录不为空时.
-oallow_other # 允许其他用户访问,允许Web直连下载.

示例

创建挂载路径

mkdir -p /mnt/cosfs

挂载

cosfs test-1250000000 /mnt/cosfs -ourl=https://cos.ap-shanghai.myqcloud.com -odbglevel=info -onoxattr -oallow_other

如需挂载子目录

cosfs test-1250000000:/my-dir /mnt/cosfs -ourl=https://cos.ap-shanghai.myqcloud.com -odbglevel=info -onoxattr -oallow_other

卸载

umount -l /mnt/cosfs

结语

腾讯云对象存储 COS 的挂载还可以使用 Rclone 来实现.其他更多相关信息请参考以下链接:


晚高峰稳定 4K 的 IPLC 机场 解锁各流媒体 支持 ChatGPT. 晚高峰稳定 4K 的 IPLC 机场 解锁各流媒体 支持 ChatGPT. RedteaGO - 最划算的大陆漫游 eSim 流量卡,原生境外 IP,注册就送 3 刀。
RedteaGO - 最划算的大陆漫游 eSim 流量卡,原生境外 IP,注册就送 3 刀。

赞赏作者

如果喜欢我的文章,觉得对你有帮助,请随意赞赏!

腾讯云对象存储 COSFS 工具安装配置与使用命令

 •