对CentOS7.6x64_1810系统进行优化(优化repo源)

对CentOS7.6x64_1810系统进行优化(优化repo源)

在阿里源找到对应版本的CentOS替换repo源:wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
操作步骤:

  1. cd /etc/yum.repos.d/
  2. ls
    在这里插入图片描述
  3. 备份 (运维人员操作标准:先备份,再替换):mv CentOS-Base.repo CentOS-Base.repo.bak //把源文件改个名字 备个份
    在这里插入图片描述
  4. 在3之前先安装一下wget在这里插入图片描述
    在这里插入图片描述
  5. 将默认的国外repo源替换成阿里repo源:wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
    清华大学:wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.tuna.tsinghua.edu.cn/git/git-repo -o repo在这里插入图片描述
    命名解析: wget: wget命令用来从指定的URL下载文件
    yum -y install: yum来进行软件的安装,更新与卸载,-y: 对所有问题都回答"yes",如果使用yum install 就会提示 is that ok?

至此,源替换成功,优化成功,本次优化旨在解决国外源下载速度慢的问题,替换成国内源就是为了解决这个问题。


版权声明:本文为qq_41187909原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。