网站地图    收藏   

主页 > 系统 > linux系统 >

Create local metadata resource of yum - Linux操作系统:U

来源:自学PHP网    时间:2015-04-14 11:12 作者: 阅读:

[导读] Create local metadata resource of yumToday, I need install an oracle software for a machine whose os is Linux.As we all know, installing oracle database software need in......

Create local metadata resource of yum
 
Today, I need install an oracle software for a machine whose os is Linux.
 
As we all know, installing oracle database software need installing additional packages. In order to install these package easily, i create a local yum resource.
 
As following:
 
[python] 
We only assume that mount cdrom to media  
/dev/hdc              3.3G  3.3G     0 100% /media  
[python] 
mkdir /yum  
cp -r /media/* /yum  
[python] 
install tool package:  
[root@test ~]# rpm -ivh /yum/Server/createrepo-0.4.11-3.el5.noarch.rpm  
warning: /yum/Server/createrepo-0.4.11-3.el5.noarch.rpm: Header V3 DSA signature: NOKEY, key ID 37017186  
Preparing...                ########################################### [100%]  
   1:createrepo             ########################################### [100%]  
   
Generate RPM package service database  
[root@test ~]# createrepo -g /yum/Server/repodata/comps-rhel5-server-core.xml /yum/Server/  
2348/2348 - gnome-keyring-manager-2.16.0-3.el5.i386.rpm                         m  
Saving Primary metadata  
Saving file lists metadata  
Saving other metadata  
[root@test ~]# createrepo -g /yum/VT/repodata/comps-rhel5-vt.xml /yum/VT/  
36/36 - Virtualization-mr-IN-5.2-11.noarch.rpm                                   
Saving Primary metadata  
Saving file lists metadata  
Saving other metadata <pre name="code" class="python">[root@test ~]# createrepo -g /yum/Cluster/repodata/comps-rhel5-cluster.xml /yum/Cluster  
32/32 - Cluster_Administration-hi-IN-5.2-1.noarch.rpm                            
Saving Primary metadata  
Saving file lists metadata  
Saving other metadata<pre name="code" class="python">[root@test ~]#  
[root@test ~]# createrepo -g /yum/ClusterStorage/repodata/comps-rhel5-cluster-st.xml /yum/ClusterStorage/  
39/39 - Global_File_System-zh-TW-5.2-1.noarch.rpm                                
Saving Primary metadata  
Saving file lists metadata  
Saving other metadata  
Lastly, editor the local repos file  
    
[root@heng /]# vi /etc/yum.repos.d/credit.repo  
[base]  
name=Ray   
baseurl=file:///yum/Server  
enabled=1  
gpgcheck=1  
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle  
[rhel-VT]  
name=Red Hat Enterprise Linux $releasever - $basearch - Debug  
baseurl=file:///yum/VT  
enabled=1  
gpgcheck=1  
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle  
[rhel-Cluster]  
name=Red Hat Enterprise Linux $releasever - $basearch - Debug  
baseurl=file:///yum/Cluster  
enabled=1  
gpgcheck=1  
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle  
[rhel-ClusterStorage]  
name=Red Hat Enterprise Linux $releasever - $basearch - Debug  
baseurl=file:///yum/ClusterStorage  
enabled=1  
gpgcheck=1  
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
 

自学PHP网专注网站建设学习,PHP程序学习,平面设计学习,以及操作系统学习

京ICP备14009008号-1@版权所有www.zixuephp.com

网站声明:本站所有视频,教程都由网友上传,站长收集和分享给大家学习使用,如由牵扯版权问题请联系站长邮箱904561283@qq.com

添加评论