centos 7.4 配置阿里YUM源镜像

环境:centos 7.4

只搭建阿里源

步骤一:安装wget,已安装则跳过此步骤

[root@localhost ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
-bash: wget: 未找到命令
[root@localhost yum.repos.d]# yum -y install wget

 

步骤二:移除旧YUM源

[root@localhost ~]# mkdir -p /etc/yum.repos.d/bak && mv /etc/yum.repos.d/* /etc/yum.repos.d/bak
mv: 无法将目录"/etc/yum.repos.d/bak" 移动至自身的子目录"/etc/yum.repos.d/bak/bak" 下

 

步骤三:下载阿里源配置

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

 

步骤四:清楚缓存,查看YUM源

[root@localhost ~]# yum clean all
[root@localhost ~]# yum repolist

 

相关文章

Centos下搭建性能监控Spotlight
CentOS 6.3下Strongswan搭建IPSec VPN
在CentOS6.5上安装Skype与QQ
阿里云基于centos6.5主机VPN配置
CentOS 6.3下配置multipah
CentOS安装、配置APR和tomcat-native