It is easy as it looks like, just follow.
The following will create 4 GB os SWAP
Modify bs & count values to increase/decrease
dd if=/dev/zero of=/swap bs=1GB count=4 mkswap /swap chmod 0600 /swap swapon /swap
You will also have to add this line to /etc/fstab
/swap swap swap defaults 0 0
That's all!