Go back to the main page

Install the latest s3cmd on CentOS 5

This article is over 2 years old. Proceed with caution.

Regards ♨ – Minimul

 

This will mostly likely work on any older distro where s3cmd is stuck at 1.0.x. What you need is the multipart upload support that is in version 1.1.x and greater. The strategy for CentOS 5.x is that you don't want to break the Python 2.4 base install as admin features within CentOS 5.x rely on it. Therefore, we want to create a self contained Python 2.7 installation. To do that you can use altinstall.

1. Remove s3cmd package

yum remove s3cmd

2. Install at least Python 2.7.

IMPORTANT: MAKE SURE TO USE "make altinstall" in the last step

wget http://python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2
tar xf Python-2.7.3.tar.bz2
cd Python-2.7.3
./configure --prefix=/usr/local
make && make altinstall

3. Download and compile latest s3cmd against Python 2.7

wget -O v1.5.0-alpha3.tar.gz https://github.com/s3tools/s3cmd/archive/v1.5.0-alpha3.tar.gz
tar xvzf v1.5.0-alpha3.tar.gz
cd v1.5.0-alpha3
python2.7 setup.py install

4. Reload shell and test

exec bash
s3cmd --version
3cmd version 1.5.0-alpha3
Comment on this article?