Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

With one repository I did it like this (as root):

# cd /etc/yum.repos
# wget https://some.repo.example.org/foo/bar/Fedora_14/foo_bar.repo
# grep enabled foo_bar.repo
enabled=1

Is this the recommended way to add a package repository under Fedora (>= 14)?

Is there some policy/standard which specifies that each proper Fedora package repository should (or must) contain such a config file (i.e. such a .repo file)?

(basically just for the reason that a user or some tool can copy it to the local /etc/yum.repos directory?)

share|improve this question
1  
@Tshepang: I don't understand. Have you mixed up question mark and full stop in your comment? And what typo are you referring to? Just point out the typo or edit my question and fix it since you have already spotted it. I fix the last question - but I don't know if this is the typo you mean ... –  maxschlepzig Feb 4 '11 at 0:12
2  
I made those prompts # because you said you ran the commands as root. That's the convention, and that's what root prompt looks like. –  Tshepang Feb 4 '11 at 8:43
    
@Tshepang, fair enough - changed the prompt to the common # convention. –  maxschlepzig Dec 17 '11 at 18:27

5 Answers 5

up vote 6 down vote accepted

I googled a bit around with 'fedora add repository' and got some outdated and not very helpful links. Because of the noise I missed this link:

http://docs.fedoraproject.org/en-US/Fedora_Core/3/html/Software_Management_Guide/sn-using-repositories.html

Which is kind of outdated as well, but it gives me the hint to look for an updated version of the software management guide:

Add New Repositories

(which also mentions the wget method I used to add a .repo file)

I am a bit surprised that the official and as it seems quite extensive fedora documentation is not higher scored in the google results.

share|improve this answer
    
The first link is to the Fedora Core 3 documentation, which is 5-6 years out of date. –  James Antill Feb 16 '11 at 14:54
    
@James Antill: Yeah - kind of outdated was used as an euphemism. ;) Anyways, when I googled the query, the 5-6 year old fedora link is what I got on the first result page (position > 20). Don't know if the fedora project pages do some stuff to annoy the google bot? –  maxschlepzig Feb 16 '11 at 16:03

See here: Howto: Add a new yum repository to install software under CentOS / Redhat Linux

share|improve this answer
3  
Note that the above url is for RHEL-5, which is 3 years old (so quite old compared to Fedora 14). –  James Antill Feb 16 '11 at 14:56

It appears that in recent versions of Fedora, there was an attempt to integrate a "Media Repo" with PackageKit, but there were enough bugs that it was left out of Fedora 14 (this for example). It sounds like you're going to have to follow the directions mentioned in the other answers to either copy the packages locally or mount the ISO image as a loopback device, and set up yum file:// URLs to point a the packages.

share|improve this answer

The Fedora 14 docs. haven't been updated yet. The latest way to do this with just a .repo file is:

yum-config-manager --add-repo=https://some.repo.example.org/foo/bar/Fedora_14/foo_bar.repo

...you can then use yum-config-mananger --enable etc. too.

share|improve this answer

Adding a repository is quite easy in red hat or in any other redhat based system's. Its a matter of a repo file, which will specify the url from where to fetch the rpm files to install.

However if you want to understand the complete working of yum. I will recommend reading the below link.

YUM repository configuration

share|improve this answer

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.