阿里云oss挂载
2019-05-06 06:51:53    110    0    0
louyj

安装ossfs

  1. wget http://docs-aliyun.cn-hangzhou.oss.aliyun-inc.com/assets/attach/32196/cn_zh/1527232195135/ossfs_1.80.5_centos7.0_x86_64.rpm?spm=a2c4g.11186623.2.6.WVXUpG&file=ossfs_1.80.5_centos7.0_x86_64.rpm
  2. yum localinstall ossfs_1.80.5_centos7.0_x86_64.rpm

设置AccessKeyId

设置bucket name 和 AccessKeyId/Secret信息,将其存放在/etc/passwd-ossfs 文件中,注意这个文件的权限必须正确设置,建议设为640。

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

将OSS bucket mount到指定目录。

  1. ossfs my-bucket my-mount-point -ourl=my-oss-endpoint

示例

  1. echo my-bucket:faint:123 > /etc/passwd-ossfs
  2. chmod 640 /etc/passwd-ossfs
  3. mkdir /tmp/ossfs
  4. ossfs my-bucket /tmp/ossfs -ourl=http://oss-cn-hangzhou.aliyuncs.com

https://help.aliyun.com/document_detail/32196.html?spm=a2c4g.11186623.6.1074.nDSW2F

Pre: Centos nfs安装

Next: Presto Installation

110
Sign in to leave a comment.
No Leanote account? Sign up now.
0 comments
Table of content