Translate

Search This Blog

Create local yum repository in rhel 6.4

resolving pckages dependency in packages installation via yum is lot easier than installing packages from plain rpm command. Here are simple steps to create a local yum repository pointing to rhel 6.4 dvd contents copied to file system. Same steps can be applied for creating yum repository pointing to DVD drive.

1. Copy all linux dvd media into a directory say  /rhel6.4_media

2. install package createrepo

cd /rhel6.4_media/ Packages/
rpm -ivh deltarpm*
rpm -ivh python-deltarpm*
rpm -ivh createrepo*.rpm

3. create file  /etc/yum.repos.d/localrepo.repo with below content

[localrepo]
name=Unixmen Repository
baseurl=file:///rhel6.4_media
gpgcheck=0
enabled=1

3. create local repository

createrepo -v  /rhel6.4_media/
yum clean all
yum update
yum repolist

4.  yum repolist

Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
localrepo                                                                                                                                        | 2.9 kB     00:00 ...
localrepo/primary_db                                                                                                                             | 3.1 MB     00:00 ...
repo id                                                                     repo name                                                                             status
localrepo                                                                   Unixmen Repository                                                                    3,720
repolist: 3,720


this will show number of packages available under above created repository

yum is avaialable - you can search and install any packge avaialble in dvd media you copied - you do not need to worry about how to resolve dependency.

yum install glibc-devel

Follow by Email