Step 1: You will need an utility, named createrepo.
# yum install createrepo Or
# rpm -Uvh createrepo-0.4.11-3.el5.noarch.rpm
Step 2: Copy the whole CentOS CD to a directory (E.g. /install/centos5.2/x86_64/CentOS)
Step 3: Createrepo
# createrepo /install/centos5.2/x86_64/CentOS
(you will need to run the above command again, so that the repository metadata gets updated)
Step 4: Create a local-repo file
(You may want to remove CentOS-Base.repo, CentOS-Media.repo if you are not connected to network)
# touch install-local.repo
Type the followings:
[localrepo]
name=CentOS $releasever - My Local Repo
baseurl=file:///install/centos5.2/x86_64/
enabled=1
gpgcheck=0
gpgkey=file:///install/centos5.2/x86_64/RPM-GPG-KEY
Further Information:
- Local YUM Repository by George Notaras
- Docs/Drafts/SoftwareManagementGuide from Fedora
No comments:
Post a Comment