Creating local repo for fedora

Creating local repo for fedora
Requirment : createrepo package should be already installed in system if not, get it install by using yum
# yum install createrepo -y
Now
method :  insert your fedora disk and mount it on /media
now create a directory to copy files from cd.
# mkdir /myrepo
now copy  all rpm files from cd to the folder. I will use find command to search all rpm files and copy
# find /media -name "*.rpm" -exec cp {} /myrepo/ \;
Now create repo metadata
# createrepo -v /myrepo
create a repo file for above base
# vi /etc/Yum.repose.d/local.repo
insert follow lines  and save the file

[local]
name=My Local Repository
baseurl=file:///myrepo
gpgcheck=0
enabled=1

Done!!!  
just test
# yum repolist

Comments

Popular posts from this blog

using libguestfs virt-customize tool to modify qcow2 image and reset root password.

Running cockpit behind nginx reverse proxy with nginx ssl and cockpit non ssl

setting up openshift alert manager mail alerting based on critical and warning