mount -o loop /var/rhel5.iso /var/repo
cd /var/repo
createrepo .
and then ran createrepo on it. But would get the following error:
Directory must be writable.
To resolve that create a soft link
mkdir /var/repo/Server --> This is the path where I will dump my all RPM's from Server directory
ln -s /var/repo/Server/ /var/repo/Server
createrepo /var/repo/Server
Now......... Add following to the file
cat /etc/yum.repos.d/iso.repo
[My ISO Repository]
name=test
baseurl=file:///var/repo/Server
enabled=1
gpgcheck=0
Now... Lets test:
[root@smtreeprd02 ~]# rpm -qa | grep -i telnet
telnet-0.17-38.el5
[root@smtreeprd02 ~]# yum remove telnet-0.17-38.el5
Loading "installonlyn" plugin
Loading "rhnplugin" plugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Remove Process
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package telnet.i386 1:0.17-38.el5 set to be erased
--> Running transaction check
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Removing:
telnet i386 1:0.17-38.el5 installed 96 k
Transaction Summary
=============================================================================
Install 0 Package(s)
Update 0 Package(s)
Remove 1 Package(s)
Is this ok [y/N]: y
Downloading Packages:
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Removing : telnet ######################### [1/1]
Removed: telnet.i386 1:0.17-38.el5
Complete!
[root@smtreeprd02 ~]#
[root@smtreeprd02 ~]# yum install telnet-0.17-38.el5
Loading "installonlyn" plugin
Loading "rhnplugin" plugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Setting up repositories
My ISO Repository 100% |=========================| 951 B 00:00
ftp://192.168.60.143/var/ftp/Server/repodata/repomd.xml: [Errno 4] IOError: [Errno ftp error] 550 Failed to change directory.
Trying other mirror.
Error: Cannot open/read repomd.xml file for repository: Server
[root@smtreeprd02 ~]# cd /etc/yum.repos.d/
[root@smtreeprd02 yum.repos.d]# ls
iso.repo rhel-debuginfo.repo
[root@smtreeprd02 yum.repos.d]# rm rhel-debuginfo.repo
rm: remove regular file `rhel-debuginfo.repo'? y
[root@smtreeprd02 yum.repos.d]# cd
[root@smtreeprd02 ~]# yum install telnet-0.17-38.el5
Loading "installonlyn" plugin
Loading "rhnplugin" plugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
primary.xml.gz 100% |=========================| 600 kB 00:00
################################################## 2113/2113
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for telnet to pack into transaction set.
telnet-0.17-38.el5.i386.r 100% |=========================| 7.7 kB 00:00
---> Package telnet.i386 1:0.17-38.el5 set to be updated
--> Running transaction check
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
telnet i386 1:0.17-38.el5 My ISO Repository 56 k
Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 56 k
Is this ok [y/N]: y
Downloading Packages:
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 37017186
Public key for telnet-0.17-38.el5.i386.rpm is not installed
[root@smtreeprd02 ~]# vi /etc/yum.repos.d/iso.repo
[root@smtreeprd02 ~]# yum install telnet-0.17-38.el5
Loading "installonlyn" plugin
Loading "rhnplugin" plugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package telnet.i386 1:0.17-38.el5 set to be updated
--> Running transaction check
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
telnet i386 1:0.17-38.el5 My ISO Repository 56 k
Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 56 k
Is this ok [y/N]: y
Downloading Packages:
Running Transaction Test
warning: telnet-0.17-38.el5: Header V3 DSA signature: NOKEY, key ID 37017186
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: telnet ######################### [1/1]
Installed: telnet.i386 1:0.17-38.el5
Complete!