Ask Your Question

How do I create a repository

asked 2018-02-10 02:33:30 +0000

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 09:40:48 +0000

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-10 02:51:39 +0000

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 ( 2018-02-10 03:51:45 +0000 )edit

answered 2018-02-10 09:51:02 +0000

Glenn gravatar image

updated 2018-02-10 10:20:41 +0000

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 05:13:17 +0000

hello 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 ( 2018-02-10 07:03:01 +0000 )edit

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

Glenn ( 2018-02-10 09:43:52 +0000 )edit

Thank you all!

toddandmargo ( 2018-02-10 14:02:19 +0000 )edit

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

Glenn ( 2018-02-10 23:25:14 +0000 )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 :)

hello ( 2018-02-11 03:05:15 +0000 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Use your votes!

  • Use the 30 daily voting points that you get!
  • Up-vote well framed questions that provide enough information to enable people provide answers.
  • Thank your helpers by up-voting their comments and answers. If a question you asked has been answered, accept the best answer by clicking on the checkbox on the left side of the answer.
  • Down-voting might cost you karma, but you should consider doing so for incorrect or clearly detrimental questions and answers.

Question Tools

1 follower


Asked: 2018-02-10 02:33:30 +0000

Seen: 92 times

Last updated: Feb 10