Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

Restore a default RHEL 7.x default repo list of EC2 Instance

Many time, my students have deleted or corrupted a yum repo list of RHEL7 or Centos 7 and i spent lots of time solving these problem. This, this is quick guide to solve a problems when /etc/yum.repos.d has been corrupted or deleted.

Options 1

$ cd /etc/yum.repos.d
$ git clone https://github.com/devopsschool-sample-projects/restore-rhel-centos-aws-default-yum-repo.git

Options 2

$ cd /etc/yum.repos.d

$ curl -o docker-ce.repo https://raw.githubusercontent.com/devopsschool-sample-projects/restore-rhel-centos-aws-default-yum-repo/master/docker-ce.repo

$ curl -o epel-testing.repo https://raw.githubusercontent.com/devopsschool-sample-projects/restore-rhel-centos-aws-default-yum-repo/master/epel-testing.repo

$ curl -o redhat-rhui.repo https://raw.githubusercontent.com/devopsschool-sample-projects/restore-rhel-centos-aws-default-yum-repo/master/redhat-rhui.repo

$ curl -o epel.repo https://raw.githubusercontent.com/devopsschool-sample-projects/restore-rhel-centos-aws-default-yum-repo/master/epel.repo

$ curl -o redhat-rhui-client-config.repo https://raw.githubusercontent.com/devopsschool-sample-projects/restore-rhel-centos-aws-default-yum-repo/master/redhat-rhui-client-config.repo

$ curl -o rhui-load-balancers.conf https://raw.githubusercontent.com/devopsschool-sample-projects/restore-rhel-centos-aws-default-yum-repo/master/rhui-load-balancers.conf

Error:

  • This system is not registered with an entitlement server. You can use subscription-manager to register
  • /var/tmp/yum-root-02AK54/epel-release-latest-7.noarch.rpm: does not update installed package.
Rajesh Kumar
Follow me