Skip to content
Menu
vernon.wenberg.net
vernon.wenberg.net
December 18, 2020February 21, 2022

Upgrade/Install PHP 7.4 in CentOS 8

The good news is this whole process is relatively painless, so here we go. As always, all the commands assume you have root permissions.

First, install the EPEL and remi repositories.

dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm

List the PHP versions you have available.

dnf module list php

This should list versions of PHP both in the main repositorys as well as the remi repository. We want to
enable remi-7.4.

Reset the php module (if you already have an existing PHP version installed).

dnf module reset php

Install PHP 7.4.

dnf module enable php:remi-7.4

Update using dnf.

dnf update

PHP 7.4 should now be installed.

Verify PHP version.

php -v
php version

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to print (Opens in new window) Print
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on LinkedIn (Opens in new window) LinkedIn

Like this:

Like Loading...

Related

Disclaimer

These posts are notes for me. These are not guides and you should not use these instructions as step-by-step instructions without knowing what they do.

Recent Posts

  • Docker Reference
  • Useful Commands for Windows Subsystem for Linux
  • FortiManager Local-In Policy
  • Mount Google Drive in Linux using rclone
  • Restore original Explorer context menus in Windows 11

Mastodon

  1. Loading Mastodon feed...

©2025 vernon.wenberg.net | Powered by WordPress and Superb Themes!
%d