[精讚] [會員登入]
2097

[Centos8] PHP7.2升級到7.4

在centos8中把php 7.2升到7.4版

分享此文連結 //n.sfs.tw/15077

分享連結 [Centos8] PHP7.2升級到7.4 @新精讚
(文章歡迎轉載,務必尊重版權註明連結來源)
2021-06-08 14:08:09 最後編修
2021-05-05 12:44:55 By 張○○
 

自動目錄

為了使用 Codeignitor4 ,不得已把php升到7.4 ,參考資料[1]的作法,他採用直接升級的方法,無痛而且簡單。

目前環境

CentOS Linux release 8.3.2011
PHP 7.2.24

安裝repository

以上dnf如果沒有的話使用yum亦可

安裝 php 7.4版

# sudo dnf module install php:remi-7.4
Last metadata expiration check: 1:40:17 ago on Wed 05 May 2021 10:44:55 AM CST.
Dependencies resolved.
The operation would result in switching of module 'php' stream '7.2' to stream 'remi-7.4'
Error: It is not possible to switch enabled streams of a module.
It is recommended to remove all installed content from the module, and reset the module using 'dnf module reset <module_name>' command. After you reset the module, you can install the other stream.

報錯,把 module reset掉重試

# sudo dnf module reset php

 

# sudo dnf module install php:remi-7.4

進入安裝/升級程序,版本檢查

# php -v
PHP 7.4.19 (cli) (built: May  4 2021 11:06:37) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.19, Copyright (c), by Zend Technologies
 

簡單容易。

參考資料

[1] https://mebee.info/2020/03/12/post-7365/

END

你可能感興趣的文章

[CentOS8] 1.安裝JULIA 安裝及開始使用 JULIA

[Centos8] 校時ntpdate? 以前常用的ntpdate,在centos8竟然不見了?

[CENTOS7] 使用 logrotate 來整理wildfly日誌檔 解決 wildfly 的日誌檔不斷長大的問題

[Rocky9] Sphinx 3支援中文 + Docker + PHP7 使用docker建置sphinxsearch 3

使用GPG檔案加解密 簡易的檔案加解密方式,可以讓你重要的資料包括文字檔加解密。

[Centos] opentftp + selinux 安裝及設定 Centos 安裝微型ftp伺服器:tftp伺服器

我有話要說

>>

限制:留言最高字數1000字。 限制:未登入訪客,每則留言間隔需超過10分鐘,每日最多5則留言。

訪客留言

[無留言]

隨機好文

為什麼要買長達二十年的保單? 為什麼要買長達二十年的保單?找一個可以說服我買二十年保單的理由。

UTF-8 BOM (Byte Order Mark) 的問題 在 Michael Kaplan 那看到 Every character has a story #4: U+feff

SELinux 常用指令和檔案 在Redhat系列中,Centos5以後加入了selinux,他並沒有這麼可怕,不必每次看到Selinux ,就想把他

安裝SPHINX支援中文 新版本的 sphinx 和舊版不同,網路上很多範例和教學是不能用的。此文是安裝和設定方法分享

看懂DSUB DVI HDMI USB等各式影音接頭 看懂DSUB DVI HDMI等各式影音接頭