English
Ask Your Question
1

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
1

answered 2018-02-10 09:40:48 +0000

su
dnf -y install createrepo
exit

change to directory with yours rpms....

createrepo .

Open gedit...

gedit toddandmargo.repo

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

[local_toddandmargo]
name=toddandmargo
baseurl=file:///home/your_username/your-directory-with your-rpms
enabled=1
gpgcheck=0

save && close gedit

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

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

Comments

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
1

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:

[testrepo]
name=Test Repository
baseurl=file:///testrepo/
enabled=1

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
0

answered 2018-02-10 05:13:17 +0000

hello gravatar image

https://docs.fedoraproject.org/f27/sy...

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

edit flag offensive delete link more

Comments

1

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

Follow
1 follower

Stats

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

Seen: 92 times

Last updated: Feb 10