For CentOS CentOS-7 run the following as root:
cd /etc/yum.repos.d/
wget https://download.opensuse.org/repositories/home:non7top/CentOS_CentOS-7/home:non7top.repo
yum install nginx
For CentOS CentOS-6 run the following as root:
cd /etc/yum.repos.d/
wget https://download.opensuse.org/repositories/home:non7top/CentOS_CentOS-6/home:non7top.repo
yum install nginx
For CentOS CentOS-5 run the following as root:
cd /etc/yum.repos.d/
wget https://download.opensuse.org/repositories/home:non7top/CentOS_CentOS-5/home:non7top.repo
yum install nginx