centos系统更换源
1.备份原始yum源
cd /etc/yum.repos.d
cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo
2.下载yum文件,替代原始yum源
CentOS 6
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/CentoOS-6.repo
CentOS 7
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/CentOS-7.repo
CentOS 8
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/CentOS-8.repo
3.yum clean all 清除缓存
4.yum makecache 生成缓存
其它yum源下载地址:
腾讯源http://mirrors.cloud.tencent.com/repo/centos7_base.repo
网易源http://mirrors.163.com/.help/CentOS7-Base-163.repo
华为源https://repo.huaweicloud.com/repository/conf/CentOS-7-reg.repo
注意:安装时可能出现的错误
-bash: wget: command not found
解决办法:
执行如下命令
yum install -y wget
七云数据2024-08-17 20:27
发表在:阿里云-短信模板内容(乐众)666
七云数据2024-08-12 15:48
发表在:php屏蔽右键好用
七云数据2024-08-10 13:36
发表在:hyper -v 虚拟机忘记密码重置6666666