-
-
Save rajeevkannav/33258e8fecb8882287f2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
## Description: | |
## install script of s3fs | |
## | |
## Usage: | |
## install-s3fs.sh [mountpoint] [bucketName] [accessKeyId] [secretAccessKey] | |
MOUNT_POINT=$1 | |
BUCKET_NAME=$2 | |
ACCESS_KEY=$3 | |
SECRET_KEY=$4 | |
# install dependent libraries | |
yum install -y fuse-devel libcurl-devel libxml2-devel | |
# install in /usr/local/bin | |
cd /usr/local/src | |
wget http://s3fs.googlecode.com/files/s3fs-1.61.tar.gz | |
tar xvzf s3fs-1.61.tar.gz | |
cd s3fs-1.61 | |
./configure && make && make install | |
# setup secretkey | |
echo "$BUCKET_NAME:$ACCESS_KEY:$SECRET_KEY" > /etc/passwd-s3fs | |
chmod 600 /etc/passwd-s3fs | |
# mount s3 | |
modprobe fuse | |
mkdir $MOUNT_POINT | |
/usr/local/bin/s3fs $BUCKET_NAME $MOUNT_POINT -o default_acl=public-read |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment