linux源的配置如何更新

37次阅读
没有评论

共计 1597 个字符,预计需要花费 4 分钟才能阅读完成。

本篇内容介绍了“linux 源的配置如何更新”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让丸趣 TV 小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!

Ubuntu 首先编辑 sources.list 这个文件

vi /etc/apt/sources.list

把 sources.list 文件内容替换成如下

deb http://mirrors.aliyun.com/debian wheezy main contrib non-free
deb-src http://mirrors.aliyun.com/debian wheezy main contrib non-free
deb http://mirrors.aliyun.com/debian wheezy-updates main contrib non-free
deb-src http://mirrors.aliyun.com/debian wheezy-updates main contrib non-free
deb http://mirrors.aliyun.com/debian-security wheezy/updates main contrib non-free
deb-src http://mirrors.aliyun.com/debian-security wheezy/updates main contrib non-free

接下来执行以下命令,就完成阿里云 kali linux 镜像源了

apt-get update

Centos

修改 CentOS 默认 yum 源为 mirrors.aliyun.com

1、首先备份系统自带 yum 源配置文件 /etc/yum.repos.d/CentOS-Base.repo

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

2、下载 ailiyun 的 yum 源配置文件到 /etc/yum.repos.d/ CentOS7

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

CentOS6

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

CentOS5

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

3、运行 yum makecache 生成缓存

[root@localhost ~]# yum makecache

4、这时候再更新系统就会看到以下 mirrors.aliyun.com 信息

[root@localhost ~]# yum -y update

已加载插件:fastestmirror, refresh-packagekit, security

设置更新进程 Loading mirror speeds from cached hostfile

base: mirrors.aliyun.com

extras: mirrors.aliyun.com

updates: mirrors.aliyun.com

“linux 源的配置如何更新”的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识可以关注丸趣 TV 网站,丸趣 TV 小编将为大家输出更多高质量的实用文章!

正文完
 
丸趣
版权声明:本站原创文章,由 丸趣 2023-08-25发表,共计1597字。
转载说明:除特殊说明外本站除技术相关以外文章皆由网络搜集发布,转载请注明出处。
评论(没有评论)