首页 > 作文

如何在CentOS中安装PHP7.4的方法步骤

更新时间:2023-04-08 04:44:35 阅读: 评论:0

本指南提供了在 centos 8 / rhel 8 linux 系统上安装 php 7.4 的步骤。有兴趣的开发者已经可以在生产环境中使用使用 php 7.4,正式版本的官方发布时间为。

请按照以下步骤在 centos 8 / rhel 8 上安装 php 7.4。

步骤一:添加 epel 和 remi 库

安装需要 epel 和四书五经有哪些 remi 库。通过以下命令将其添加到系统中

sudo yum -y install https://dl.fedoraproject.org/pub/epel/epel-relea-latest-8.noarch.rpmsudo yum -y install https://rpms.remirepo.net/enterpri/remi-relea-8.rpm

步骤二:在 centos 8 / rhel 8 上安装 php 7.4

添加相关的库后,启用 php 7.4 的 remi 模块并进行安装。

sudo dnf -y install dnf-utils

启用 php 7.4 的模块流

sudo dnf module install php:remi-7.4

接受安装提示

updating subscription management repositories.last metadata expiration check: 0:00:24 ago on mon 16 p 2019 09:36:21 am edt.dependencies resolved.=================================================================================================================================================== package           arch       version                      reposit非你勿扰ory                  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 kinstalling dependencies: nginx-filesystem      noarch      1:1.14.1-8.module+el8+2505+fe936cef        rhel-8-for-x清明节的古诗大全简单86_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-baos隐身之后来爱你-rpms        249 kinstalling module profiles: php/common                                                                    enabling module streams: httpd                     2.4                                                 nginx                     1.14                                                 php                      remi-7.4                                              transaction summary===================================================================================================================================================install 10 packagestotal download size: 8.6 minstalled 入党积极分子的思想汇报size: 43 mis this ok [y/n]: y

使用如下命令安装额外的包

sudo dnf updatesudo yum install php-xxx

当前的 php 版本应该为 7.4

$ php -vphp 7.4.0 (cli) (built: nov 26 2019 20:13:36) ( nts )copyright (c) the php groupzend engine v3.4.0, copyright (c) zend technologies

查看已启用的模块:

$ php --modules

你已成功在 centos 8 / rhel 8 上安装 php 7.4。

原文地址:

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持www.887551.com。

本文发布于:2023-04-08 04:44:31,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/zuowen/e89d8e8b2f0069b8436d07450f6bc571.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

本文word下载地址:如何在CentOS中安装PHP7.4的方法步骤.doc

本文 PDF 下载地址:如何在CentOS中安装PHP7.4的方法步骤.pdf

标签:步骤   模块   命令   版本
相关文章
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图