Centos 7 配置阿里云的yum源

网友投稿 854 2023-03-08

本站部分文章、图片属于网络上可搜索到的公开信息,均用于学习和交流用途,不能代表睿象云的观点、立场或意见。我们接受网民的监督,如发现任何违法内容或侵犯了您的权益,请第一时间联系小编邮箱jiasou666@gmail.com 处理。

Centos 7 配置阿里云的yum源

yum是centos下更新、管理软件的命令,也有相应的图像界面版本;

yum源是yum命令去哪里取安装包的地图;

yum命令查询repo上配置的地址去取相应的rpm包进行安装;

[root@localhost ~]# uname -r	3.10.0-693.el7.x86_64[root@localhost ~]# cat /etc/redhat-release	CentOS Linux release 7.4.1708 (Core)

[root@localhost ~]# uname -r 3.10.0-693.el7.x86_64[root@localhost ~]# cat /etc/redhat-release CentOS Linux release 7.4.1708 (Core)

1、备份系统原来的yum源

[root@localhost ~]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak

[root@localhost ~]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak

2、下载阿里云的CentOS-Base.repo 到/etc/yum.repos.d/

3、添加阿里云公共DNS

为了防止不能寻找yun源地址,生成cache,先添加阿里云的DNS

[root@localhost ~]# vim /etc/resolv.conf	添加		nameserver 223.5.5.5		nameserver 223.6.6.6

[root@localhost ~]# vim /etc/resolv.conf 添加 nameserver 223.5.5.5 nameserver 223.6.6.6

4、清理缓存,并生成新缓存

[root@localhost ~]# yum clean all && yum makecache

[root@localhost ~]# yum clean all && yum makecache

上一篇:F5 Networks宣布将以6.7亿美元收购Nginx
下一篇:8分钟了解Kubernetes
相关文章

 发表评论

暂时没有评论,来抢沙发吧~