LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-22-2005, 06:47 PM   #1
redhat beginer
Member
 
Registered: Apr 2005
Distribution: Red Hat Enterprise Linux v3
Posts: 32

Rep: Reputation: 15
Editing Yum or Apt Repository addreses


how do I add repositories to my yum and apt programs? I need an address, like http or an ftp and such, put how do I actually edit the sources.list text? Do I command $vim sources list while in the respective directory? How do I save it once added?

Last edited by redhat beginer; 04-23-2005 at 01:31 PM.
 
Old 04-22-2005, 07:39 PM   #2
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 59
Yes, you can use vi sources list to add a proper site.
Press insert so you can add text.
When you are done, press escape.
Then type the command :wq! to save and quit the editing.

You will need a valid url for Redhat enterprise.
 
Old 04-23-2005, 02:50 AM   #3
spariggio82
Member
 
Registered: Apr 2004
Location: Camporotondo Etneo, Sicily
Distribution: SuSE 8.2 SuSE 9.1 Fedora C1 Slackware 10.1 Knoppix 3.9
Posts: 174

Rep: Reputation: 30
If I'm not wrong you should edit your yum.conf file (I don't know the equivalent for apt).

and there add your (new) repositories.

Good luck
 
Old 04-23-2005, 01:57 PM   #4
redhat beginer
Member
 
Registered: Apr 2005
Distribution: Red Hat Enterprise Linux v3
Posts: 32

Original Poster
Rep: Reputation: 15
ok, here is what I did

ok, here is what I did
Quote:
terminal
[measroot@mycomputer apt]# vi sources list
Quote:
[i edited the file and now it looks like this]
rpm http://www.lsc-group.phys.uwm.edu/da...ftware/redhat/
rpm ftp://ftp.au.freshrpms.net/pub/freshrpms/ freshrpms
rpm http://apt.sw.be dries/redhat/el3/en/i386 dries
rpm http://newrpms.sunsite.dk/ newrpms
rpm http://dag.wieers.com/home-made/apt/ dag
rpm http://atrpms.physik.fu-berlin.de/ atrpms

Then I similarly commanded vi yum.config and now my yum.config file looks like

Are these correct? I think that there is a problem tho because when I command as root yum update the output is
Quote:
Gathering header information file(s) from server(s)
Server: Fedora Linux Null - i386 - core
retrygrab() failed for:
http://ayo.freshrpms.net/fedora/linu...rs/header.info
Executing failover method
failover: out of servers to try
Error getting file http://ayo.freshrpms.net/fedora/linu...rs/header.info
[Errno 4] IOError: HTTP Error 404: Not Found
So, uhm, wth is going on?
 
Old 04-23-2005, 03:50 PM   #5
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 59
I don't have RHEL3 so you may want to find real examples for that distro.
These examples using Centos may get you going in the right direction.

Code:
Here is an example of what my apt-get sources.list looks like for CentOS 4.0 .
For your distro, using a valid url, it should be similar in style to this.

#rpm http://caos.oregonstate.edu /centos-4/4.0/apt/i386 os updates
#rpm-src http://caos.oregonstate.edu /centos-4/4.0/apt/i386 os updates

rpm http://mirror.cs.wisc.edu /pub/mirrors/linux/centos/4.0/apt/i386 os updates
#rpm-src http://mirror.cs.wisc.edu /pub/mirrors/linux/centos/4.0/apt/i386 os updates

Earlier versions like the one you have just used the /etc/yum.config instead of the /etc/yum.repos.d/centos.repo like I'm using. 
Here is what the /etc/yum.repos.d/centos.repo file looks like 
but you can keep using the /etc/yum.config .

[base]
name=CentOS-$releasever - Base
baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1

#released updates 
[update]
name=CentOS-$releasever - Updates
baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1

Last edited by homey; 04-23-2005 at 03:51 PM.
 
Old 04-24-2005, 12:11 PM   #6
redhat beginer
Member
 
Registered: Apr 2005
Distribution: Red Hat Enterprise Linux v3
Posts: 32

Original Poster
Rep: Reputation: 15
Thanks guys, this has been helpful.


Here is what my yum.conf file looks like now
Quote:
[main]
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
gpgcheck=1
tolerant=1
exactarch=1

[dries]
name=Extra Fedora rpms dries - $releasever - $basearch
baseurl=http://apt.sw.be/dries/redhat/el3/en/i386/dries
I commanded as root yum update, seems to have worked, but found nothing to update (I think I had been able to update via the apt-get command, so I think its functioning properly).

From what I understand, its rude to download directly from a big site, and better to have that baseurl above, followed by a url for a mirror. Does anyone know a mirror for that site? Or is my thinking incorrect?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
yum repository problems kpachopoulos Fedora 2 07-28-2005 07:03 PM
Yum repository quesiton satimis Fedora 25 04-29-2005 11:19 PM
Creating A Yum Repository SepitvaOra Linux - Newbie 1 04-04-2005 06:54 AM
CentOS' YUM repository not updating? guest cAos 3 03-19-2005 03:57 AM
yum repository for redhat 9 csfalcon Linux - Software 1 10-20-2004 11:31 AM


All times are GMT -5. The time now is 06:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration