use aws s3 on linux with s3fs command

ubuntu 14.04

install s3fs

apt-get install automake autotools-dev 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
./autogen.sh
./configure
make
make install

# make credential file(use AWS IAM Credential)

echo ‘MyAccessKeyId:SecretAccessKey’ > /etc/passwd-s3fs

chmod 600 /etc/passwd-s3fs # if you don’t make any permission, You can see this ;s3fs should not have others permissions’

mkdir /tmp/cache

mkdir /mnt/S3mountedpath

chmod 777 /tmp/cache /mnt/S3mountedpath

s3fs MyS3BucketName -o use_cache=/tmp/cache -o allow_other /mnt/S3mountedpath

#If you have error to use s3fs, use debug option.

s3fs -d MyS3BucketName -o use_cache=/tmp/cache -o allow_other /mnt/S3mountedpath -d -d -f -of2 -o curldbg

# umount S3

fusermount -u /mnt/S3mountedpath

 

답글 남기기