Adding a swap file to an EC2 Instance

Mon, 23 Apr 2018 02:58:12 +0000

sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024
sudo /sbin/mkswap /var/swap.1
sudo chmod 600 /var/swap.1
sudo /sbin/swapon /var/swap.1