oss 工具篇
ossfs 使用方式
1、下載下傳CentOS 7.0 (x64)
https://help.aliyun.com/document_detail/32196.html?spm=a2c4g.11186623.6.1316.301465d3M4Ys4k2、安裝方式 rpm -ivh ossfs_1.80.5_centos7.0_x86_64.rpm
3、使用方法
設定bucket name 和 AccessKeyId/Secret資訊,将其存放在/etc/passwd-ossfs 檔案中。注意這個檔案的權限必須正确設定,建議設為640。
echo my-bucket:my-access-key-id:my-access-key-secret > /etc/passwd-ossfs
chmod 640 /etc/passwd-ossfs
4、 将OSS bucket 挂載到指定目錄。
ossfs my-bucket my-mount-point -ourl=my-oss-endpoint
示例
将my-bucket這個bucket挂載到/tmp/ossfs目錄下,AccessKeyId是faint,AccessKeySecret是123,OSS endpoint是
http://oss-cn-hangzhou.aliyuncs.com:
echo my-bucket:faint:123 > /etc/passwd-ossfs
mkdir /tmp/ossfs
ossfs my-bucket /tmp/ossfs -ourl=
5、解除安裝
方法一:fusermount -u /tmp/ossfs
方法二:umount /tmp/ossfs
6、開啟debug
ossfs liupeng72 /tmp/ossfs/ -ourl=
-f -d -o curldbg -o dbglevel=info
