Last active
June 12, 2017 13:14
-
-
Save sserrano44/6a35ffba5260b2f27ef5708df81bdc0e to your computer and use it in GitHub Desktop.
add swapfile to EC2 instance
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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