Created
March 26, 2018 09:35
-
-
Save tomfanning/28756860345027ee894f769f9f8f8e1c to your computer and use it in GitHub Desktop.
Set up swap file
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
# set up a swapfile | |
dd if=/dev/zero of=/swap.file bs=1024 count=1048576 | |
mkswap /swap.file | |
chmod 0600 /swap.file | |
swapon /swap.file | |
echo " | |
/swap.file none swap sw 0 0" >> /etc/fstab | |
echo " | |
vm.swappiness=10" >> /etc/sysctl.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment