How to S3fs on EC2 Ubuntu

5 08 2008

Download, build, and install (use libcurl3-openssl-dev for Ubuntu
7.04)

apt-get install -y subversion build-essential libcurl4-openssl-dev
libxml2-dev libfuse-dev
svn checkout http://s3fs.googlecode.com/svn/trunk/s3fs s3fs
make -C s3fs (install g++ if needed and install make)
cp s3fs/s3fs /usr/local/bin

- Set up an S3 access configuration file

export AWS_ACCESS_KEY_ID=…
export AWS_SECRET_ACCESS_KEY=…
echo “$AWS_ACCESS_KEY_ID:$AWS_SECRET_ACCESS_KEY” > /etc/passwd-s3fs
chmod 600 /etc/passwd-s3fs

- Start s3fs (probably best to use a new/empty bucket the first time):

bucket=…
mkdir -p /mnt/$bucket
/usr/local/bin/s3fs $bucket /mnt/$bucket

- Shut it down (flushes any cached data)

umount /mnt/$bucket

s3fs has a caching mechanism: You can enable local file caching to minimize downloads, e.g., :

/usr/bin/s3fs mybucket /mnt -ouse_cache=/tmp


AddThis Feed Button


Actions

Information

Leave a comment