Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
2GB Swap for a 512mb Ram VPS
echo "[*] Swap Setup for VPS with 512mb... [*]"
swapon -s
dd if=/dev/zero of=/swapfile bs=1024 count=2048k
mkswap /swapfile
swapon /swapfile
echo 10 | sudo tee /proc/sys/vm/swappiness
echo vm.swappiness = 10 | sudo tee -a /etc/sysctl.conf
chown root:root /swapfile
chmod 0600 /swapfile
echo "[*] Swap Setup Complete... [*]"

This comment has been minimized.

Copy link
Owner Author

@random-robbie random-robbie commented Nov 2, 2017

curl -L | sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.