Howto create Yum repository from CDROM Disc

Howto create Yum repository from CDROM Disc


1. Insert your Linux CD rom

2. Mount CD rom to folder in Linux

[root@Centos6 ~]# mount /dev/cdrom /media
mount: block device /dev/sr0 is write-protected, mounting read-only
[root@Centos6 ~]#

3. Create repository for cdrom

[root@Centos6 /]# cd /etc/yum.repos.d/
[root@Centos6 yum.repos.d]# vi cdrom.repo
[root@Centos6 yum.repos.d]#

4. Test to install software by yum from CDrom repo

[root@Centos6 yum.repos.d]# yum install vim-enhanced
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package vim-enhanced.i686 2:7.2.411-1.8.el6 will be installed
–> Finished Dependency ResolutionDependencies Resolved================================================================================
Package Arch Version Repository Size
vim-enhanced i686 2:7.2.411-1.8.el6 CDrom-Repository 837 k

Transaction Summary
Install 1 Package(s)

Total download size: 837 k
Installed size: 1.8 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : 2:vim-enhanced-7.2.411-1.8.el6.i686 1/1
Verifying : 2:vim-enhanced-7.2.411-1.8.el6.i686 1/1

vim-enhanced.i686 2:7.2.411-1.8.el6

[root@Centos6 yum.repos.d]#

That’s all. Thanks for using

Leave a reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>