REMI是由Remi Collect创建和维护的免费仓库,REMI仓库的主要目标是向Fedora和Enterprise Linux(RHEL、CentOS、Oracle、Scientific Linux)操作系统提供最新版本的PHP stack、全功能和其他一些软件包。
EMI提供的大多数软件包都不在默认的操作系统仓库中,如果它们存在,它们肯定已经过时,并且缺少最近的功能添加。
1、添加epel和remi的仓库
执行如下命令安装epel和remi的仓库,完成后可检查启用的仓库
[root@server ~]# dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
[root@server ~]# dnf -y install https://rpms.remirepo.net/enterprise/remi-release-8.rpm
[root@server ~]# yum repolist
……此处省略部分其它非相关信息……
epel Extra Packages for Enterprise Linux 8 - x86_64
epel-modular Extra Packages for Enterprise Linux Modular 8 - x86_64
remi-modular Remi's Modular repository for Enterprise Linux 8 - x86_64
remi-safe Safe Remi's RPM repository for Enterprise Linux 8 - x86_64
……此处省略部分其它非相关信息……
2、安装dnf-utils
查看/etc/yum.d/remi.repo,可见remi仓库默认是禁用的,需要手工编辑该文件启用或禁用remi仓库。
也可以安装dnf-utils,利用它从命令行快速启用和禁用仓库(使用--enablerepo和--disablerepo选项),例如通过remi仓库安装其中最新版本的php:
[root@server ~]# dnf -y install dnf-utils
[root@server ~]# dnf --enablerepo=remi install php