Created
November 2, 2012 19:03
-
-
Save tovbinm/4003655 to your computer and use it in GitHub Desktop.
Install EC2 command line tools
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
EC2_DIR=/usr/local/ec2 | |
wget http://s3.amazonaws.com/ec2-downloads/ec2-api-tools.zip -O ec2-api-tools.zip | |
wget http://s3.amazonaws.com/ec2-downloads/ec2-ami-tools.zip -O ec2-ami-tools.zip | |
mkdir -p $EC2_DIR | |
rm -rf $EC2_DIR/* | |
unzip -o -d $EC2_DIR ec2-api-tools.zip | |
unzip -o -d $EC2_DIR ec2-ami-tools.zip | |
cp -r $EC2_DIR/ec2-api-tools*/* $EC2_DIR | |
cp -r $EC2_DIR/ec2-ami-tools*/* $EC2_DIR | |
rm -rf $EC2_DIR/ec2-api-tools* $EC2_DIR/ec2-ami-tools* | |
rm ec2-api-tools.zip ec2-ami-tools.zip | |
echo -e "\n===============================================================================\n" \ | |
"\nEC2 command line tools were installed successfully." \ | |
"\nDon't forget to set you environment variables:\n" \ | |
"\nexport JAVA_HOME=<your Java home>" \ | |
"\nexport EC2_HOME=$EC2_DIR" \ | |
"\nexport EC2_PRIVATE_KEY=<path to your private key.pem>" \ | |
"\nexport EC2_CERT=<path to your cert.pem>" \ | |
"\nexport PATH=\$PATH:\$EC2_HOME/bin" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment