//
you're reading...
howto, Linux

How to create a Local YUM Repository for RHEL 5.3 , RHAS 4.7

1. Local YUM Repository for RHEL 5.3

# cd /etc/yum.repos.d

# cat iso.repo
[myrepo]
name=myrepo
baseurl=file:///mnt
enabled=1
gpgcheck=0
#

# mkdir /mnt/RHEL5.3
# cd /root/myrepo/
# mount -o loop /root/myrepo/rhel-server-5.3-x86_64-dvd.iso /mnt/RHEL5.3

# rpm -Uvh createrepo*
warning: createrepo-0.4.8-1.el5.rf.noarch.rpm: Header V3 DSA signature: NOKEY, key ID 6b8d79e6
Preparing… ########################################### [100%]
1:createrepo ########################################### [100%]
#

# cd /mnt/
# createrepo .


# pwd
/mnt/RHEL5.3
# ls *GPG*
RPM-GPG-KEY-redhat-beta RPM-GPG-KEY-redhat-release
#

# rpm –import *GPG*

# yum install elinks*
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
myrepo | 951 B 00:00
primary.xml.gz | 771 kB 00:00
myrepo 3093/3093
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
–> Running transaction check
—> Package elinks.x86_64 0:0.11.1-5.1.0.1.el5 set to be updated
–> Finished Dependency Resolution

Dependencies Resolved

==========================================================================
Package Arch Version Repository Size
==========================================================================
Installing:
elinks x86_64 0.11.1-5.1.0.1.el5 myrepo 1.0 M

Transaction Summary
==========================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total download size: 1.0 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : elinks [1/1]

Installed: elinks.x86_64 0:0.11.1-5.1.0.1.el5
Complete!
#


2. Local YUM Repository for RHAS 4.7

# cd /root/myrepo/yum-RHEL4.7
# ls -1 *rpm
createrepo-0.4.2-1.2.el4.rf.noarch.rpm
python-elementtree-1.2.6-7.el4.rf.x86_64.rpm
python-sqlite-0.5.0-1.2.el4.rf.x86_64.rpm
python-urlgrabber-2.9.6-1.2.el4.rf.noarch.rpm
sqlite-2.8.16-1.2.el4.rf.x86_64.rpm
yum-2.4.2-0.4.el4.rf.noarch.rpm
#

# rpm -Uvh *.rpm
warning: createrepo-0.4.2-1.2.el4.rf.noarch.rpm: V3 DSA signature: NOKEY, key ID 6b8d79e6
Preparing… ################################### [100%]
1:sqlite ####################################### [ 17%]
2:python-sqlite ################################ [ 33%]
3:python-elementtree ########################### [ 50%]
4:python-urlgrabber ############################ [ 67%]
5:createrepo ################################### [ 83%]
6:yum ########################################## [100%]
#
# mkdir /mnt/RHAS4.7
# mount -o loop /LNX/RHEL4.7-x86_64-AS-DVD.iso /mnt/RHAS4.7

# cd /mnt/
# createrepo .

# cp /root/myrepo/yum-RHEL4.7/iso.repo /etc/yum.repos.d
# cat /etc/yum.repos.d/iso.repo

[myrepo]
name=myrepo
baseurl=file:///mnt
enabled=1
gpgcheck=0
#

# cd /mnt/RHAS4.7
# rpm –import *GPG*

Discussion

Comments are closed.

%d bloggers like this: