Install Nginx Stable / Mainline Centos 7

Nginx Stable

yum install http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm -y
yum update -y
yum install nginx -y

Nginx Mainline

sudo echo "[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/mainline/centos/7/\$basearch/
gpgcheck=0
enabled=1" > /etc/yum.repos.d/nginx.repo
yum update -y
yum install nginx -y

Check nginx

[[email protected] yum.repos.d]# nginx -v
nginx version: nginx/1.10.2
[[email protected] yum.repos.d]# nginx -v
nginx version: nginx/1.11.9

If you encounter, “Not using downloaded repomd.xml because it is older than what we have” try “yum clean all”

Source :

  1. http://nginx.org/en/linux_packages.html#mainline

Server is powered by Digital Ocean, use my referral link to get $10 bonus.

Fajri Abdillah

A father with 1 awesome wife and 1 awesome son. Have 3 salt water tank (and will be add more). I'm also collecting Hotwheels, small investment for my son.

Bandung, Indonesia https://fajri.my.id
comments powered by Disqus