• Skip to main content

Uly.me

cloud engineer

  • Home
  • About
  • Archives

Yum Add Repo Manually

August 5, 2019

Add a yum repo manually by adding a configuration file in /etc/yum.repo.d/ directory.

cd /etc/yum.repos.d/
vi newrepo

cd /etc/yum.repos.d/ vi newrepo

Add the following.

[newrepo]
name=New Repo for RHEL/ CentOS $releasever - $basearch
baseurl=http://newrepo.domain.com/centos/$releasever/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://newrepo.domain.com/RPM-GPG-KEY.txt

[newrepo] name=New Repo for RHEL/ CentOS $releasever - $basearch baseurl=http://newrepo.domain.com/centos/$releasever/$basearch/ enabled=1 gpgcheck=1 gpgkey=http://newrepo.domain.com/RPM-GPG-KEY.txt

You may need to import the key.

rpm --import http://newrepo.domain.com/RPM-GPG-KEY.txt

rpm --import http://newrepo.domain.com/RPM-GPG-KEY.txt

Finally, test the new repo by running the following.

yum update -y
yum install new-package

yum update -y yum install new-package

Filed Under: Cloud Tagged With: 3rd party, add, new, repo, yum

Search This Website

Subscribe Via Email

  • Home
  • About
  • Archives

Copyright © 2023