I’m trying to setup a local repo for packages that I’m creating, I installed httpd and createrepo, I created a folder for the repo and ran
createrepo /var/www/html/repos, but when I put rpms in it dnf/yum fail to syncronize/cache what’s in it, what do I have to do so yum/dnf recognize what’s in the repo?
Heya—sorry, not clear about this. Did you run
createrepo before adding the rpms? If so, that’s the wrong order. You first put the rpms in, then run
createrepo. It will create the “repodata” which dnf/yum will then use.
- Put rpms in
- run createrepo
- open gedit or any favourite text editor of yours and add the following texts into it
name=My local Repository
- Save the text file as “
local.repo into /etc/yum.repos.d/ (
mv ./local.repo /etc/yum.repos.d/)
You can now run
dnf. The above configuration assumes that the repo is on the same machine – otherwise the
baseurl should be something like this:
http://your-hostname/repos/ (i.e. assumig your local repo is being served by apache)