个人工具

UbuntuHelp:Eucalyptus environment

来自Ubuntu中文

跳转至: 导航, 搜索

Create a directory for ec2tools and Eucalyptus scripts and unzip the certificates you downloaded into it. From a Unix shell perform the following set of commands:

mkdir ~/.euca
cd ~/.euca
mv ~/Desktop/euca2-admin-x509.zip ~/.euca 
unzip euca2-admin-x509.zip

Create a script (e.g. ec2toolsinstall.sh) with the following contents and execute it:

cd ~/.euca
# Eucalyptus is not compatible with the newer ec2tools so we will
# install and remove them to insure all dependencies get installed
sudo apt-get install ec2-api-tools ec2-ami-tools
sudo apt-get remove ec2-api-tools ec2-ami-tools
wget http://s3.amazonaws.com/ec2-downloads/ec2-api-tools-1.3-30349.zip
unzip ec2-api-tools-1.3-30349.zip
mv ec2-api-tools-1.3-30349 ec2
wget http://s3.amazonaws.com/ec2-downloads/ec2-ami-tools-1.3-26357.zip
unzip ec2-ami-tools-1.3-26357.zip
mv ec2-ami-tools-1.3-26357 ec2ami
echo 'export JAVA_HOME=/usr' >> eucarc
echo 'export EC2_HOME=~/.euca/ec2' >> eucarc
echo 'export EC2_AMITOOL_HOME=~/.euca/ec2ami' >> eucarc
echo 'export PATH=$PATH:$EC2_HOME/bin:$EC2_AMITOOL_HOME/bin' >> eucarc

Hint:

  • Use copy/paste from this page to create your script
  • Remember to set execution privileges. For example: chmod +x ec2toolsinstall.sh

This script should have created a "eucarc" file with important environment variable information within it. You will need to source the eucarc to run the ec2tools in your environment:

source ~/.euca/eucarc