Skip to content

Instantly share code, notes, and snippets.

@sserrano44
Last active June 12, 2017 13:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sserrano44/6a35ffba5260b2f27ef5708df81bdc0e to your computer and use it in GitHub Desktop.
Save sserrano44/6a35ffba5260b2f27ef5708df81bdc0e to your computer and use it in GitHub Desktop.
add swapfile to EC2 instance
# on /etc/rc.local before the line with ‘exit 0’ add:
fallocate -l 4G /mnt/swapfile
chmod 600 /mnt/swapfile
mkswap /mnt/swapfile
swapon /mnt/swapfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment