Configure local yum repository

[root@node1 ~]# yum clean all

Loaded plugins: product-id, refresh-packagekit, security, subscription-manager

Updating certificate-based repositories.

Unable to read consumer identity

No such command: cleanall. Please use /usr/bin/yum –help

[root@node1 ~]# yum repolist

[root@storage Packages]# /etc/init.d/vsftpd status

vsftpd is stopped

[root@storage Packages]# /etc/init.d/vsftpd start

Starting vsftpd for vsftpd: [ OK ]

[root@storage Packages]# /etc/init.d/vsftpd status

vsftpd (pid 9232) is running…

— install createrepo package

[root@storage Packages]# rpm -ivh createrepo-0.9.8-5.el6.noarch.rpm

— Take a backup of yum repo file

—create directory under pub with name localrepo /var/ftp/pub/localrepo

–copy all packages under Servers to localrepo directory

[root@storage localrepo]# cp -ivr /media/RHEL_6.4\X86_64\DISC\1/Servers\* /var/ftp/pub/localrepo/

— Make the entry in the repo file

create repository file

==========================

vi /etc/yum.repos.d/first.repo

[localrepo]

name=local Repo

baseurl=file:///var/ftp/pub/localrepo

enabled=1

gpgcheck=0

— Create the Repo

[root@storage localrepo]# createrepo -v /var/ftp/pub/localrepo

3648/3653 – python-kerberos-1.1-6.2.el6.x86_64.rpm

3649/3653 – xfsprogs-devel-3.1.1-7.el6.x86_64.rpm

3650/3653 – hunspell-mg-0.20050109-4.1.el6.noarch.rpm

3651/3653 – cryptsetup-luks-libs-1.2.0-7.el6.x86_64.rpm

3652/3653 – pulseaudio-utils-0.9.21-13.el6.i686.rpm

3653/3653 – gdm-2.30.4-33.el6_2.x86_64.rpm

Saving Primary metadata

Saving file lists metadata

Saving other metadata

[root@storage localrepo]# yum clean all

Loaded plugins: aliases, changelog, downloadonly, kabi, presto, product-id, refresh-packagekit,

: security, subscription-manager, tmprepo, verify, versionlock

Updating certificate-based repositories.

Unable to read consumer identity

Loading support for Red Hat kernel ABI

Cleaning repos: localrepo

Cleaning up Everything

0 delta-package files removed, by presto

[root@storage localrepo]# yum update

Loaded plugins: aliases, changelog, downloadonly, kabi, presto, product-id, refresh-packagekit,

: security, subscription-manager, tmprepo, verify, versionlock

Updating certificate-based repositories.

Unable to read consumer identity

Loading support for Red Hat kernel ABI

localrepo | 1.3 kB 00:00 …

localrepo/primary | 1.7 MB 00:00 …

localrepo 3653/3653

Setting up Update Process

No Packages marked for Update

[root@storage localrepo]#

[root@storage localrepo]# yum repolist

Loaded plugins: aliases, changelog, downloadonly, kabi, presto, product-id, refresh-packagekit,

: security, subscription-manager, tmprepo, verify, versionlock

Updating certificate-based repositories.

Unable to read consumer identity

Loading support for Red Hat kernel ABI

repo id repo name status

localrepo local Repo 3,653

repolist: 3,653

Leave a Reply

Your email address will not be published. Required fields are marked *