导航:首页 > 操作系统 > 更新linuxyum源

更新linuxyum源

发布时间:2023-07-22 07:52:16

linux的yum源哪个更新比较快

几个国内速度最快的centos yum(更新源)
2014-01-09
中国科技大学源

cd /etc/yum.repos.d mv CentOS-Base.repo CentOS-Base.repo.save
wget http://centos.ustc.e.cn/CentOS-Base.repo.5
mv CentOS-Base.repo.5 CentOS-Base.repo
yum update

PS:如果在配置YUM源后,第一次运行yum update命令,出现如下错误。
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID*****

这是由于yum安装了旧版本的GPG keys造成的,解决办法就是
rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY*

网易源 mirrors.163.com

先关闭 fastestmirror

“vi /etc/yum/pluginconf.d/fastestmirror.conf” and set “enable=0″

cd /etc/yum.repos.d/
wget http://mirrors.163.com/.help/CentOS-Base-163.repo
yum makecache //生成缓存
yum update

搜狐源 mirrors.sohu.com

步骤同上,只是源链接修改为:
http://mirrors.sohu.com/help/CentOS-Base-sohu.repo

CentOS 官方镜像列表

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

CentOS 国内镜像

http://mirrors.163.com/centos/ (浙江省杭州市电信,武汉电信访问快)
http://mirrors.sohu.com/centos/ (山东省联通)
http:://mirrors.shlug.org/centos/ (上海市电信真如IDC机房,武汉电信访问慢)
http://mirrors.ta139.com/centos/ (移动线路,武汉电信访问快)
http://centos.ustc.e.cn/centos/ (中国科学技术大学,教育网线路 -官方镜像)
http://mirror.centos.net.cn/ (北京市网通,-官方镜像)

② 如何更改Linux yum源

更改linux YUM源方法:
第一步:进入yum配置文件目录:
cd /etc/yum.repos.d/
第二步:备份配置文件:
mv CentOS-Base.repo CentOS-Base.repo.bak
第三步:下载网易的配置(或其他源配置文件):
wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
下载下来的文件名为 CentOS6-Base-163.repo
第四步:重命名(重命名成配置文件中要求的文件名)
mv CentOS6-Base-163.repo CentOS-Base.repo
第五步:更新:
yum update
最终完成。

③ linux如何更换软件源

通过你的描述,操作过程如下:

1、将原始的yum 源文件备份,可以通过mv 命令来进行操作。

2、下载新的yum源文件到 该目录

wget -O /etc/yum.repos.d/CentOS-Base.repo yum源网址

或者

curl -o /etc/yum.repos.d/CentOS-Base.repo yum源网址

3、清除缓存:

yum clean all

4、生成缓存:

yum makecache

温馨提示:

1、yum 源的目录为 /etc/yum.repos.d

2、路径查看命令如下:

[root@Backup2 yum.repos.d]# pwd

/etc/yum.repos.d

以上就是关于 linux如何更换软件源 的操作过程,由于系统环境不同,可能会有出入,如有问题可以关注+私信,我会第一时间回复,希望我的回答能对你有所帮助。。。。。。

④ Linux更换yum源

有时候CentOS默认的yum源不一定是国内镜像,导致yum在线安装及更新速度不是很理想。这时候需要将yum源设置为国内镜像站点。国内主要开源的开源镜像站点应该是网易和阿里云了。

[[email protected] ~]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

[[email protected] ~]]# cd /etc/yum.repos.d/

[[email protected] yum.repos.d]# wget http://mirrors.163.com/.help/CentOS7-Base-163.repo

[[email protected] yum.repos.d]# wget http://mirrors.163.com/.help/CentOS6-Base-163.repo

[[email protected] yum.repos.d]# wget http://mirrors.163.com/.help/CentOS5-Base-163.repo

[[email protected] yum.repos.d]# yum makecache

[[email protected] yum.repos.d]# yum -y update

[[email protected] ~]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

[[email protected] ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

[[email protected] ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo

[[email protected] ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo

[[email protected] ~]# yum makecache

[[email protected] ~]# yum -y update

阅读全文

与更新linuxyum源相关的资料

热点内容
linuxoracle用户密码 浏览:757
股票交易pdf 浏览:898
p2papp源码 浏览:308
记录睡眠软件app哪个好用 浏览:140
液压助力车压缩比 浏览:217
文件服务器上如何查看 浏览:975
雪花绘制源码 浏览:662
app主页演示图怎么做 浏览:542
幼儿园设计pdf 浏览:645
干接点输入单片机 浏览:541
亚马逊云服务器查看 浏览:163
如何用免费云服务器 浏览:610
php的输出命令 浏览:264
在家怎么制作解压小玩具 浏览:99
javascript源码辅助阅读 浏览:384
pythonui开发工具 浏览:595
adr指标源码 浏览:217
程序员转架构管理 浏览:959
企业服务器为什么不能被拷贝 浏览:119
用c编程实现txt搜索 浏览:854