To add the NGINX yum repository, create a file named /etc/yum.repos.d/nginx.repo
and paste one of the configurations below within the file:
CentOS:
[nginx] name=nginx repo baseurl=http://nginx.org/packages/centos/$releasever/$basearch/ gpgcheck=0 enabled=1
RHEL:
[nginx] name=nginx repo baseurl=http://nginx.org/packages/rhel/$releasever/$basearch/ gpgcheck=0 enabled=1
Due to differences between how CentOS, RHEL, and Scientific Linux populate the $releasever
variable, it is necessary to manually replace $releasever
with 6
(for 6.x) or 7 (for 7.x), depending upon your OS version.