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

PHP 如何檢測陣列是否有重複值

PHP 如何檢測陣列是否有重...

pexelsphoto55 PHP陣列,是在coding時常用到的儲存資料的方式。 但,若陣列中的資...

colorbox 使用 onclick href 驅動

colorbox 使用 on...

colorbox 一直都是很優秀的Lightbox外掛... 目前的網站中幾乎或多或少都會用到Lig...

如何用javascript接收radio button被選取後的值

如何用javascript接...

剛剛竟然犯了最簡單的錯誤~ 而且還是在趕著時間的時候⊙⊙ 我竟然蠢到用接收input 的方式去接收 ...

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