特殊:Badtitle/NS100:EC2APITools

来自Ubuntu中文
Wikibot留言 | 贡献2009年5月18日 (一) 15:32的版本 (创建新页面为 '{{From|https://help.ubuntu.com/community/EC2APITools}} {{Languages|UbuntuHelp:EC2APITools}} To install the EC2 API Tools for an older version of Ubuntu, please run the following...')
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳到导航跳到搜索
可打印版本不再受到支持且可能有渲染错误。请更新您的浏览器书签并改用浏览器默认打印功能。

{{#ifexist: :EC2APITools/zh | | {{#ifexist: EC2APITools/zh | | {{#ifeq: {{#titleparts:EC2APITools|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:EC2APITools|1|-1|}} | zh | | }}

To install the EC2 API Tools for an older version of Ubuntu, please run the following steps:

  1. Install the sun-java5-jre package. <<FootNote(This is not an open source version of Java.)>> <<FootNote(You will need to have multiverse enabled in apt sources.)>> Use <Tab> <Enter> to accept license agreement.
   sudo apt-get install sun-java5-jre
 
  1. Download the Amazon EC2 Command-Line Tools from the Amazon EC2 resource Center.
wget http://s3.amazonaws.com/ec2-downloads/ec2-api-tools-1.3-34128.zip
  1. Unzip the ec2-api-tools.
   sudo apt-get install unzip
   unzip ec2-api-tools-1.3-34128.zip
 
  1. Make sure you have the following environment variables set up in your shell profile. This is accomplished by adding the following lines to your ~/.bashrc if you use bash as your shell:
   export EC2_HOME=$HOME/ec2-api-tools-1.3-34128
   export PATH=$PATH:$EC2_HOME/bin
   export EC2_PRIVATE_KEY=$HOME/<where your private key is>/pk-XXXXXXXXXXXXXXXXXXXXXXXXXXXX.pem
   export EC2_CERT=$HOME/<where your certificate is>/cert-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.pem
   export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun/ 
  1. Check to see if it's working by running the following command:
    ec2-describe-images -o self -o amazon
 

Note: If this fails due to "Client.AuthFailure" then ensure you have signed up for both AWS and ec2 with amazon.com, and have provided valid payment details. Also double check that the EC2_PRIVATE_KEY and EC2_CERT point to the correct locations.

  1. To use public AMIs you have to generate an ssh key. Run the following command which will also save the private key returned to a local file called ec2-keypair:
   ec2-add-keypair ec2-keypair > ec2-keypair.pem
 
  1. Make sure the permissions on the file is 600.
   chmod 600 ec2-keypair.pem
 

Footnotes