doc/笔记/腾讯云COSFS挂载.md

36 lines
783 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 安装包安装
## 下载
CDN 下载地址https://cos-sdk-archive-1253960454.file.myqcloud.com/cosfs/v1.0.21/cosfs_1.0.21-ubuntu20.04_amd64.deb
## 安装
```
sudo dpkg -i cosfs_1.0.21-ubuntu20.04_amd64.deb
```
## 使用方法
配置密钥文件
```
sudo su # 切换到 root 身份,以修改 /etc/passwd-cosfs 文件;如果已经为 root 用户,无需执行该条命令。
echo <BucketName-APPID>:<SecretId>:<SecretKey> > /etc/passwd-cosfs
chmod 640 /etc/passwd-cosfs
```
运行工具
```
cosfs <BucketName-APPID> <MountPoint> -ourl=http://cos.<Region>.myqcloud.com -odbglevel=info -oallow_other
```
示例
```
mkdir -p /mnt/cosfs
cosfs examplebucket-1250000000 /mnt/cosfs -ourl=http://cos.ap-guangzhou.myqcloud.com -odbglevel=info -onoxattr -oallow_other
```