Last active
August 29, 2015 14:25
-
-
Save goodfeel/fa36536a58c58924259d to your computer and use it in GitHub Desktop.
setup swap for aws ami
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
#!/bin/bash | |
sudo /bin/dd if=/dev/zero of=/var/swap1 bs=512M count=2 | |
sudo /sbin/mkswap /var/swap1 | |
sudo chmod 0600 /var/swap1 | |
sudo /sbin/swapon /var/swap1 | |
sudo echo "/var/swap1 swap swap defaults 0 0" >> /etc/fstab | |
sudo reboot now |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment