码迷,mamicode.com
首页 > 其他好文 > 详细

yum源错误问题

时间:2017-06-27 22:12:25      阅读:114      评论:0      收藏:0      [点我收藏+]

标签:yum源

centos 7

mount -t iso9660 /dev/cdrom /opt/centos        把镜像挂载到该目录下

mv /etc/yum.repos.d/*  其他路径             备份这些yum源文件

vi /etc/yum.repos.d/yum.repo

[centos]

name=centos

baseurl=file:///opt/centos

enabled=1

gpgcheck=0


yum clean all  //清除yum 的软件库缓存

yum list all   //列出yum的软件库




redhat 7.1

mount -t iso9660 /dev/cdrom /opt/redhat     挂载镜像内容到目录

mv /etc/yum.repos.d/*  其他路径             备份这些yum源文件

vi /etc/yum.repos.d/yum.repo

[redhat]   

name=redhat           

baseurl=file:///opt/redhat       

enabled=1                      #启用yum源,0为不启用,1为启用  

gpgcheck=0                     #检查GPG-KEY,0为不检查,如1为检查(下面指定GPG-KEY)


yum clean all   //清除yum软件库缓存

yum list all   //列出yum的软件库


如果用yum下载东西,重复显示下载包的任务就是被锁定了

yum锁定状态时强制关闭yum进程命令:rm -f /var/run/yum.pid


本文出自 “潘政” 博客,请务必保留此出处http://zonds.blog.51cto.com/12638755/1942383

yum源错误问题

标签:yum源

原文地址:http://zonds.blog.51cto.com/12638755/1942383

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!