sudo apt-get install automake autotools-dev \fuse g++ git libcurl4-gnutls-dev libfuse-dev \libssl-dev libxml2-dev make pkg-config
git clone https://github.com/s3fs-fuse/s3fs-fuse.git
cd s3fs-fuse
sudo ./autogen.sh
sudo ./configure
sudo make
sudo make install
sudo vim /etc/passwd-s3fs
key format: AKIAJExxxxxxxxxxxxxxxxxxxxxxx:Gcdpi2axxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
sudo chmod 640 /etc/passwd-s3fs
sudo mkdir -p /s3/folder-name
sudo s3fs -o allow_other bucket-name /s3/folder-name
中国区AWS S3挂载路径不同:
sudo s3fs -o allow_other bucket-name /s3/folder-name -o url=https://s3.cn-north-1.amazonaws.com.cn
取消挂载:
sudo umount -l /s3/folder-name
写入/etc/fstab 实现开机自动挂载
sudo vim /etc/fstab
bucket-name /s3/folder-name fuse.s3fs _netdev,allow_other 0 0
参考文档:http://www.whiteboardcoder.com/2017/12/how-to-mount-s3-bucket-as-hard-drive.html
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。