Software Knowledge

  1. Home
  2. Docs
  3. Software Knowledge
  4. LINUX
  5. Redhat 7: Using repository for yum from CentOS repository
Generic selectors
Exact matches only
Search in title
Search in content

Redhat 7: Using repository for yum from CentOS repository

# vi /etc/yum.repos.d/centos.repo

[centos]

name=CentOS-7

baseurl=http://ftp.heanet.ie/pub/centos/7/os/x86_64/

enabled=1

gpgcheck=1

gpgkey=http://ftp.heanet.ie/pub/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7

# yum repolist

=========== Another edition

mount /dev/sr0 /mnt/cdrom

# cp /mnt/cdrom/media.repo /etc/yum.repos.d/rhel7dvd.repo

# chmod 644 /etc/yum.repos.d/rhel7dvd.repo

# vi /etc/yum.repos.d/rhel7dvd.repo (add 3 more lines)

gpgcheck=1

enabled=1

baseurl=file:///mnt/disc/BaseOS

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

# yum clean all

# yum repolist enabled

# yum repolist enabled

Last Updated on Thursday, 08 July 2021 23:44