源站
http://mirrors.163.com/ 163镜像源
https://mirrors.tuna.tsinghua.edu.cn/ 清华镜像源
https://developer.aliyun.com/mirror/ 阿里镜像源
https://mirrors.tencent.com/ 腾讯镜像源
linux系统基础优化
1.更新yum源
国内常用的镜像源:
2.关闭不需要的服务
不同的版本查看已经安装的服务命令不同
CentOS7
CentOS7以下
curl -o /etc/yum.repos.d/epel.repo http://mirrors.cloud.tencent.com/repo/epel-
6.repo
curl -o /etc/yum.repos.d/CentOS-Base.repo
http://mirrors.cloud.tencent.com/repo/centos6_base.repo
yum clean all
yum makecache
cd /etc/yum.repos.d/
1.执行下载任意一个响应速度快的镜像源(.repo)文件,将该目录下CentOS-Base.repo文件替换
2.清除linux系统原有的官方源站:yum clean all
3.根据当前镜像源提供的最新镜像更新系统服务:yum -y update
注:有必要可以安装yum源优先级插件yum-priorities:yum -y install yum-priorities
cd /etc/yum/pluginconf.d,该目录下设置yum安装程序的源优先级选择
并且在对应的repo文件末尾添加优先级:priorities=1(1-99)
yum repolist
systemctl --list-unit-files
评论0