有趣的事

Install ec2-ami-tools and ec2-api-tools on Ubuntu

Important Note: The best thing to do is just download the zip files for ec2-api-tools and ec2-ami-tools and follow the instructions in the readme-install.txt file (found in ec2-ami-tools.zip). If you want to use apt-get, just know that they are out of date as of 6-20-2013 and some things you expect to be supported are not (such as ec2-register not supporting the -O and -W options for AWS_ACCESS_KEY and AWS_SECRET_KEY).

The following is how you install ec2-api-tools and ec2-ami-tools on an Ubuntu 12.04 LTS (Precise Pangolin) instance on EC2. You can adapt it for other Ubuntu versions.

1. Edit your /etc/apt/sources.list file and uncomment the following lines: deb http://us.archive.ubuntu.com/ubuntu/ precise multiverse

deb-src http://us.archive.ubuntu.com/ubuntu/ precise multiverse

deb http://us.archive.ubuntu.com/ubuntu/ precise-updates multiverse

deb-src http://us.archive.ubuntu.com/ubuntu/ precise-updates multiverse

Instead of "us.archive.ubuntu.com" it may instead be something like "us-east-1.ec2.archive.ubuntu.com". If the lines don't exist, just add them. Also, depending on your Ubuntu version, you'll replace "precise" with something like "lucid" (you should see other lines as examples when you open the file for editing).

2. Run the following two commands: sudo apt-get update

sudo apt-get install ec2-api-tools ec2-ami-tools

UBUNTU