Search Perform an advanced search query SOFTPEDIA
 
SOFTPEDIA
Updated one minute ago
HomeSubmit a program for being reviewedAdvertise on our websiteGet help on surfing our websitesSend us your feedbackGet information about our XML/RSS backend and how to use itBrowse the news archiveVisit our discussion forumVizitati forumul in limba romana



KLIP
  1. HOME
  2. SCIENCE
  3. TECHNOLOGY
  4. WEBMASTER
  5. SECURITY
  6. MICROSOFT
  7. LINUX
  8. APPLE
  9. GAMES
  10. TELECOMS
  11. REVIEWS
  12. LIFE & STYLE
  13. EDITORIALS
  14. INTERVIEWS
  15. RSS
Welcome!
Hello, Guest

Login if you have a Softpedia.com account.

Otherwise, register for one.

OTHER TIPS, TRICKS AND TUTORIALS

Creating a Local Update Repository for FC6

- How to create a local update repository for FC6 LAN computers.

By: Mihai Marinof, Linux Editor

Because Fedora Core is an RPM based Linux distribution, it's quite easy to keep it up to date. Fedora can easily be updated through yum, an update tool which fetches the latest RPM packages from a mirror and installs them. A mirror is a server that provides a copy of one or more files. Mirroring a site reduces traffic to the original source site and spreads the stress and bandwidth costs across other sites. Running a local mirror however, offers very fast access through the LAN connection to local users. Think about it this way: if you're the network admin of a network composed of Fedora Core systems, those systems will need to be updated at some point. And because they are all using the same distribution, the downloaded update packages will be the same. So basically, the computers in that network will use your precious bandwidth to download the same update files, several times, at rather low speeds. Pointless. A local update mirror will prevent unnecessary bandwidth usage by downloading the packages once and then provide them to the local computers at blazing speeds.

1. Install createrepo and repoview

CODE

yum -y install createrepo repoview


You will also need a working Apache (httpd) and Cron installation on your system.

2. Create
the directories


CODE

mkdir -pv /var/www/html/yum/{base,updates}
mkdir -v /var/www/html/yum/updates/6
mkdir -v /var/www/cache


3. Copy the RPMs from the Fedora Core 6 CDs/DVD to /var/www/html/yum/base

4. Create the base repository headers

CODE

createrepo /var/www/html/yum/base


This command will create a new directory, repodata, within the base directory and will contain the files: filelists.xml.gz, other.xml.gz, primary.xml.gz and repomd.xml. This process will take some time, depending on your CPU and disk speed.

5. Select an rsync updates mirror

- Click HERE and choose the nearest mirror which starts with rsync://.

6. Synchronize the local updates directory with the mirrored one

- Append /updates/6/i386 to the chosen rsync mirror. For example, if you choose:
rsync://sunsite.icm.edu.pl/fedora/linux/core/,
it becomes:
rsync://sunsite.icm.edu.pl/fedora/linux/core/updates/6/i386.

- Synchronize the local directory content with the remote one:

CODE

rsync -avrt rsync://sunsite.icm.edu.pl/fedora/linux/core/updates/6/i386
--exclude=debug/ --exclude=repodata/ --exclude=*debuginfo* --exclude=*i18*
--exclude=*langpack* /var/www/html/yum/updates/6


NOTE: The Romanian rsync address (iasi.roedu) isn't correctly written. The correct rsync address is rsync://ftp.iasi.roedu.net/fedora-core-updates/6/i386.

- Create the repository headers:

CODE

createrepo -q -c /var/www/cache/ /var/www/html/yum/updates/6/i386


- Create the RSS feed:

CODE

repoview -qu http://localhost/yum/updates/6/i386 /var/www/html/yum/updates/6/i386


Replace localhost with your webserver address.

7. Create a daily cron script

- Create a new file

CODE

touch /etc/cron.daily/repository


- Open it using your favorite text editor and add this content, after you've modified it to suit your system:

CODE

#!/bin/bash

rsync -avrt rsync://sunsite.icm.edu.pl/fedora/linux/core/updates/6/i386
--exclude=debug/ --exclude=repodata/ --exclude=*debuginfo* --exclude=*i18*
--exclude=*langpack* /var/www/html/yum/updates/6

createrepo -q -c /var/www/cache/ /var/www/html/yum/updates/6/i386

repoview -qu http://localhost/yum/updates/6/i386 /var/www/html/yum/updates/6/i386

exit 0


At this point, only new updates and headers will be downloaded to your repository, once a day.

8. Edit yum configuration file

- You will now have to edit the /etc/yum.conf file on every local network machine that will use the new repository. Add the following content to the end of the yum.conf file:

CODE

[updates-released]name=Fedora Core $releasever - $basearch - Released Updates
#mirrorlist=http://fedora.redhat.com/download/mirrors/updates-released-fc$releasever
baseurl=http://192.168.0.xx/yum/updates/$releasever/$basearch/
enabled=1
gpgcheck=0

[base]name=Fedora Core $releasever - $basearch - Base
baseurl=http://192.168.0.xx/yum/base/RPMS
#mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-core-$releasever
enabled=1
gpgcheck=0


NOTE: You will have to replace the 192.168.0.xx address with the correct server's LAN address. Moreover, on the machine holding the repository, replace that address with localhost.

- Now edit the /etc/yum.repos.d/fedora-updates.repo file on each machine and disable the updates section. To do this, look for the line enabled=1 under the [updates] section and replace it with enabled=0.

If everything worked out well, you should be able to run yum update from any of the local computers and it will use the local repository as the update mirror.

MORE RELATED ARTICLES: Local DNS Cache for Faster Browsing Wolfenstein: Enemy Territory Server Setup How to Bind a Range of IPs Screencast Guide: Capure Your Linux Desktop on Video! How to Setup an Encrypted Filesystem Grant Root Privileges to Regular Users Setting Up a SHOUTcast Server DSP Plug-In Resetting a Forgotten Root Password
 
Comments | Link here | Subscribe
Print | Send to friend
Today's News | Yesterday's News

Search:

4th January 2007, 10:16 GMT | Copyright (c) 2007 Softpedia | Contact:
Read by 11,622 user(s) | Rating: | 10 vote(s) so far | Cast your vote:
Creating a Local Update Repository for FC6 - USER OPINIONS

Comment #1 by Anoop on 2008-02-12, 00:56 GMT reply to this comment 
good article to understand step by step configuration of yum repository on fc 6


go to top


SHARE YOUR OPINION ABOUT Creating a Local Update Repository for FC6

Since you are not logged on, your comments will have to be approved before being displayed.
Click here to login, or register.
Your Name:
Your Email:
Type in the result:
Your Opinion:
 


DO YOU WANT TO CONTACT US?  

If you have some comments or you want to send us some information you can send us an email directly to .
You can use the form below for the same purpose.
Your full name: (at least 3 characters)
Your email address: (at least 5 characters)
Message subject: (at least 5 characters)
Message text:
(at least 10 characters)
Type in the result:
 
 



© 2001 - 2008 Softpedia. All rights reserved.
Softpedia™ and Softpedia™ logo are registered trademarks of SoftNews NET SRL.
Copyright Information | Privacy Policy | Terms of Use | Contact Softpedia | Update your software | Archive