How to install latest s3cmd release candidate on CentOS

The s3cmd utility is a great way to transfer files to/from Amazon S3 buckets from CentOS Linux.  Unfortunately, yum install s3cmd gives a very old version 1.0 and you may well need the newer version.

Note!  CentOS7 (RHEL7) installs a much newer version so there is no need for all this trouble.  Just use 'yum install s3cmd' to get the files on CentOS7.

These notes are for people using CentOS 5.x or 6.x.

Start at SourceForge using any web browser.  Go into the Files for the s3cmd project and figure out which set you want to use. Example 1.5.0-rc1 for release candidate 1.

http://sourceforge.net/projects/s3tools/files/s3cmd/

There you should see a tar.gz file listed.  If you click into that, you will get to an advertising screen where your download starts after a delay.  Look for the "direct link" provided by SourceForge.  Save a copy of THAT link.  You only need the first part.

Example, Source Forge gives you http://downloads.sourceforge.net/project/s3tools/s3cmd/1.5.0-rc1/s3cmd-1.5.0-rc1.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fs3tools%2Ffiles%2Fs3cmd%2F1.5.0-rc1%2F&ts=1411607389&use_mirror=softlayer-sng  but you only need the part up to the first question mark

Now open a command prompt on CentOS.  Use the wget utility to download the file.

cd /var/downloads
wget http://downloads.sourceforge.net/project/s3tools/s3cmd/1.5.0-rc1/s3cmd-1.5.0-rc1.tar.gz
ls

You should see your archive now.

Now the archive needs to be decompressed.

tar zxf s3cmd-1.5.0-rc1.tar.gz

Go into the created directory containing the decompressed files:

cd s3cmd-1.5.0-rc1

Then read the instructions for installation

cat INSTALL|more

Check the instructions but as of this writing, this was the next step

sudo python setup.py install

Now check your version

s3cmd --version

You may see some extra reminders such as a need to install python-dateutil, so then you run

sudo yum install python-dateutil

Again, check your version

s3cmd --version

And that should be it. You can remove the tar.gz file and you can also remove the entire directory that was uncompressed for the purpose of running the installer.

cd /var/downloads
rm -rf s3cmd-1.5.0-rc1
rm s3cmd-1.5.0-rc1.tar.gz

   ENJOY!

REMINDER: use trickled to throttle the bandwidth used for your transfers if you want to avoid swamping your network.  



Comments

Popular Posts