Mount the CD/DVD ROM and copy the Packages directory
cp -r /media/CentOS_6.7_Final/Packages /Repository
rpm -ivh createrepo-0.9.9-24.el6.noarch
[root@master ~]# cat /etc/yum.repos.d/example.repo
[example]
name=Master server Repository
baseurl=file:///Repository
enabled=1
gpgcheck=0
* Now run the createrepo command on the newly created /Repository
[root@master ~]# createrepo /Repository
[root@master ~]# yum repolist
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: centos.vwtonline.net
* extras: centos.gbeservers.com
* updates: distro.ibiblio.org
repo id repo name status
base CentOS-6 - Base 5,062
example Master server Repository 3,150
extras CentOS-6 - Extras 39
puppetlabs-pc1 Puppet Labs PC1 Repository el 7 - i386 72
updates CentOS-6 - Updates 732
repolist: 9,055
No comments:
Post a Comment