Created
August 9, 2016 13:12
-
-
Save tamagokun/1c8a11d5ad058a28baeedc8c6c47a45f to your computer and use it in GitHub Desktop.
Create a swap file on Amazon 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
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 | |
sudo chmod 600 /var/swap.1 | |
# Add to /etc/fstab | |
/var/swap.1 swap swap defaults 0 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment