CentOS 8 has been released, it based on Red Hat Enterprise Linux (RHEL) 8 and this article explain how to install and enable Remi Repository on CentOS 8 / RHEL-8.
For package manager, CentOS 8 does not use yum (Yellowdog Updater Modified) such as install, update, remove.
On CentOS 8, yum package manager changed to dnf.
Also read: How install Remi repository on Centos / RHEL 7/6
Remi repository is available for CentOS 8 / RHEL 8.
How to install and enable Remi repository on CentOS 8 / RHEL 8
First we need to update CentOS 8 / RHEL 8, then install Epel repository.
# dnf update
# dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
The output is like this
[root@serverdiary ~]# uname -a
Linux serverdiary 4.18.0-80.11.2.el8_0.x86_64 #1 SMP Tue Sep 24 11:32:19 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
[root@serverdiary ~]# dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
Last metadata expiration check: 0:02:46 ago on Mon 28 Oct 2019 07:00:46 AM CET.
epel-release-latest-8.noarch.rpm 12 kB/s | 21 kB 00:01
Dependencies resolved.
============================================================================= Package Arch Version Repository Size
=============================================================================Installing:
epel-release noarch 8-7.el8 @commandline 21 k
Transaction Summary
=============================================================================Install 1 Package
Total size: 21 k
Installed size: 30 k
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1 Installing : epel-release-8-7.el8.noarch 1/1 Running scriptlet: epel-release-8-7.el8.noarch 1/1 Verifying : epel-release-8-7.el8.noarch 1/1
Installed:
epel-release-8-7.el8.noarch
Complete!
Then install Remi repository on CentOS 8
# Example outputdnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm
Example output
root@serverdiary ~]# dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm
Extra Packages for Enterprise Linux 8 - x86_ 98 kB/s | 3.0 MB 00:31
Last metadata expiration check: 0:00:01 ago on Mon 28 Oct 2019 07:16:00 AM CET.
remi-release-8.rpm 185 kB/s | 20 kB 00:00
Dependencies resolved.
============================================================================= Package Arch Version Repository Size
=============================================================================Installing:
remi-release noarch 8.0-4.el8.remi @commandline 20 k
Transaction Summary
=============================================================================Install 1 Package
Total size: 20 k
Installed size: 14 k
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1 Installing : remi-release-8.0-4.el8.remi.noarch 1/1 Verifying : remi-release-8.0-4.el8.remi.noarch 1/1
Installed:
remi-release-8.0-4.el8.remi.noarch
Complete!
Then you can install package from Remi repo.
Example install PHP 7.3
# dnf module install php:remi-7.3
Example output when installing PHP 7.3 on CentOS 8
root@serverdiary ~]# dnf module install php:remi-7.3
Remi's Modular repository for Enterprise Lin 2.0 MB/s | 505 kB 00:00
Safe Remi's RPM repository for Enterprise Li 4.5 MB/s | 1.4 MB 00:00
Dependencies resolved.
============================================================================= Package Arch Version Repository Size
=============================================================================Installing group/module packages:
php-cli x86_64 7.3.11-1.el8.remi remi-modular 4.6 M
php-common x86_64 7.3.11-1.el8.remi remi-modular 1.1 M
php-fpm x86_64 7.3.11-1.el8.remi remi-modular 1.6 M
php-json x86_64 7.3.11-1.el8.remi remi-modular 72 k
php-mbstring x86_64 7.3.11-1.el8.remi remi-modular 521 k
php-xml x86_64 7.3.11-1.el8.remi remi-modular 229 k
Installing dependencies:
httpd-filesystem noarch 2.4.37-12.module_el8.0.0+185+5908b0db
AppStream 35 k
oniguruma x86_64 6.8.2-1.el8 AppStream 188 k
libxslt x86_64 1.1.32-3.el8 BaseOS 249 k
libargon2 x86_64 20171227-3.el8 epel 29 k
Installing weak dependencies:
nginx-filesystem noarch 1:1.14.1-9.module_el8.0.0+184+e34fea82
AppStream 24 k
Installing module profiles:
php/common
Enabling module streams:
httpd 2.4
nginx 1.14
php remi-7.3
Transaction Summary
=============================================================================Install 11 Packages
Total download size: 8.6 M
Installed size: 36 M
Is this ok [y/N]: y
Downloading Packages:
(1/11): nginx-filesystem-1.14.1-9.module_el8 506 kB/s | 24 kB 00:00
(2/11): httpd-filesystem-2.4.37-12.module_el 689 kB/s | 35 kB 00:00
(3/11): oniguruma-6.8.2-1.el8.x86_64.rpm 2.9 MB/s | 188 kB 00:00
(4/11): libxslt-1.1.32-3.el8.x86_64.rpm 15 MB/s | 249 kB 00:00
(5/11): php-common-7.3.11-1.el8.remi.x86_64. 4.2 MB/s | 1.1 MB 00:00
(6/11): php-cli-7.3.11-1.el8.remi.x86_64.rpm 8.3 MB/s | 4.6 MB 00:00
(7/11): php-fpm-7.3.11-1.el8.remi.x86_64.rpm 4.7 MB/s | 1.6 MB 00:00
(8/11): php-json-7.3.11-1.el8.remi.x86_64.rp 867 kB/s | 72 kB 00:00
(9/11): php-xml-7.3.11-1.el8.remi.x86_64.rpm 1.5 MB/s | 229 kB 00:00
(10/11): php-mbstring-7.3.11-1.el8.remi.x86_ 433 kB/s | 521 kB 00:01
[MIRROR] libargon2-20171227-3.el8.x86_64.rpm: Curl error (7): Couldn't connect to server for http://mirror.wiuwiu.de/epel/8/Everything/x86_64/Packages/l/libargon2-20171227-3.el8.x86_64.rpm [Failed to connect to mirror.wiuwiu.de port 80: Connection timed out]
(11/11): libargon2-20171227-3.el8.x86_64.rpm 1.9 kB/s | 29 kB 00:15
-----------------------------------------------------------------------------Total 465 kB/s | 8.6 MB 00:18 warning: /var/cache/dnf/epel-6519ee669354a484/packages/libargon2-20171227-3.el8.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 2f86d6a1: NOKEY
Extra Packages for Enterprise Linux 8 - x86_ 1.6 MB/s | 1.6 kB 00:00
Importing GPG key 0x2F86D6A1:
Userid : "Fedora EPEL (8) <epel@fedoraproject.org>"
Fingerprint: 94E2 79EB 8D8F 25B2 1810 ADF1 21EA 45AB 2F86 D6A1
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8
Is this ok [y/N]: y
Key imported successfully
warning: /var/cache/dnf/remi-modular-6408ecca79e22107/packages/php-cli-7.3.11-1.el8.remi.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 5f11735a: NOKEY
Remi's Modular repository for Enterprise Lin 3.0 MB/s | 3.1 kB 00:00
Importing GPG key 0x5F11735A:
Userid : "Remi's RPM repository <remi@remirepo.net>"
Fingerprint: 6B38 FEA7 231F 87F5 2B9C A9D8 5550 9759 5F11 735A
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-remi.el8
Is this ok [y/N]: y
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1 Installing : php-json-7.3.11-1.el8.remi.x86_64 1/11 Running scriptlet: php-common-7.3.11-1.el8.remi.x86_64 2/11 Installing : php-common-7.3.11-1.el8.remi.x86_64 2/11 Installing : libargon2-20171227-3.el8.x86_64 3/11 Installing : libxslt-1.1.32-3.el8.x86_64 4/11 Installing : oniguruma-6.8.2-1.el8.x86_64 5/11 Running scriptlet: oniguruma-6.8.2-1.el8.x86_64 5/11 Running scriptlet: nginx-filesystem-1:1.14.1-9.module_el8.0.0+184+ 6/11 Installing : nginx-filesystem-1:1.14.1-9.module_el8.0.0+184+ 6/11 Running scriptlet: httpd-filesystem-2.4.37-12.module_el8.0.0+185+5 7/11 Installing : httpd-filesystem-2.4.37-12.module_el8.0.0+185+5 7/11 Installing : php-fpm-7.3.11-1.el8.remi.x86_64 8/11 Running scriptlet: php-fpm-7.3.11-1.el8.remi.x86_64 8/11 Installing : php-mbstring-7.3.11-1.el8.remi.x86_64 9/11 Installing : php-xml-7.3.11-1.el8.remi.x86_64 10/11 Installing : php-cli-7.3.11-1.el8.remi.x86_64 11/11 Running scriptlet: php-cli-7.3.11-1.el8.remi.x86_64 11/11 Running scriptlet: php-fpm-7.3.11-1.el8.remi.x86_64 11/11 Verifying : httpd-filesystem-2.4.37-12.module_el8.0.0+185+5 1/11 Verifying : nginx-filesystem-1:1.14.1-9.module_el8.0.0+184+ 2/11 Verifying : oniguruma-6.8.2-1.el8.x86_64 3/11 Verifying : libxslt-1.1.32-3.el8.x86_64 4/11 Verifying : libargon2-20171227-3.el8.x86_64 5/11 Verifying : php-cli-7.3.11-1.el8.remi.x86_64 6/11 Verifying : php-common-7.3.11-1.el8.remi.x86_64 7/11 Verifying : php-fpm-7.3.11-1.el8.remi.x86_64 8/11 Verifying : php-json-7.3.11-1.el8.remi.x86_64 9/11 Verifying : php-mbstring-7.3.11-1.el8.remi.x86_64 10/11 Verifying : php-xml-7.3.11-1.el8.remi.x86_64 11/11
Installed:
php-cli-7.3.11-1.el8.remi.x86_64 php-common-7.3.11-1.el8.remi.x86_64 php-fpm-7.3.11-1.el8.remi.x86_64 php-json-7.3.11-1.el8.remi.x86_64 php-mbstring-7.3.11-1.el8.remi.x86_64 php-xml-7.3.11-1.el8.remi.x86_64 nginx-filesystem-1:1.14.1-9.module_el8.0.0+184+e34fea82.noarch httpd-filesystem-2.4.37-12.module_el8.0.0+185+5908b0db.noarch oniguruma-6.8.2-1.el8.x86_64 libxslt-1.1.32-3.el8.x86_64 libargon2-20171227-3.el8.x86_64
Complete!
root@serverdiary ~]# php --version
PHP 7.3.11 (cli) (built: Oct 22 2019 08:11:04) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.11, Copyright (c) 1998-2018 Zend Technologies
You can install various version simultaneously, the Software Collections of PHP 5.6, 7.0, 7.1, 7.2, 7.3 or 7.4 then enable it.
# dnf install php72
# module load php72
[root@serverdiary ~]# php --version
PHP 7.2.24 (cli) (built: Oct 22 2019 08:28:36) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies