Easy!

First, create a “Swap File”:

dd if=/dev/zero of=/var/myswap bs=1M count=2048
sudo chmod 0600 /var/myswap
mkswap /var/myswap 
swapon /var/myswap

Second, add swap to fstab:

/var/myswap   swap   swap   defaults  0 0

Found in TecAdmin.

Facebooktwitterredditpinterestlinkedinmail