This guide provides steps to install PHP 7.4 on CentOS 8 / RHEL 8 Linux systems. Interested developers can already use PHP 7.4 in production environments, with the official release date being November 28, 2019.
Please follow the steps below to install PHP 7.4 on CentOS 8 / RHEL 8.
Step 1: Add EPEL and REMI libraries
Installation requires EPEL and REMI libraries. Add it to the system through 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
Step 2: Install PHP 7.4 on CentOS 8/RHEL 8
After adding the relevant libraries, enable PHP 7.4 Remi module and install it.
sudo dnf -y install dnf-utils
Enable module streaming for PHP 7.4
sudo dnf module install php:remi-7.4
Accept the installation prompt
Updating Subscription Management repositories.
Last metadata expiration check: 0:00:24 ago on Mon 16 Sep 2019 09:36:21 AM EDT.
Dependencies resolved.
===================================
Package Arch Version Repository Size
=========================
Installing group/module packages:
php-cli x86_64 7.4.0~RC1-1.el8.remi remi-modular 4.6 M
php-common x86_64 7.4.0~RC1-1.el8.remi remi-modular 1.2 M
php-fpm x86_64 7.4.0~RC1-1.el8.remi remi-modular 1.6 M
php-json x86_64 7.4.0~RC1-1.el8.remi remi-modular 71 k
php-mbstring x86_64 7.4.0~RC1-1.el8.remi remi-modular 524 k
php-xml x86_64 7.4.0~RC1-1.el8.remi remi-modular 211 k
Installing dependencies:
nginx-filesystem noarch 1:1.14.1-8.module el8 2505 fe936cef rhel-8-for-x86_64-appstream-rpms 24 k
oniguruma x86_64 6.8.2-1.el8 rhel-8-for-x86_64-appstream-rpms 188 k
httpd-filesystem noarch 2.4.37-11.module el8.0.0 2969 90015743 rhel-8-for-x86_64-appstream-rpms 34 k
libxslt x86_64 1.1.32-3.el8 rhel-8-for-x86_64-baseos-rpms 249 k
Installing module profiles:
php/common
Enabling module streams:
httpd 2.4
nginx 1.14
php remi-7.4
Transaction Summary
===============================
Install 10 Packages
Total download size: 8.6 M
Installed size: 43 M
Is this ok [y/N]: y
使用如下命令安装额外的包
sudo dnf update sudo yum install php-xxx
当前的 PHP 版本应该为 7.4
$ php -v PHP 7.4.0 (cli) (built: Nov 26 2019 20:13:36) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies
查看已启用的模块:
$ php --modules
你已成功在 CentOS 8 / RHEL 8 上安装 PHP 7.4。
更多相关PHP7文章请访问:《PHP7》教程
The above is the detailed content of How to install PHP 7.4 on CentOS. For more information, please follow other related articles on the PHP Chinese website!

This article details PHP 7's new operators: the null coalescing (??), spaceship (<=>), and null coalescing assignment (??=) operators. These enhance code readability and performance by simplifying null checks and comparisons, indirectl

This article examines optimizing PHP7 code for performance. It addresses common bottlenecks like inefficient database queries, I/O operations, and memory leaks. Solutions include efficient coding practices, database & caching strategies, asynch

PHP 7's minor version differences yield subtle memory consumption variations. While newer versions generally improve performance and memory efficiency via Zend Engine and garbage collection optimizations, the impact is application-dependent. Signif

This article details effective PHP 7 session management, covering core functionalities like session_start(), $_SESSION, session_destroy(), and secure cookie handling. It emphasizes security best practices including HTTPS, session ID regeneration, s

PHP 7 significantly improved upon previous versions by addressing numerous bugs, enhancing performance, and bolstering security. Key improvements included a rewritten Zend Engine 3, optimized memory management, and refined error handling. While gene

This article examines session handling in PHP7, highlighting performance improvements stemming from the enhanced Zend Engine. It discusses potential compatibility issues from upgrading and details optimization strategies for security and scalability

This article explains how to monitor PHP 7 application performance using New Relic. It details New Relic's setup, key performance indicators (KPIs) like Apdex score and response time, bottleneck identification via transaction traces and error track

This article details upgrading PHP 5.6 to PHP 7, emphasizing crucial steps like backing up, checking server compatibility, and choosing an upgrade method (package manager, compiling, control panel, or web server configuration). It addresses potentia


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)
