[精讚] [會員登入]
3053

[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

你可能感興趣的文章

[BASH] 自建檔案拷背程式--把指定的檔案拷背到指定的位置。 Git 是很好用的版本控制程式,但我沒辦法使用。 原因就是資安。用SHELL自建簡易的GIT

[Rocky9] 安裝docker 安裝docker

[Centos6] php5.3升級為php5.6 Centos6 + php5.6 升級

[Linux] mongodb 初步--1/3 我使用mongo 的一些大小事:安裝及基本操作

[CentOS] 改錯fstab 無法開機怎麼辦? Linux 改錯fstab 無法開機怎麼辦?

[postfix] open /etc/postfix/main.cf: Permission denied 等錯誤 遇到開啟 /etc/postfix/main.cf: Permission denied 等錯誤解決

隨機好文

[HP DL380G7] 生效啟動第3,4片網卡/開啟或關閉內建的網卡 HP DL380G7 預設第3,4片網卡裝完系統後找不到,難道是壞了?要怎麼辦?

[CodeIgniter 3] 資料庫的使用方法整理2/2 CI3 承襲 CI2,有很多的builder class可以用,依各人的使用習慣,有人喜歡一堆sql字串,有人喜歡用helper

讓radio box 或checkbox 好按 在行動裝置下,radio box及checkbox變得很難按得到

[MYSQL] 設定字串欄位的預設值 新增表格的時候,字串欄位給予預設空值;數字欄位給預設數值;日期欄位給空值。

Sound of Music @比利時中央車站 比利時中央車站的快閃表演:「真善美」