aws ec2挂载 s3

配置s3 挂载 aws ec2

安装依赖包:yum install  -y  automake fuse fuse-devel gcc-c++ git libcurl-devel libxml2-devel make openssl-devel

下载,编译并安装s3fs: git clone https://github.com/s3fs-fuse/s3fs-fuse.git && cd s3fs-fuse && ./autogen.sh && ./configure && make && make install

配置iam角色,授权相应bucket的权限,将配好的iam role 的 access key 写入到秘钥文件:echo AKIAIOEO4E2VOHLxxxxx:2LXBboddEpRLmWl48i3+b4ziwPL3bJ4vxxxxxxxx > /etc/passwd-s3fs

挂载bucket 到ec2: /usr/local/bin/s3fs  bucketname /test  -o   passwd_file=/etc/passwd-s3fs  -o endpoint=eu-central-1  -ourl="https://s3.eu-central-1.amazonaws.com"

posted @ 2019-07-23 15:33  imcati  阅读(1927)  评论(0编辑  收藏  举报