1、安装依赖
#yum install libxml2-devel libcurl-devel -y
2、下载安装包
#wget https://github.com/tencentyun/cosfs/releases/download/v1.0.20/cosfs-1.0.20-centos7.0.x86_64.rpm
3、安装
#rpm -ivh cosfs-1.0.20-centos7.0.x86_64.rpm
如果提示 fuse-libs-*,就加参数--force再次安装
#rpm -ivh --force cosfs-1.0.20-centos7.0.x86_64.rpm
4、配置秘钥文件
在文件/etc/passwd-cosfs中,写入
存储桶名称:ak:sk 用冒号隔开
修改权限
#chmod 640 /etc/passwd-cosfs
5、挂载
/usr/local/bin/cosfs 桶 本地目录 -ourl=http://cos.ap-shanghai.myqcloud.com -oallow_other