Saturday, August 9, 2014

Install AWS Command Line Interface on Oracle Linux 5

1. Download Active Perl from below website
2. Download AWS CLI from the Amazon website


1. Install Active Perl
cd /tmpwget http://downloads.activestate.com/ActivePython/releases/2.7.8.10/ActivePython-2.7.8.10-linux-x86_64.tar.gztar -xzvf ActivePython-2.7.8.10-linux-x86_64.tar.gzcd ActivePython-2.7.8.10-linux-x86_64
[root@bastion ActivePython-2.7.8.10-linux-x86_64]# ./install.shEnter directory in which to install ActivePython. Leave blank andpress 'Enter' to use the default [/opt/ActivePython-2.7].Install directory:()Installing ActivePython to '/opt/ActivePython-2.7'...Relocating dir-dependent files...

2. Install AWS CLI
cd /tmp
export PATH=/opt/ActivePython-2.7/bin:$PATH
wget https://s3.amazonaws.com/aws-cli/awscli-bundle.zip
[root@bastion tmp]# export PATH=/opt/ActivePython-2.7/bin:$PATH
[root@bastion tmp]# ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
Running cmd: /opt/ActivePython-2.7/bin/python virtualenv.py --python /opt/ActivePython-2.7/bin/python /usr/local/aws
Running cmd: /usr/local/aws/bin/pip install --no-index --find-links file:///tmp/awscli-bundle/packages awscli-1.4.0.tar.gz
You can now run: /usr/local/bin/aws --version
[root@bastion tmp]# /usr/local/bin/aws --version
aws-cli/1.4.0 Python/2.7.8 Linux/2.6.18-194.0.0.0.3.el5xen
[root@bastion tmp]#


3. Configure AWS 
[root@sar12vis tmp]# aws configure
AWS Access Key ID [None]: xxxxxxxxxxxxxxxxxxxxxxAWS
Secret Access Key [None]: xxxxxxxxxxxxxxxxxxxxxx
Default region name [None]: ap-southeast-1
Default output format [None]:
[root@sar12vis tmp]#

4. Ready to use
[xxxx@bastion ~]$ aws ec2 help



apt-key warning when sudo apt update run

Issue: apt-key warning when sudo apt update run Update below file: cat /etc/apt/sources.list.d/download_docker_com_linux_ubuntu.list ...