Run the two commands:
$ dd if=/dev/zero of=/swapfile bs=1024 count=1048576
$ mkswap /swapfile
Then edit /etc/fstab and add this line:
/swapfile none swap sw 0 0
Run the two commands:
$ dd if=/dev/zero of=/swapfile bs=1024 count=1048576
$ mkswap /swapfile
Then edit /etc/fstab and add this line:
/swapfile none swap sw 0 0