Amazon Linux - Check If Need Reboot

Below is a BASH script you can use to tell you whether you need to reboot your instance in order to use a later kernel. #!/bin/bash LAST_KERNEL=$(rpm -q --last kernel | perl -pe 's/^kernel-(\S+).*/$1/' | head -1); CURRENT_KERNEL=$(uname -r); if [ $LAST_KERNEL != $CURRENT_…

Read this article

Ansible - Update And Reboot (if required) Amazon Linux Servers

Below is the playbook I use for updating my Amazon Linux servers. This will reboot the servers if they receive an updated kernel. It has to run a custom ssh command because unlike Ubuntu, there is no reboot-required file to indicate a reboot is required. The script is one I…

Read this article

Amazon Linux - Install Byobu

Run the following script after checking if it is the latest release. sudo yum update -y wget https://launchpad.net/byobu/trunk/5.117/+download/byobu_5.117.orig.tar.gz tar xzf byobu*.tar.gz cd byobu-* ./configure sudo make sudo make install You should now be able to…

Read this article

Amazon Linux - Install Docker

sudo yum update -y sudo yum install docker-io -y Optional - Add ec2-user to Docker Group sudo usermod -a -G docker ec2-user…

Read this article