2 posts

Install AWS CLI on Ubuntu

To install AWS CLI on Ubuntu, you need to use Python 2.7. If you use Python 2.6, there is a conflict error with simplejson library.

You may need to uninstall Python 2.6 first using sudo apt-get remove python. Then install Python 2.7.

sudo add-apt-repository ppa:fkrull/deadsnakes  
sudo apt-get update  
sudo apt-get install python2.7  

Then install pip using sudo apt-get install python pip, then install AWS CLI using sudo pip install awscli.

Some Linux Management Tips

During daily operations, I found following tips may be useful.

DNS resolve error in Amazon EC2

I found a Amazon EC2 instance cannot resolve DNS names. It turned out that the /etc/resolv.conf file is empty. Modify the file to look like below

domain us-west-2.compute.internal  
search us-west-2.compute.internal  

The configuration may be different. You can copy it from other EC2 instances.

rsyslog uses too much disk space

By default rsyslog stores messages in INN news format, which takes a lot of space. Usually you don't need to store them.

Edit /etc/rsyslog.d/50-default.conf and comment out following line:

news.notice            -/var/log/news/news.notice  

Reduce load of backup scripts with nice and ionice

Sometimes your backup stripts consume too much resources. You can use nice and ionice to limit CPU and IO resources it can use.

Following command put into lowest priority and run it.

/usr/bin/nice -n 19 /usr/bin/ionice -c2 -n7 /usr/local/bin/