When starting a Linux instance on an Amazon cloud, there is no such important utility in the database as ec2-api-tools, which includes most of the API commands for working with Amazon and its services, and s3cmd is a means of working with S3.
1. Installing ec2-api-tools
We will put the classic antiquated method, because FC8 is not included in yum.
')
We put Java and export JAVA_HOME
Source for downloading fresh java here
mv jre-6u20-linux-i586.bin?AuthParam=1272..... jre.bin
chmod +x jre.bin
./jre.bin
mv jre1.6.0_20 /usr/lib/jvm/
ln -s /usr/lib/jvm/jre1.6.0_20/ /usr/lib/jvm/jre
export JAVA_HOME=/usr/lib/jvm/jre
Downloading fresh ec2-api-tools and exporting EC2_HOME
curl -O s3.amazonaws.com/ec2-downloads/ec2-api-tools.zip
unzip ec2-api-tools.zip
mv ec2-api-tools-1.3-24159 /usr/local/
ln -s /usr/local/ec2-api-tools-1.3-24159 /usr/local/ec2-api-tools
export EC2_HOME=/usr/local/ec2-api-tools
Sets a variable in PATH
PATH=$PATH:/usr/local/ec2-api-tools/bin
Also export & PATH can be written to / etc / profile for permanent use.
2. We put s3cmd
In general, the package is in the system (about which comrade maxout already wrote
here , it is worth reading about the implementation of backup based on s3)
aptitude install s3cmd
or
yum install s3cmd.noarch
after installing it nada configure.
s3cmd --configure
enter the access key & secret access key of your s3, it will save the settings in ~ / .s3cmd
Or install from the archive. Download the utility
here.tar xvfz s3cmd-0.9.9.91.tar.gz
cd s3cmd-0.9.9.91
You can use it directly from the folder if you do not want to install it, or install
python setup.py install
you need a python distutils -
apt-get install python-setuptools
.
After that, the utility is ready to work, but you still need to configure it -
s3cmd --configure