[精讚] [會員登入]
3075

[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

你可能感興趣的文章

[Linux] 怎麼修改終端機console下ls的顏色? 在linux下的ls使用--color的參數時,雖然目錄有上色,但是顏色是深藍色很難辨識,要怎麼修改呢?

[Centos7] 新的防火牆firewalld Centos7新的防火牆firewalld 和前面的iptables有很大的不同

DNS壓力測試工具queryperf 要怎麼知道我安裝的DNS是否能耐受的住網路上的攻擊或大量查詢,這裡有一個免費的工具 queryperf

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

[Linux] 安裝rsync (selinux 的設定) 在selinux enforcing 的情況下安裝rsync

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

隨機好文

使用Google尋找你的手機 這近發現google竟然可以用來找android的手機,而且不需要經過什麼設定或安裝軟體。

一個邏輯的錯誤刪了全部檔案的經驗 今天本來想做一件很簡單的事,但卻足足浪費我多一倍的時間,再加上刪掉我全部的檔案,原因只是因為我自己的邏輯錯誤。

NETCRAFT發現你的網站及作業系統 NETCRAFT可以發現你的網站及作業系統

[NetBeans] 使用git複製別人的專案 NetBeans使用git複製別人的專案及版本控制

[MAC] 安裝APACHE+PHP OS Darwin OpenIDMac1deAir 15.6.0 Darwin Kernel Version 15.6.