Centos – How to add a CentOS repo, having URL of Packages

centospackage-managementrepositoryrpmyum

In Centos 7, I want to install some packages that I see in the following URL:
http://mirror.centos.org/centos/7.4.1708/extras/x86_64/Packages/

How can I add this URL to my yum package manager ?

PS: downloading a single rpm file doesn't work, because it looks recursively for dependencies with the same version.

Best Answer

Yum utils is a package which provides yum-config-manager. A quick and easy way to add a repo without the hassle writing a repo file and enabling is to use this as a sudo user

yum-config-manager --add-repo=http://vault.centos.org/centos/7.4.1708/extras/x86_64/

This will create the file and enable it for you.

P.S. Guide to install yum-utils if you don't have it already. It's part of the base CentOS repo. Usually on most yum systems, yum-utils is a must have!

Related Question