If you dont like to bother with all above commands and using centos, here is an alternative script which will download everything and install for you with only couple of commands..
Code: 
wget http://freevps.us/downloads/nginx-centos.sh
bash nginx-centos.sh
source
https://freevps.us/thread-528.html