挂载oss | wniu

挂载oss

下载oss安装包

1
$ wget http://docs-aliyun.cn-hangzhou.oss.aliyun-inc.com/assets/attach/32196/cn_zh/1507811577850/ossfs_1.80.3_centos7.0_x86_64.rpm

安装

1
sudo yum localinstall ossfs_1.80.3_centos7.0_x86_64.rpm

设置bucket name 和 AccessKeyId/Secret信息,将其存放在/etc/passwd-ossfs 文件中

1
2
$ echo my-bucket:my-access-key-id:my-access-key-secret > /etc/passwd-ossfs
$ chmod 640 /etc/passwd-ossfs

将OSS bucket mount到指定挂载程序目录。

1
ossfs my-bucket my-mount-point -ourl=my-oss-endpoint
0%