menu 李昊天的个人博客
CentOS yum 更换阿里云镜像源
291 浏览 | 2020-03-25 | 分类:Linux | 标签:CentOS,yum,换源

安装wget(如果没有的话)

 yum install -y wget

备份原有源

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

下载源

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

刷新缓存

yum makecache

参考 阿里云官方文档

知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议

发表评论

email
web

全部评论 (共 1 条评论)

    小李要奋斗
    2021-03-04 23:01
    好简洁的排版!膜拜大佬
Emoji

Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /www/wwwroot/typecho.wmgx.top/usr/themes/Cuckoo/includes/owo.php on line 46

Warning: file_get_contents(): Failed to enable crypto in /www/wwwroot/typecho.wmgx.top/usr/themes/Cuckoo/includes/owo.php on line 46

Warning: file_get_contents(https://blog.wmgx.top/usr/themes/Cuckoo/assets/json/owo.json): failed to open stream: operation failed in /www/wwwroot/typecho.wmgx.top/usr/themes/Cuckoo/includes/owo.php on line 46

Warning: array_keys() expects parameter 1 to be array, null given in /www/wwwroot/typecho.wmgx.top/usr/themes/Cuckoo/includes/owo.php on line 48

Warning: count(): Parameter must be an array or an object that implements Countable in /www/wwwroot/typecho.wmgx.top/usr/themes/Cuckoo/includes/owo.php on line 49

Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /www/wwwroot/typecho.wmgx.top/usr/themes/Cuckoo/includes/owo.php on line 87

Warning: file_get_contents(): Failed to enable crypto in /www/wwwroot/typecho.wmgx.top/usr/themes/Cuckoo/includes/owo.php on line 87

Warning: file_get_contents(https://blog.wmgx.top/usr/themes/Cuckoo/assets/json/owo.json): failed to open stream: operation failed in /www/wwwroot/typecho.wmgx.top/usr/themes/Cuckoo/includes/owo.php on line 87

Warning: array_keys() expects parameter 1 to be array, null given in /www/wwwroot/typecho.wmgx.top/usr/themes/Cuckoo/includes/owo.php on line 89

Warning: count(): Parameter must be an array or an object that implements Countable in /www/wwwroot/typecho.wmgx.top/usr/themes/Cuckoo/includes/owo.php on line 90