How to add a repository manually in RHEL6 and Centos 6
Make a Derectory
[root@server1 ~]# mkdir /data
[root@server1 ~]# mkdir /data/yum
Copy Packages For Local Derectory
[root@server1 ~]# cp -rv /media/CentOS_6.0_Final/Packages/ /data/yum/
Change Derectory
[root@server1 ~]# cd /data/yum/Packages/
Install packages & Dependency
[root@server1 Packages]# rpm -ivh createrepo-0.9.8-4.el6.noarch.rpm
warning: createrepo-0.9.8-4.el6.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID c105b9de: NOKEY
error: Failed dependencies:
deltarpm is needed by createrepo-0.9.8-4.el6.noarch
python-deltarpm is needed by createrepo-0.9.8-4.el6.noarch
[root@server1 Packages]# rpm -ivh deltarpm-3.5-0.5.20090913git.el6.i686.rpm
warning: deltarpm-3.5-0.5.20090913git.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID c105b9de: NOKEY
Preparing... ########################################### [100%]
1:deltarpm ########################################### [100%]
[root@server1 Packages]# rpm -ivh python-deltarpm-3.5-0.5.20090913git.el6.i686.rpm
warning: python-deltarpm-3.5-0.5.20090913git.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID c105b9de: NOKEY
Preparing... ########################################### [100%]
1:python-deltarpm ########################################### [100%]
[root@server1 Packages]# rpm -ivh createrepo-0.9.8-4.el6.noarch.rpm warning: createrepo-0.9.8-4.el6.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID c105b9de: NOKEY
Preparing... ########################################### [100%]
1:createrepo ########################################### [100%]
change Derectory
[root@server1 Packages]# cd
To create repository
[root@server1 ~]# createrepo /data/
676/4558 - yum/Packages/slf4j-manual-1.5.8-7.el6.noarch.rpm
iso-8859-1 encoding on Ville Skytt� <ville.skytta@iki.fi> - 2.8.2-2
4558/4558 - yum/Packages/netlabel_tools-0.19-6.el6.i686.rpm
Saving Primary metadata
Saving file lists metadata
Saving other metadata
To Make repository file
[root@server1 ~]# vim /etc/yum.repos.d/base.repo
[yum]
baseurl=file:///data/
gpgcheck=0
save :wq!
To Run Clean all
[root@server1 ~]# yum clean all
Loaded plugins: fastestmirror, refresh-packagekit
Repository 'yum' is missing name in configuration, using id
Cleaning up Everything
Cleaning up list of fastest mirrors
To Run Update all
[root@server1 ~]# yum update all
Loaded plugins: fastestmirror, refresh-packagekit
Repository 'yum' is missing name in configuration, using id
Determining fastest mirrors
yum | 1.3 kB 00:00 ...
yum/primary | 1.8 MB 00:00 ...
yum 4558/4558
Setting up Update Process
No Match for argument: all
No package all available.
No Packages marked for Update
[root@server1 ~]#
thanks dear
ReplyDeleteI Love all of ur write up short,simple and striagt forward pls more of this pls
ReplyDelete