View Full Version : up2date with mirrors (yum-mirror)
10th August 2004, 06:31 PM
It appears that much anticipated mirror functionality is in up2date. This is a bit of explaination of how (I think) it works, and how to select different mirrors. When up2date was first yummified, it was slow as everybody hit the main servers, causing people to use yum directly with a modified yum.conf.
Now if you look at /etc/sysconfig/rhn/sources in a recent up2date you will find something like this:
yum-mirror fedora-core-2 http://fedora.redhat.com/download/up2date-mirrors/fedora-core-2
yum-mirror updates-released-fc2 http://fedora.redhat.com/download/up2date-mirrors/updates-released-fc2
These are links to text files of mirror URLs. If you look at the index (http://fedora.redhat.com/download/up2date-mirrors/) you can see a whole lot of them, some for Core 1, some for 2. There are ones for geographic locations, by country code.
Let's say you were in the UK and wanted mirrors closer to you for faster updates. Merely change the yum-mirror updates-released-fc2 http://fedora.redhat.com/download/up2date-mirrors/updates-released-fc2 entry to yum-mirror updates-released-fc2 http://fedora.redhat.com/download/up2date-mirrors/updates-released-fc2.uk
I hope this enables faster updates for people. Keep on updating!
17th January 2005, 03:05 AM
Thanks for the info, I've been looking for this for quite some time.
Some things I've learned:
If you just leave it as it is up2date will find a server on it's own. I'm from Canada, so after I deleted my .ca and ran up2date it tried to use a server from germany. I'm not sure how up2date chooses the server, but it's choice was terrible. I tried this out because my Canadian server eventually gave me a bad package and up2date complained about a corrupted gpg key so I had to abort. I was getting 3 kb/s transters, not nice on a dsl connection.
A nice thing though, is if you choose an untried server and try to install everything (like me) and it borks, you can relaunch up2date and install a few of the packages it already downloaded.
When trying a server only download a few packages to see it's transfer speeds and to minimize the risk of a having to relaunch the app.
I'm also going to try pointing yum-mirror to a local file that points to a server, if that works I can change the server without having to go into the rhn sources file as admin all the time.
17th January 2005, 03:44 AM
Rats I may have messed around too much. The rhn notifier is still bugging me about updating a bunch of packages but when I run up2date now I get: Your system is fully updated. No new packages are needed.
I'll reboot, and get back to you, I have an updated kernel to try out anyways.
17th January 2005, 04:05 AM
The only solution is to wait a few hours. [Edit: Not so I posted here: http://www.fedoraforum.org/forum/showthread.php?t=22781&highlight=system+fully+updated]
Back to the local yum-mirror file idea:
in /etc/sysconfig/rhn/sources add for example:
yum-mirror fedora-core-3 file:///home/user/fedora-core-3
yum-mirror updates-released-fc3 file:///home/user/updates-released-fc3
or wherever in your /$home directory; You can also add other mirrors for up2date to randomly pick.
If you just want to leave your /etc/sysconfig/rhn/sources as is, that's fine, but it's a hit and miss situation. I mentioned that a german mirror chosen by up2date was poor, but I later ran up2date again and the server it used downloaded the zip rpm at 145 kps. To see which mirror up2date has chosen just click on one of the channels on the channel screen, you'll see it in the information box.
17th January 2005, 07:19 AM
Thanks for the info and update.
up2date may have gotten a little smarter, this was from a while ago.
I'm glad to see there is FC3 mirror lists though, so this isn't out of date yet. :)
18th January 2005, 07:02 AM
yum/apt mirror support in up2date
as of up2date 4.3, up2date supports a list of mirrors for
The configuration for mirrors is spread out a bit for
flexibility, but should be easy enough.
The first thing to enable use of mirrors is to add a
"yum-mirror" or "apt-mirror" config line in
/etc/sysconfig/rhn/sources. This line is of
yum-mirror channel-label uri
apt-mirror channel-label uri
The uri is a location where a mirror list can be
found. This can be a local file:// url or a http
url. This file will be fetched, and parsed. The format
is one url per line, with the url being equilivent to
the base url in the sources file:
for example, a mirrors list for fedora-core-1 might look like:
By default, up2date will fetch this file each time it is
ran, and update it.
If the user wants to limit the list of mirrors, they
can create a file in /etc/sysconfig/rhn/mirrors/ with
the name of the channel as the filename. For example,
/etc/sysconfig/rhn/mirrors/fedora-core-1 might contain:
up2date will parse this file, and randomly pick one of the
mirrors in it to use for the duration of the up2date sesssion.
Note that if the /etc/sysconfig/rhn/mirrors/CHANNELNAME file
exists, up2date will use it, and will not fetch the mirror
list from the uri listed in /etc/sysconfig/rhn/sources for
the "yum-mirror" type
Note: if the yum-mirror line doesnt exist in the config
file for a given channel, no mirrors will be used and
the url specified for that channel will be used instead.
I believe I was having problems with my local files because they had commented lines, this seems to lead up2date to barf out the line that the system is already updated. I'll correct this and try again. Interesting to not e that there is an apt-mirror option as well. To confirm my earlier question, yes, the process of finding a server is totally random, and not a best server pick. I believe the all the urls listed in a local file will be chosen at random as well.
11th March 2005, 02:40 PM
Hi. I have 2 Fedora systems. I think it would be real good to just run up2date on one and have the other look to that one for it's updates. Is there a way I can do this?
I would like to do a new install on a laptop of Fedora. It would be super if I could just get the updates from my other all ready up2date Fedora. Is there a way and if so how would I do it?
So meny times I have to run up2date because some times it will get errors. I do up2date again and it works. Some times up2date is so very slow. This is why it be good to have it get the up2date files from one that is all ready up2date on my LAN.
I seen a lot of files in /var/spool/up2date a lot end in .rdr I a not sure if it keep the updated .rpm 's or not.
11th March 2005, 02:59 PM
This article from fedoranews.org http://fedoranews.org/contributors/richard_flude/repo/ explains how to set up your own custom repository. The linked article contains further links to two other, older documents which discribe a similar process but for <FC3, which may be useful to you as well. This should get you at least some if not all the way...
11th March 2005, 04:46 PM
Thank you ucfagls.
I looked at that link (http://fedoranews.org/contributors/richard_flude/repo/). But I think the best what I found is here (http://www.phoronix.com/scan.php?page=article&item=135&num=1) I am still working on it. If it works I will post back here.
12th March 2005, 12:29 AM
I did not run a update on this fedora core 3 for about 3 weeks.
openoffice.org-1.1.3-9.5.0. Got up to about 415 k/sec I did not see the hard drive LED go on the server that is named small. I set it up with the saved up2date file on it.
I edit /etc/sysconfig/rhn/sources and changed http://download.fedora.redhat.com/pub/fedora/linux/core/updates/3/$ARCH/ to http://small/mirror/ then running up2date.
You can see in the LAN_up2date.txt file a lot of "is not a symbolic link" I can only guess this is because I updated from core 1 to core 2 and then core 3 no new install of core 2 or 3.
I hardly use the disktop or X windows I guess it's called. But there is only one bar on the buttum no top one and a open window minamizing it will disapear so that I can not reopen it. I guess this is all because I updated and did not do a fresh install.
Here is my SSH text to do all this: (http://mywebpages.comcast.net/raymondday/LAN_up2date.txt)
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.