How To Setup Official Yum Repository On CentOS 7

Please Read This 👇🏾


Hello Guys, Today we will see how can we add a yum repository from official link.Probably you have created a local yum repository by mounting your ISO to local system & then configuring .repo file. Same we will do this with official repository. This is for those who don't want to maintain the local ISO file any more.

Just follow the below steps to configure the yum repository from the official link. What you need is a working internet connection.

Note: I am using CentOS 7.6 Linux for this demo.You can use any rpm base distro, please choose official package repository accordingly.
1) Visit the official website and find the compatible repository for your OS version.

2) Once you select the repository for your Linux OS , go inside it.

3) Now go to /etc/yum.repo.d/ path in your CentOS/Redhat system.

4) Create a blank file with any_name.repo file with vim/nano editor, Please note that extension should be end-up with .repo.

5) copy/paste below lines in it.

see below example

Note: If you want to setup local yum repository, first copy your CD/ISO data to local path & then change baseurl from remote link to local as file:///local_path/  and disable the gpgcheck=0
also remove the gpgkey if disabling the gpgcheck

6) save the file.

7) run command yum update

8) You have successfully added the yum repository from the official server link.
 That's All

Post a Comment