Created
December 14, 2015 22:18
-
-
Save a-bx/7d0184851ed9005b93f1 to your computer and use it in GitHub Desktop.
Enable swap ec2
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
# To add this extra space to your instance you type: | |
sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024 | |
sudo /sbin/mkswap /var/swap.1 | |
sudo /sbin/swapon /var/swap.1 | |
# If you need more than 1024 then change that to something higher. | |
# To enable it by default after reboot, add this line to /etc/fstab: | |
/var/swap.1 swap swap defaults 0 0 | |
# Source: http://stackoverflow.com/questions/17173972/how-do-you-add-swap-to-an-ec2-instance |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment