Code:
# mkswap /dev/sdXY
# swapon /dev/sdXY
If you use systemd as your init system the swap partition will be mounted automatically, otherwise you need to add it to /etc/fstab
Code:
/dev/sdXY none swap defaults 0 0
This presumes a swap partition rather than a swap file.