Ask Your Question

How do I create a repository

asked 2018-02-09 20:33:30 -0500

toddandmargo gravatar image

Hi All,

I need to send someone directions of how to "create" a repository. Google only gives me how to "use" a repository.

Many thanks, -T

edit retag flag offensive close merge delete

4 Answers

Sort by ยป oldest newest most voted

answered 2018-02-10 03:51:02 -0500

Glenn gravatar image

updated 2018-02-10 04:20:41 -0500

Create a repo folder.

mkdir /testrepo

Copy some rpm files into /testrepo. Install createrepo

dnf install createrepo

Change working folder to /testrepo

cd /testrepo

Create repository metadata

createrepo /testrepo

Change to /etc/yum.repos.d and create a .repo file

cd /etc/yum.repos.d
nano testrepo.repo

In this .repo file add the following text:

name=Test Repository

Run dnf update and then dnf repolist. You should see testrepo included in the repository listing.

Additionally, by installing and using repoview and adding a stanza to httpd.conf my local yum repository is available to other machines on the home network.

edit flag offensive delete link more

answered 2018-02-10 03:40:48 -0500

davidva gravatar image
dnf -y install createrepo

change to directory with yours rpms....

createrepo .

Open gedit...

gedit toddandmargo.repo

put it, and change your user name and path with your rpms...

baseurl=file:///home/your_username/your-directory-with your-rpms

save && close gedit

cp -f toddandmargo.repo /etc/yum.repos.d/
dnf clean all && dnf -y update
edit flag offensive delete link more

answered 2018-02-09 20:51:39 -0500

aeperezt gravatar image

From what I remember adding the rpm files to a http server and creating the repo file on /etc/yum.repos.d will do the trick, have not done that in quite a bit. But found this seems solid for what I read This page it is for Red Hat but should work if you follow the steps.

edit flag offensive delete link more


I need the directions on how to set up a repo server, not how to read/use a repo

toddandmargo gravatar imagetoddandmargo ( 2018-02-09 21:51:45 -0500 )edit

answered 2018-02-09 23:13:17 -0500

abadrinath gravatar image

Configuring DNF and DNF Repositories will give you the right answers. Good luck.

edit flag offensive delete link more



Your link is all about how to use DNF, not how to create a repository. :'(

toddandmargo gravatar imagetoddandmargo ( 2018-02-10 01:03:01 -0500 )edit

Google shows many examples on how to create a dnf / yum repository.

Glenn gravatar imageGlenn ( 2018-02-10 03:43:52 -0500 )edit

Thank you all!

toddandmargo gravatar imagetoddandmargo ( 2018-02-10 08:02:19 -0500 )edit

So is this solved or are you still having issues? I've created many local repositories. It really is pretty simple.

Glenn gravatar imageGlenn ( 2018-02-10 17:25:14 -0500 )edit

My link shows how to "set up your own custom DNF repository." It's in there. A simple google search should yield good results too. Have fun :)

abadrinath gravatar imageabadrinath ( 2018-02-10 21:05:15 -0500 )edit

Question Tools

1 follower


Asked: 2018-02-09 20:33:30 -0500

Seen: 1,476 times

Last updated: Feb 10 '18