Skip to content

Instantly share code, notes, and snippets.

@AlejandroJL
Forked from tejasbubane/s3_bucket_mount.sh
Created June 24, 2018 05:25

Revisions

  1. @tejasbubane tejasbubane revised this gist Apr 25, 2014. 1 changed file with 6 additions and 3 deletions.
    9 changes: 6 additions & 3 deletions s3_bucket_mount.sh
    Original file line number Diff line number Diff line change
    @@ -7,17 +7,20 @@ tar -xzf s3fs-1.61.tar.gz
    tar -xzf fuse-2.8.4.tar.gz

    # install dependencies
    yum install gcc libstdc++-devel gcc-c++ curl-devel libxml2-devel openssl-devel mailcap glibc-devel.i386
    yum install gcc libstdc++-devel gcc-c++ curl-devel libxml2-devel openssl-devel mailcap

    # s3fs require fuse so install it first
    cd fuse-2.8.4
    ./configure --prefix=/usr
    ./configure --prefix=/usr/local
    make
    make install
    export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
    ldconfig
    modprobe fuse

    # now install s3fs
    cd ../s3fs-1.61
    ./configure --prefix=/usr
    ./configure --prefix=/usr/local
    make
    make install

  2. @tejasbubane tejasbubane revised this gist Jan 3, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion s3_bucket_mount.sh
    Original file line number Diff line number Diff line change
    @@ -40,7 +40,7 @@ s3fs -o default_acl=public-read <bucket> /<mountpoint>
    # if you get error fuse: device not found, try 'modprobe fuse' first
    # run `modprobe fuse`
    # while this if you get modprobe command not found, modprobe is in sbin, add sbin to the $PATH
    # export PATH="$PATH:/sbin" then modprobe fuse and run above mounting command again
    # export PATH="$PATH:/sbin" then `modprobe fuse` and run above mounting command again

    # if you get error saying cannot load shared library libfuse.so.2:
    export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/lib64/pkgconfig/
  3. @tejasbubane tejasbubane revised this gist Jan 3, 2014. 1 changed file with 9 additions and 1 deletion.
    10 changes: 9 additions & 1 deletion s3_bucket_mount.sh
    Original file line number Diff line number Diff line change
    @@ -32,7 +32,15 @@ chmod 600 /etc/passwd-s3fs
    # All done ready to mount
    mkdir /s3-bucketname

    s3fs -o default_acl=public-read <bucket> <mountpoint>
    # mount the drive
    s3fs -o default_acl=public-read <bucket> /<mountpoint>

    # to unmount `umount -l /<mountpoint>`

    # if you get error fuse: device not found, try 'modprobe fuse' first
    # run `modprobe fuse`
    # while this if you get modprobe command not found, modprobe is in sbin, add sbin to the $PATH
    # export PATH="$PATH:/sbin" then modprobe fuse and run above mounting command again

    # if you get error saying cannot load shared library libfuse.so.2:
    export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/lib64/pkgconfig/
  4. @tejasbubane tejasbubane revised this gist Jan 3, 2014. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions s3_bucket_mount.sh
    Original file line number Diff line number Diff line change
    @@ -21,6 +21,9 @@ cd ../s3fs-1.61
    make
    make install

    # if you want to uninstall previous version go to the source folder (preferably in /home/jive or /mnt/tejas)
    # and then run `make clean` and `make uninstall`

    # make credentials file and give it proper permissions
    vi /etc/passwd-s3fs
    #enter the credentials in this file format is access_id:secret_key
  5. @tejasbubane tejasbubane revised this gist Dec 26, 2013. 1 changed file with 6 additions and 5 deletions.
    11 changes: 6 additions & 5 deletions s3_bucket_mount.sh
    Original file line number Diff line number Diff line change
    @@ -1,13 +1,13 @@
    # download the proper versions of s3fs and fuse
    wget http://s3fs.googlecode.com/files/s3fs-1.73.tar.gz
    wget http://s3fs.googlecode.com/files/s3fs-1.61.tar.gz
    wget http://downloads.sourceforge.net/project/fuse/fuse-2.X/2.8.4/fuse-2.8.4.tar.gz

    # unpack them
    tar -xzf s3fs-1.73.tar.gz
    tar -xzf s3fs-1.61.tar.gz
    tar -xzf fuse-2.8.4.tar.gz

    # install dependencies
    yum install gcc libstdc++-devel gcc-c++ curl-devel libxml2-devel openssl-devel mailcap
    yum install gcc libstdc++-devel gcc-c++ curl-devel libxml2-devel openssl-devel mailcap glibc-devel.i386

    # s3fs require fuse so install it first
    cd fuse-2.8.4
    @@ -16,7 +16,7 @@ make
    make install

    # now install s3fs
    cd ../s3fs-1.73
    cd ../s3fs-1.61
    ./configure --prefix=/usr
    make
    make install
    @@ -28,7 +28,8 @@ chmod 600 /etc/passwd-s3fs

    # All done ready to mount
    mkdir /s3-bucketname
    /usr/bin/s3fs -o host=http://s3-ap-southeast-1.amazonaws.com bucketname.spinr.in /s3-bucketname

    s3fs -o default_acl=public-read <bucket> <mountpoint>

    # if you get error saying cannot load shared library libfuse.so.2:
    export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/lib64/pkgconfig/
  6. @tejasbubane tejasbubane revised this gist Nov 27, 2013. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions s3_bucket_mount.sh
    Original file line number Diff line number Diff line change
    @@ -30,5 +30,9 @@ chmod 600 /etc/passwd-s3fs
    mkdir /s3-bucketname
    /usr/bin/s3fs -o host=http://s3-ap-southeast-1.amazonaws.com bucketname.spinr.in /s3-bucketname

    # if you get error saying cannot load shared library libfuse.so.2:
    export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/lib64/pkgconfig/
    # and now run the previous command again. Yay! the bucket is mounted!

    # verify bucket is mounted properly using `df -h`
    # reference: http://www.goworkday.com/2013/08/01/s3fs-installation-on-centos-6-3-ec2/
  7. @tejasbubane tejasbubane created this gist Nov 12, 2013.
    34 changes: 34 additions & 0 deletions s3_bucket_mount.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,34 @@
    # download the proper versions of s3fs and fuse
    wget http://s3fs.googlecode.com/files/s3fs-1.73.tar.gz
    wget http://downloads.sourceforge.net/project/fuse/fuse-2.X/2.8.4/fuse-2.8.4.tar.gz

    # unpack them
    tar -xzf s3fs-1.73.tar.gz
    tar -xzf fuse-2.8.4.tar.gz

    # install dependencies
    yum install gcc libstdc++-devel gcc-c++ curl-devel libxml2-devel openssl-devel mailcap

    # s3fs require fuse so install it first
    cd fuse-2.8.4
    ./configure --prefix=/usr
    make
    make install

    # now install s3fs
    cd ../s3fs-1.73
    ./configure --prefix=/usr
    make
    make install

    # make credentials file and give it proper permissions
    vi /etc/passwd-s3fs
    #enter the credentials in this file format is access_id:secret_key
    chmod 600 /etc/passwd-s3fs

    # All done ready to mount
    mkdir /s3-bucketname
    /usr/bin/s3fs -o host=http://s3-ap-southeast-1.amazonaws.com bucketname.spinr.in /s3-bucketname

    # verify bucket is mounted properly using `df -h`
    # reference: http://www.goworkday.com/2013/08/01/s3fs-installation-on-centos-6-3-ec2/