How to add swap for VPS (Debian, Centos, Ubuntu)?
Swap for VPS
swapon -s
dd if=/dev/zero of=/swap.file bs=1M count=512
chmod 600 /swap.file
mkswap /swap.file
->/etc/fstab
/swap.file swap swap defaults 0 0
swapon /swap.file
or reboot
Swap for VPS
swapon -s
dd if=/dev/zero of=/swap.file bs=1M count=512
chmod 600 /swap.file
mkswap /swap.file
->/etc/fstab
/swap.file swap swap defaults 0 0
swapon /swap.file
or reboot