3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

PHP 7.3.10 on CentOS 8

Last updated at Posted at 2019-10-10

Install PHP 7.3.10 on CentOS 8

CentOS 8 comes with PHP 7.2 by default, you can check with this command:

dnf info php

We need use a third-party repository for install PHP 7.3.x

1. Enable EPEL repository

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

2. Install REMI repository

dnf install -y https://rpms.remirepo.net/enterprise/remi-release-8.rpm

3. Install PHP 7.3.x

Check which versions of PHP are available:

dnf module list php

Output:

CentOS-8 - AppStream
Name     Stream          Profiles                      Summary
php      7.2             common [d], devel, minimal    PHP scripting language

Remi's Modular repository for Enterprise Linux 8 - x86_64
Name     Stream          Profiles                      Summary
php      remi-7.2        common [d], devel, minimal    PHP scripting language
php      remi-7.3 [e]    common [d], devel, minimal    PHP scripting language
php      remi-7.4        common [d], devel, minimal    PHP scripting language

Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled

Enable PHP 7.3 module to install PHP 7.3.x

dnf module enable php:remi-7.3 -y

Install PHP 7.3.x

dnf install -y php php-cli php-common

4. Check PHP Version

php -v

Output:

PHP 7.3.10 (cli) (built: Sep 24 2019 09:20:18) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.10, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.10, Copyright (c) 1999-2018, by Zend Technologies
3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?