yum问题总结

yum问题总结

1、warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID***** 

这是由于yum安装了旧版本的GPG keys造成的,解决办法是可以运行下面命令: 

# cd /etc/pki/rpm-gpg

# wget http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5//根据实际情况下载RPM-GPG-KEY-CentOS-5文件

# rpm --import RPM-GPG-KEY-CentOS-5 //导入key

或者加上参数--nogpgcheck安装,即yum install httpd --nogpgcheck

2、163/SOHU/USTC等镜像地址可能会变化问题

现在5.X版本的升级安装包都在5.11目录里面,到时留意修改yum配置文件

3、配置文件中的变量说明

$releasever

此变量表示发行版,yum 通过 /etc/yum.conf 文件,从 distrooverpky=<value> 行取得 $releasever 的值。如果 /etc/yum.conf 文件中没有这一行,yum 则从 redhat-release (应该是 fedora-release) 软件包中推算出正确的值.

$arch

此变量用于标识系统所用的 CPU 平台,变量的值通过 uname 命令得出,$arch 的有效值为 i586, i686 和 x86_64

$basearch

此变量用于参照系统的基本平台,例如,i686 和 i586 机器的基本平台是 i386,AMD64 和 Intel64 机器的基本平台是 x86_64

$YUM0-9

$YUM0 ~ $YUM9 这十个变量分别被 shell 环境中的同名变量的值所替代。如果 /etc/yum.conf 文件中设置了这些变量,而 shell 环境中没有同名变量,它的值则不被代替。

附录:任选一个网站镜像,推荐使用搜狐镜像

# wget http://mirrors.sohu.com/help/CentOS-Base-sohu.repo

wget http://mirrors.163.com/.help/CentOS6-Base-163.repo

wget http://centos.ustc.edu.cn/CentOS-Base.repo

# mv /etc/yum.repos.d/ /tmp

把下载的文件修改文件名:CentOS-Base.repo,放在/etc/yum.repos.d目录

实战:RedHat5.8更改yum源 http://blog.csdn.net/sz_bdqn/article/details/47015863

关键是要把"$releasever"替换成"5",不然就会报如下错误

http://mirrors.163.com/centos/5Server/addons/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found

Trying other mirror.

Error: Cannot retrieve repository metadata (repomd.xml) for repository: addons. Please verify its path and try again

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

一、CENTOS各国镜像地址

http://www.centos.org/modules/tinycontent/index.php?id=32

二、中国大陆镜像部分

ChinaSohu Inc, Beijing P.R. China(搜狐CentOS镜像)

http://mirrors.sohu.com/centos/

阿里云镜像

若使用阿里云服务器,将源的域名从mirrors.aliyun.com改为mirrors.aliyuncs.com,不占用公网流量。

如果需要下载ISO镜像,请直接使用Chrome、Firefox浏览器下载,勿使用P2P下载工具。

http://mirrors.aliyun.com/

ChinaUniversity of Science and Tech of China(中科大)

http://centos.ustc.edu.cn/centos/

ChinaNetEase(163网易)

http://mirrors.163.com/centos/

ChinaNortheastern University, Shenyang Liaoni(东北大学)

http://mirror.neu.edu.cn/centos/

ChinaStar Studio of UESTC(电子科技大)

http://mirrors.stuhome.net/centos/

ChinaCMCC Taian Branch(泰安移动)

http://mirrors.ta139.com/centos/


此外,还有香港、台湾CentOS镜像地址也很快,具体参见上文官方网页,搜索Hong Kong或Taiwan。

http://www.cnblogs.com/mchina/archive/2013/01/04/2842275.html



你可能感兴趣的:(配置文件,import,warning)