1.下載ossfs工具
http://docs-aliyun.cn-hangzhou.oss.aliyun-inc.com/assets/attach/32196/cn_zh/1507811535079/ossfs_1.80.3_ubuntu16.04_amd64.deb
2. 安裝
$ apt-get update
$ apt-get install gdebi-core
$ gdebi ossfs_1.80.3_ubuntu16.04_amd64.deb
3. 配置OSS賬號密碼
$ echo my-bucket:my-access-key-id:my-access-key-secret > /etc/passwd-ossfs
$ chmod 640 /etc/passwd-ossfs
4. 掛載bucket
$ mkdir /tmp/ossfs
$ ossfs my-bucket /tmp/ossfs -ourl=my-oss-endpoint
5. 卸載bucket
$ fusermount -u /tmp/ossfs
參考:https://www.jianshu.com/p/78c43ead1ce1