分类: LINUX
2006-02-21 02:21:45
Update February 8, 2006: There is a new version of createrepo that optionally creates a local disk cache. This means that you can incrementally update repodata very quickly. Our cron job script now looks like this:
rsync -avrt rsync://distro.ibiblio.org/fedora-linux-core/updates/4/i386 \
--exclude=debug/ --exclude=repodata/ --exclude=*debuginfo* --exclude=*i18* \
--exclude=*langpack*/var/www/tqmcube/yum/Fedora/core/4/updates
createrepo -q -c /var/www/cache /var/www/tqmcube/yum/Fedora/core/4/updates/i386
repoview -qu http://tqmcube.com/yum/Fedora/core/4/updates/i386 \
/var/www/tqmcube/yum/Fedora/core/4/updates/i386
In the above example, the "-u" option for repoview creates a RSS feed.
In addition to rawhide, I've made the release available via ftp: ftp://ftp.tqmcube.com/pub/createrepo-0.4.3-5.1.noarch.rpm
Update January 26, 2006: We highly recommend repoview, now available in Fedora Extras. Screen Shots
If you have several computers to update via yum then you should consider creating a local repository. Not only does this conserve bandwidth (updates are downloaded only once) but it improves the responsiveness of yum for installing additional programs. Just about anything that you do with yum is considerably faster (LAN vs. WAN). The downside is that you will probably download updates that are unnecessary for any of your machines. You can reduce this with additional "exclude" statements like "--exclude=*i18*" (see man rsync).
Degree of Difficulty:Easy
Requires:Approximately 5 gb of Disk Space
Package: createrepo (su yum -y install createrepo)
mkdir -pv /var/www/html/yum/{base,updates}
"createrepo /var/www/html/yum/base"
This might take some time, depending upon the speed of your processor(s) and HD.
On successful conclusion, createrepo should create a directory /repodata. The contents should be:
filelists.xml.gz, other.xml.gz, primary.xml.gz, repomd.xml
A list is at
and these are identified
with “rsync.” For example:
"rsync://distro.ibiblio.org/fedora-linux-core/". The mirrors share a
common structure for updates. Simply append /updates/
rsync://distro.ibiblio.org/fedora-linux-core/updates/4/i386
"rsync -avrt rsync://distro.ibiblio.org/fedora-linux-core/updates/4/i386 \
--exclude=debug/ /var/www/html/yum/updates"
This will create a complete update repository at /var/www/html/yum/updates/i386. The repodata directory will be created with all of the headers.
At this point you can create a cron job for the rsync command, above. Only new updates and headers will be downloaded to your repository.
[updates-released]
name=Fedora Core $releasever - $basearch - Released Updates
#mirrorlist=
baseurl=
enabled=1
gpgcheck=1
[base]
name=Fedora Core $releasever - $basearch - Base
baseurl=
#mirrorlist=
enabled=1
gpgcheck=1
On the machine with the repository, substitute localhost for the IP address.
And that does it. Please use the contact form for feedback, comments, suggestions, edits, rants and raves.
If you want to guarantee that your IPA will be included in our spam trap and distributed blocklist, simply send email to SysAdmin@TQMcube.com and we will be happy to oblige. Otherwise, please use the contact form.