Wednesday, April 11, 2012

installing s3cmd in amazon ec2-instance

Sponsored Links
s3cmd is a command line tool for uploading, downloading and managing file and directories with amazon simple storage s3. It is very useful when running scripts and scheduling scripts with cron. First you have to install s3cmd package which is available from s3tools.org. Here we are installing s3cmd in a Centos 5 instance using yum.


Installing s3cmd:

First you have to install the repo file of s3cmd in the system.
you can get the repo from the following url.
http://s3tools.org/repo/RHEL_5/

save the repo in your /etc/yum.repos.d/ as follows
[root@xxxxxxx ~]# cat /etc/yum.repos.d/s3cmd.repo
#
# Save this file to /etc/yum.repos.d on your system
# and run "yum install s3cmd"
#
[s3tools]
name=Tools for managing Amazon S3 - Simple Storage Service (RHEL_5)
type=rpm-md
baseurl=http://s3tools.org/repo/RHEL_5/
gpgcheck=1
gpgkey=http://s3tools.org/repo/RHEL_5/repodata/repomd.xml.key
enabled=1
[root@xxxxxxx ~]#

Now Install it using yum:
[root@xxxxxxx ~]# yum install s3cmd

Now configure it. It will ask your access key, secret key and encryption key(just hit enter if you don't want).
[root@xxxxxxx ~]# s3cmd --configure

Now you will be able to list your buckets in your amazon s3 storage using the following command.
[root@xxxxxxx ~]# s3cmd ls

Look here or more s3cmd examples
Sponsored Links

No comments:

Post a Comment

Be nice. That's all.