User Tools

Site Tools


wiki:how_to_set_the_centos-base.repo

This is an old revision of the document!


How to set the CentOS-Base.repo

Mar 2017


I have noticed this on the MFEL G7 appliances, this is probably true on other appliance based and software only based products also.

Because the minimal install is used for the CentOS release on appliances, the base repos are not present, this is not an issue until you need certain features (normally when fault finding) like:

  htop
  nload
  tcpdump


To install these you need to setup the base (and possibly EPEL) repositories, or when trying to use Yum Install you will get errors.

To get the base repositories added, you need to navigate to the following location (this is for CentOS, other distributions may differ).

  /etc/yum.repos.d


If this folder is empty then you have no repositories set, you might see other repositories (like epel) but not the base ones.

Create a new file called CentOS-Base.repo copy the following text in to it and save.

[base] name=CentOS-$releasever - Base mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/ gpgcheck=1 gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 #released updates [updates] name=CentOS-$releasever - Updates mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra #baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/ gpgcheck=1 gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#additional packages that may be useful [extras] name=CentOS-$releasever - Extras mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra #baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/ gpgcheck=1 gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 #additional packages that extend functionality of existing packages [centosplus] name=CentOS-$releasever - Plus mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra #baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/ gpgcheck=1 enabled=0 gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

wiki/how_to_set_the_centos-base.repo.1492778497.txt.gz · Last modified: 2023/03/09 22:35 (external edit)