Loading...

CentOS 5.2 使用 YUM 將 PHP 5.1.6 更新到 5.2.6

Temperature: 0 °C

ChungChung
author_tools

CentOS 5.2 版內建的 PHP 版本為 5.1.6,甚至於 5.3 版仍舊是 5.1.6 版本。

基於系統元件的完整,就不採用編譯的方式來更新 PHP,而是計畫使用 YUM 來進行 PHP的更新。但是,使用 YUM 更新時卻又發現 CentOS 官網或映設站台的 PHP 仍舊是 5.1.6 版,參拜了 Google 大神後,發現國外論壇有人提供下載更新的套件,安裝後可以透過 YUM 更新。不過,因為是公司的主機,所以必須注重安全性,對於不明來源的下載網址,通常得拒於千里之外。

繼續參拜 Google 大神後,終於找到一篇討論文章,修改 YUM 設定後,就可以透過 YUM 從官網更新 PHP 到 5.2.6 版。

修改檔案:/etc/yum.repos.d/CentOS-Base.repo

在檔案最後按文章添加了以下設定


[c5-testing]
name=CentOS-5 Testing
baseurl=http://dev.centos.org/centos/5/testing/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing

上述設定網址都指向官方網站,可以放心更新 PHP。存檔後,下達更新命令:

# yum update php*

更新完畢後以 PHP命令檢視版本:

# php -v

PHP 5.2.6 (cli) (built: Sep 15 2008 20:41:01)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technologies
with Zend Optimizer v3.3.3, Copyright (c) 1998-2007, by Zend Technologies

轉載自-http://blog.xuite.net/lin.katana/PC/24803530

 

https://innstory.com/story-CentOS_52_使用_YUM_將_PHP_516_更新到_526-127
寫程式筆記

Prev
 阿建結婚

Next
松懷舊刈包 

About the Author

Chung

我是chung
網路工作者
主業是網站系統開發建置
副業是做夢,寫故事
作品請參考/teme.biz
做夢請參考/innstory.com
聯絡/chung.teme@gmail.com

#有人用筆寫日記,有人用歲月寫日記,有人用照片寫日記,而我,用innstory寫日記。

Visitor message

Leave some footprints to prove that you visited me

Recommended reading

Author's other related stories

利用 css 讓 ul 置中呈現

利用 css 讓 ul 置中...

以前寫網站...總是喜歡用Table 包住內容.. 而隨著時空的轉換...現在大都用div..或者....

PHP自動補零!!

PHP自動補零!!

其實這個是基礎中的基礎....但我卻老是不願意記起來他的函式用法..@@ 剛剛..又用到了...啊所...

整合Facebook粉絲專頁的即時訊息,Zotabox網站打造免費線上支援平台。

整合Facebook粉絲專頁...

還記得在msn的年代,msn有提供在網站上架構即時通訊功能,方便網站管理者與user直接交談~ 現在...

Please select an option

error

Hi, thank you for your participation, but you cannot vote repeatedly~

Join innstory now and start recording your story.

"Innstory" is a place to store stories. We are committed to becoming a warm platform. Deepening the bonds between people is our direction.
We are convinced that the blockchain between people is not just a cold calculation. Join us now.

Wrong format