redhat配置本地yum详解

1.将光盘中的Cluster,  ClusterStorage,  Server,  VT,这几个文件COPY到本地目录中,比如我的为/yum/目录,

2.编辑/etc/yum.repos.d/rhel-debuginfo.repo文件,如我的配置文件为
 
[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-redhat-release
[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-redhat-release
[Server]
name=Red Hat Enterprise Linux $releasever - $basearch - Debug
baseurl=file:///yum/Server
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-releasea

[VT]
name=Red Hat Enterprise Linux $releasever - $basearch - Debug
baseurl=file:///yum/VT
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-releasea
 
 
解释下相关选项意思
(1)[ ] 为软件库的名称,随便怎么起都行,没有什么影响
(2) 名称而已,随意都行
(3)源目录路径
(4)enabled  激活当前的yum源,0为不激活,1为激活
(5)pgpcheck 是否使用gpg验证RPM包的不可抵赖性,设为0可以省不少事,如果一定要设验证的话,必须保证(6)中的公钥正确
(6)如果上一项设为1的话这项须设置
3.安装createrepo命令包,使用此命令创建RPM包依赖性关系,格式为createrepo /yum/Server/,源目录下的所有目录都运行一次,些命令会在指定目录下生成
一个repodata,其中有记录依赖性的关系文件.
 
使用 yum clean all 清空缓存
yum list 显示的软件包名为黑色,表示该yum库配置成功(说明这些软件已经录入了Yum库),现在为红色的软件名为没有录入该yum库(个人理解有待验证)
现在就可以使用 yum install gt gtk  来安装软件了
posted @ 2013-01-30 23:39  ..空白  阅读(400)  评论(0)    收藏  举报