Google Site SearchFN Site Search FN Blog Login FN Blog Login
Site Navigation:
 
 

How to build your own local mirrorlist for yum in FC3

by Thomas Chung on Nov 11, 2004

By default, yum points to following URL for mirrorlist in Fedora Core 3:

[tchung@localhost ~]$ cat /etc/yum.repos.d/{fedora,fedora-updates}.repo
[base]
name=Fedora Core $releasever - $basearch - Base
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/$releasever/$basearch/os/
mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-core-$releasever
enabled=1
gpgcheck=1
[updates-released]
name=Fedora Core $releasever - $basearch - Released Updates
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/$releasever/$basearch/
mirrorlist=http://fedora.redhat.com/download/mirrors/updates-released-fc$releasever
enabled=1
gpgcheck=1
[tchung@localhost ~]$

To build your own local mirrorlist for yum, first you need to create two local files.
If you are located in US West, you could type following for example:

[tchung@localhost ~]$ sudo vi /etc/yum.repos.d/local-base
# local mirrorlist for US West
http://limestone.uoregon.edu/ftp/fedora/3/$ARCH/os/
http://mirror.stanford.edu/fedora/linux/core/3/$ARCH/os/

[tchung@localhost ~]$ sudo vi /etc/yum.repos.d/local-updates
# local mirrorlist for US West
http://limestone.uoregon.edu/ftp/fedora/updates/3/$ARCH/
http://mirror.stanford.edu/fedora/linux/core/updates/3/$ARCH

Then, you need to update the default fedora.repo and fedora-updates.repo to point to your local mirrorlist.

[tchung@localhost ~]$ sudo vi /etc/yum.repos.d/fedora.repo
[base]
name=Fedora Core $releasever - $basearch - Base
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/$releasever/$basearch/os/
#mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-core-$releasever
mirrorlist=file:///etc/yum.repos.d/local-base
enabled=1
gpgcheck=1

[tchung@localhost ~]$ sudo vi /etc/yum.repos.d/fedora-updates.repo
[updates-released]
name=Fedora Core $releasever - $basearch - Released Updates
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/$releasever/$basearch/
#mirrorlist=http://fedora.redhat.com/download/mirrors/updates-released-fc$releasever
mirrorlist=file:///etc/yum.repos.d/local-updates
enabled=1
gpgcheck=1

Now your yum will use your local mirrorlist instead of default mirrorlist:

[tchung@localhost ~]$ sudo yum update
Setting up Update Process
Setting up Repo:  base
repomd.xml                100% |=========================| 1.1 kB    00:00
Setting up Repo:  updates-released
repomd.xml                100% |=========================|  951 B    00:00
Reading repository metadata in from local files
base      : ################################################## 2622/2622
primary.xml.gz            100% |=========================|  59 kB    00:00
MD Read   : ################################################## 142/142
updates-re: ################################################## 142/142
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package libxml2-devel.i386 0:2.6.16-3 set to be updated
---> Package libxml2-python.i386 0:2.6.16-3 set to be updated
---> Package openoffice.org-i18n.i386 0:1.1.2-11.5.fc3 set to be updated
---> Package openoffice.org-libs.i386 0:1.1.2-11.5.fc3 set to be updated
---> Package libxml2.i386 0:2.6.16-3 set to be updated
---> Package gd-devel.i386 0:2.0.28-1.30.1 set to be updated
---> Package gd.i386 0:2.0.28-1.30.1 set to be updated
---> Package shadow-utils.i386 2:4.0.3-40 set to be updated
---> Package openoffice.org.i386 0:1.1.2-11.5.fc3 set to be updated
--> Running transaction check
                                                                                                
Dependencies Resolved
Transaction Listing:
  Update: gd.i386 0:2.0.28-1.30.1
  Update: gd-devel.i386 0:2.0.28-1.30.1
  Update: libxml2.i386 0:2.6.16-3
  Update: libxml2-devel.i386 0:2.6.16-3
  Update: libxml2-python.i386 0:2.6.16-3
  Update: openoffice.org.i386 0:1.1.2-11.5.fc3
  Update: openoffice.org-i18n.i386 0:1.1.2-11.5.fc3
  Update: openoffice.org-libs.i386 0:1.1.2-11.5.fc3
  Update: shadow-utils.i386 2:4.0.3-40
Is this ok [y/N]: y
Downloading Packages:
libxml2-devel-2.6.16-3.i3 100% |=========================| 1.8 MB    00:05
libxml2-python-2.6.16-3.i 100% |=========================| 439 kB    00:01
openoffice.org-i18n-1.1.2 100% |=========================| 111 MB    05:24
openoffice.org-libs-1.1.2 100% |=========================|  39 MB    01:52
libxml2-2.6.16-3.i386.rpm 100% |=========================| 619 kB    00:01
gd-devel-2.0.28-1.30.1.i3 100% |=========================|  82 kB    00:00
gd-2.0.28-1.30.1.i386.rpm 100% |=========================| 119 kB    00:00
shadow-utils-4.0.3-40.i38 100% |=========================| 483 kB    00:01
openoffice.org-1.1.2-11.5 100% |=========================|  43 MB    02:05
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Updating: libxml2 100 % done 1/18
Updating: gd 100 % done 2/18
Updating: gd-devel 100 % done 3/18
Updating: libxml2-devel 100 % done 4/18
Updating: libxml2-python 100 % done 5/18
Updating: shadow-utils 100 % done 6/18
Updating: openoffice.org-i18n 100 % done 7/18
Updating: openoffice.org-libs 100 % done 8/18
Updating: openoffice.org 100 % done 9/18
Completing update for libxml2-devel  - 10/18
Completing update for libxml2-python  - 11/18
Completing update for openoffice.org-i18n  - 12/18
Completing update for openoffice.org-libs  - 13/18
Completing update for libxml2  - 14/18
Completing update for gd-devel  - 15/18
Completing update for gd  - 16/18
Completing update for shadow-utils  - 17/18
Completing update for openoffice.org  - 18/18
 
Updated: gd.i386 0:2.0.28-1.30.1 gd-devel.i386 0:2.0.28-1.30.1 libxml2.i386 0:2.6.16-3
libxml2-devel.i386 0:2.6.16-3 libxml2-python.i386 0:2.6.16-3 openoffice.org.i386 0:1.1.2-11.5.fc3 
openoffice.org-i18n.i386 0:1.1.2-11.5.fc3 openoffice.org-libs.i386 0:1.1.2-11.5.fc3 
shadow-utils.i386 2:4.0.3-40
Complete!
[tchung@localhost ~]$
References:
- http://fedora.redhat.com/download/mirrors.html
- http://fedora.redhat.com/download/mirrors/