“UbuntuHelp:EC2StartersGuide”的版本间的差异
来自Ubuntu中文
小 |
小 |
||
第24行: | 第24行: | ||
The Official AMI Ids are the following: | The Official AMI Ids are the following: | ||
{|border="1" cellspacing="0" | {|border="1" cellspacing="0" | ||
− | | | + | |Release ||Region ||i386 ||x86_64 |
|- | |- | ||
− | | Karmic || | + | |'''9.10'''>Karmic Koala || us-east-1 || ami-bb709dd2 || ami-55739e3c |
|- | |- | ||
− | | | + | | us-west-1 || ami-c32e7f86 || ami-cb2e7f8e |
|- | |- | ||
− | | | + | | eu-west-1 || ami-2fc2e95b || ami-05c2e971 |
|- | |- | ||
− | | 8.04 | + | |'''8.04'''>Hardy Heron|| us-east-1 || ami-59b35f30 || ami-27b35f4e |
|- | |- | ||
− | | | + | | us-west-1 || ami-3954057c || ami-c954058c |
+ | |- | ||
+ | | eu-west-1 || ami-a1d9f2d5 || ami-add9f2d9 | ||
+ | |- | ||
+ | |Lucid Lynx || [http://uec-images.ubuntu.com/releases/10.04/release/ Release] | ||
|} | |} | ||
Unofficial but well-maintained AMIs (8.04 Hardy through 9.04 Jaunty) are available from Eric Hammond's site [http://alestic.com/ Alestic.com]. | Unofficial but well-maintained AMIs (8.04 Hardy through 9.04 Jaunty) are available from Eric Hammond's site [http://alestic.com/ Alestic.com]. | ||
第104行: | 第108行: | ||
</nowiki></pre> | </nowiki></pre> | ||
=== See Also === | === See Also === | ||
− | * The [http://www.ubuntu.com/ | + | * The [http://www.ubuntu.com/cloud official web page] for Ubuntu Cloud |
* The [[UbuntuHelp:EC2FAQ|EC2 Frequently Asked Questions]] | * The [[UbuntuHelp:EC2FAQ|EC2 Frequently Asked Questions]] | ||
* The [http://aws.amazon.com/resources/ Amazon Web Services documentation] | * The [http://aws.amazon.com/resources/ Amazon Web Services documentation] |
2010年5月19日 (三) 22:08的最新版本
点击翻译: |
English |
请不要直接编辑翻译本页,本页将定期与来源同步。 |
目录
Introduction
This page gives you the first keys to using Ubuntu's official images on Amazon EC2. Please follow the instructions below to use them. Running Ubuntu Server Edition on Amazon Web Services requires you to go through the following steps that are described below:
- Create your account on Amazon (if you do not already have one) and setup your keys
- Install Amazon EC2 API Tools
- Instantiate your images(s)
- Configure your instance
<<Anchor(amazon_account_setup)>>
Setting up an Amazon account
- Go to http://aws.amazon.com, and select Sign-up Now. Sign in to your existing Amazon account or create a new one.
- Go to http://aws.amazon.com/ec2, and select "Sign Up for Amazon EC2".
- Enter your credit card information.
- Complete your signup for the Amazon EC2 service.
- On the thank you page, select "Create a New X.509 Certificate". Note that if you already have an X.509 certificate you are only able to download the certificate itself, not the private key. If you no longer have the private key you will need to generate a new X.509 certificate.
- Select "Yes" to create a new certificate.
- Download your Private Key and Certificate file.
- Note your AWS account ID # by going to http://aws.amazon.com/ec2 by moving the mouse over "Your Web Services Account" and select "Your Account Activity". Your account number will be at the top of this page in XXXX-XXXX-XXXX format.
If at a later time you discover you need to generate a new X.509 certificate, click on "Your Account" at the top of the EC2 console page. You may need to click the small button with two down arrows near the top right of the EC2 console page to make the "Your Account" link visible. Then in the "Access Credentials" box, click the tab named "X.509 Certificates" and click "Create a New Certificate". Download the private key and certificate when prompted.
Getting the images
The Official AMI Ids are the following:
Release Region i386 x86_64 9.10>Karmic Koala us-east-1 ami-bb709dd2 ami-55739e3c us-west-1 ami-c32e7f86 ami-cb2e7f8e eu-west-1 ami-2fc2e95b ami-05c2e971 8.04>Hardy Heron us-east-1 ami-59b35f30 ami-27b35f4e us-west-1 ami-3954057c ami-c954058c eu-west-1 ami-a1d9f2d5 ami-add9f2d9 Lucid Lynx Release Unofficial but well-maintained AMIs (8.04 Hardy through 9.04 Jaunty) are available from Eric Hammond's site Alestic.com.
Installing the API tools
The EC2 API tools is now available for 9.04 users to install and configure the software. For previous versions of Ubuntu please see here.
- Make sure you have|multiverse enabled and run the following command:
sudo apt-get install ec2-api-tools
- 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_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-6-openjdk/
- 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.
- 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
- Make sure the permissions on the file is 600
chmod 600 ec2-keypair.pem
Using the Ubuntu Images
The images and kernel are public, so they do not require any registration. To start using the AMI:
- Start the images you want using one of the following commands:
32 bits:
ec2-run-instances ami-xxxxx -k ec2-keypair
64 bits:
ec2-run-instances ami-xxxxx -k ec2-keypair -t c1.xlarge
where ami-xxxxx is the AMI ID found in the above table, and -t is the type of image:
- To see the status of your instance, you can run the following command:
ec2-describe-instances
- Authorize network access to the ssh port by running the following commands:
ec2-authorize default -p 22
- To login to your instance you have to run the following command:
ssh -i /path/to/ec2-keypair.pem ubuntu@<external-host-name>
Using the external host name that was listed as a result of the ec2-describe-instances command.
- And, of course, you're being billed as long the host is running<<FootNote(The package screen-profiles has an extension that allows to display a cost estimate on your host terminal session)>>, so you will probably want to shut it down when you're done.
ec2-terminate-instances <instance_id>
See Also
- The official web page for Ubuntu Cloud
- The EC2 Frequently Asked Questions
- The Amazon Web Services documentation
Footnotes