CentOS 7 install epel-release

EPEL (Extra Packages for Enterprise Linux) is a Fedora-based project that provides additional software packages for "Red Hat" operating systems, suitable for RHEL, CentOS and Scientific Linux.

#1-下载epel-release
yum install -y epel-release
#2-作用yum会将下载下来的 包文件rpm和头文件header存盘在 本地机器的硬盘 缓存中, 这个将占用 硬盘空间, 可以将这些内容清除掉, 以释放磁盘空间:
yum clean all
#3-yum安装的时候会将安装包进行缓存,不过最好还是再执行一下yum makecache命
yum makecache
#4查看-大约会显示有28000个源
yum pepolist

The content comes from: Baidu, Google, CSDN, blog garden, etc. I also forgot to read those articles...

2022.11.28 change:
install p7zip, it shows no
solution: replace yum source, and download epel-release

#备份
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
#下载阿里源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
#清理缓存
yum clean all
#运行yum makecache生成缓存
yum makecache
#更新
yum -y update
#下载epel-release
yum install -y epel-release
#下载p7zip
yum install -y p7zip

Guess you like

Origin blog.csdn.net/weixin_44238530/article/details/123288640