初始化命令 centos 7 163 yum 源 python 2.7.5

1. 备份系统旧配置文件

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

2. 获取对应版本的 CentOS-Base.repo 到 /etc/yum.repos.d/ 目录

CentOS Linux 7

curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.tencent.com/repo/centos7_base.repo

CentOS Linux 8

curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.tencent.com/repo/centos8_base.repo

CentOS Stream 8

curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.tencent.com/repo/centos8-stream.repo

参考:https://mirrors.tencent.com/help/centos.html

初始化命令:https://cloud.tencent.com/developer/article/2020335

安装 repo 源。

repo 源一般包括 base, updates, Extras 三部分。 
$ cd /etc/yum.repos.d/ 
$ wget http://mirrors.163.com/.help/CentOS7-Base-163.repo

安装 epel 源。

 

$ yum install epel-release 
$ yum makecache

posted @ 2017-11-22 21:32  littlevigra  阅读(923)  评论(2)    收藏  举报