配置yum更新源服务器
Yum(Yellow dog Updater, Modified)是Redhat、CentOS中的软件包管理器。基于RPM包管理,可以从指定的服务器自动下载RPM包而且安装,而且自动处理安装包的依赖性关系,自动安装安装全部依赖的软件包,无须人工干预。curl
在Centos中,默认从国外Centos官方源下载rpm包,下载速度很是缓慢,所以咱们在动做中,会把下载源改成国内的yum源(阿里、清华大学、搜狐等镜像仓库),下面咱们以阿里源镜像为例实战修改:ide
用普通用户登陆,并用 su - root切换到root用户;url
备份系统默认的repo文件:spa
cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.20200403.bakblog
查找阿里yum源:get
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repoit
或者io
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repoclass
直接在运行上面的内容就能更换镜像源,是否是很简单。