天天看点

linux 中yum安装不成功,linux yum安装为何不能安装?

解决方法:

第一步:创建一个新文件夹,并把光盘的内容全部复制到该文件夹内:

[[email protected] ~]# mkdir /yum

[[email protected] ~]# cp -rvf /misc/cd/* /yum

第二步:安装工具包:

[[email protected] ~]# rpm -ivh /yum/Server/createrepo-0.4.11-3.el5.noarch.rpm

第三步:生成仓库数据库:

[[email protected] ~]# cd /yum

[[email protected] yum]# createrepo . //注意后面的.

第四步:查看文件:

[[email protected] yum]# ls /yum/repodata/

filelists.xml.gz other.xml.gz primary.xml.gz repomd.xml

第五步:客户端配置:

[[email protected] ~]# cp /etc/yum.repos.d/rhel-debuginfo.repo /etc/yum.repos.d/chenbin.repo

[[email protected] ~]# vi /etc/yum.repos.d/chenbin.repo [rhel-chenbin]

name=Red Hat Enterprise Linux $releasever - $basearch - Debug

baseurl=file:///yum/

enabled=1

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

第六步:清除yum安装时的缓存:

[[email protected] ~]# yum clean all

取消

评论