Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install PHP 7.4 on a CentOS 8/RHEL 8 system

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article will explain in detail how to install PHP 7.4 in the CentOS 8/RHEL 8 system. The content of the article is of high quality, so the editor shares it for you as a reference. I hope you will have some understanding of the relevant knowledge after reading this article.

PHP is a popular server-side scripting language used in Web development to create powerful and dynamic websites.

Add EPEL and REMI repositories

EPEL and REMI repositories are the main requirements for this installation and are added to the system by running the following command:

Sudo yum-y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

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

Reference: how to install the EPEL repository (EPEL Repository) on RHEL 8/CentOS 8.

2. Install PHP 7.4 in CentOS 8/RHEL 8

After adding the repository, we can enable the PHP 7.4 Remi module and install PHP 7.4 on the CentOS 8/RHEL 8 system:

Sudo dnf- y install dnf-utils

Enable module flow for PHP 7.4 in CentOS 8/RHEL 8:

Sudo dnf module install php:remi-7.4

Accept the installation prompts:

Use the next command to install additional software packages:

Sudo dnf update

Sudo yum install php-xxx

At this point, the version of PHP installed should be 7.4, as follows:

$php-v

PHP 7.4.0RC1 (cli) (built: Sep 3 2019 07:45:03) (NTS)

Copyright ©The PHP Group

Zend Engine v3.4.0-dev, Copyright ©Zend Technologies

To view enabled modules, run:

$php-modules

At this point, you have finished installing PHP 7.4 in CentOS 8/RHEL 8.

On how to install PHP 7.4 in the CentOS 8/RHEL 8 system to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report