Ask Your Question
1

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
1

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:

[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
1

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

davidva gravatar image
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-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

Comments

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
0

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

abadrinath 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 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

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

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

Seen: 507 times

Last updated: Feb 10