Google
 
Web QrooniX

Monday, July 16, 2007

Linux Local Yum Repository

Create the directories to be used:

mkdir -pv /var/www/html/centos/5/{base,updates}

Populate the base repository by copying all the rpms from the CDs/DVD.
Check if createrepo is installed:

rpm -qa | grep createrepo

If not, then:

yum -y install createrepo

Then issue the following command to create the headers:

createrepo
/var/www/html/centos/5/base

To populate the updates, you may have to choose the nearest mirror to rsync. Issue to following command to sync with your chosen mirror:

rsync -avrt rsync://ftp.iij.ad.jp/centos/packages/centos/5.0/updates/i386 \ --exclude=debug/ /var/www/html/centos/5/updates

Order some pizza and buy a six pack :)

Set the local machines to get their updates from your local repo:

vi /etc/yum.repos.d/CentOS-Base.repo

[base]
name=CentOS-$releasever - Base
baseurl=http://10.2.*.*/centos/$releasever/os/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

#released updates
[update]
name=CentOS-$releasever - Updates
baseurl=http://10.2.*.*/centos/$releasever/updates/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

Labels: , ,


Comments: Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?