Configure Local Yum Repository


Task is to create a local yum repository where needed packages are already available in the /packages/downloaded_rpms directory and set the repository ID to localyum

I referred tutorials to how to sync to local repository

In the second link it explains how to create repo for the local directory - createrepo /repository1
that is to set the createrepo /packages/downloaded_rpms

How to set the --repoid to localyum… Not able to figure out

I understand we need to create file with vim /etc/yum.repos.d/localyum.repo
and configure

Is my understanding correct? Please correct if it is wrong, Thanks

yeah everything is perfect. Make sure install that vim package as well to mark task success.

Thanks for the reply, here i am not getting how to set the repository ID to localyum.

Task clearly says to “set the repository ID to localyum”

I understand --repoid is set during executing reposync tool while downloading the rpms…but here we already have the rpms/packages folder downloaded.

name = localyum
baseurl = file:///packages/downloaded_rpms
gpgcheck = 0
enabled = 1

repo id —> [ ]
so your repo id is localyum

1 Like


Thank you so much, got little confused initially, was able to configure and install the required package.