Install Nginx Stable / Mainline Centos 7

Nginx Stable

yum install -y
yum update -y
yum install nginx -y

Nginx Mainline

sudo echo "[nginx]
name=nginx repo
enabled=1" > /etc/yum.repos.d/nginx.repo
yum update -y
yum install nginx -y

Check nginx

[root@36d00d8fbd5d yum.repos.d]# nginx -v
nginx version: nginx/1.10.2
[root@36d00d8fbd5d 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 :


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
comments powered by Disqus