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
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
Post a Comment