一、安装epel-release
经常有使用yum安装软件时找不到软件包的问题,可以先安装epel-release
,再尝试安装所要安装的软件包
yum install -y epel-release
二、更新yum源
经常有安装软件下载软件时过慢的问题,这是因为用了国外的源,换成国内的阿里的源,需要做的操作如下。
1、备份原来的yum源
sudo cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
2、设置阿里云的yum源
sudo wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
3、添加EPEL源
sudo wget -P /etc/yum.repos.d/ http://mirrors.aliyun.com/repo/epel-7.repo
4、清理缓存,生成新缓存,执行yum更新
sudo yum clean all
sudo yum makecache
sudo yum update
网友评论