To install Nginx web server using YUM on CentOS or Ubuntu.
Click here and choose the Pre-Built Packages for your OS.
Copy the pre-built package (RPM) link and then open your SSH and type:
rpm -Uvh http://nginx.org/packages/rpm-file.rpm
Now you can install it using YUM by using the following command.
yum install nginx
Then follow the instructions.
To configure Nginx, check the documentation.