close

由於之前系統為了測試新東西、所以安裝了許多php5.3的套件

不過php5.3後不支援舊的php程式實在太多了、加上之前的php設定錯誤

造成今天重新啟動apache的時候產生大當機

最後解決的辦法主要是參考這篇文章

移除remi的php安裝到5.2較穩定的版本

php與mysql降級過程記錄:

1.移除php-->yum remove php

2.移除mysql-->yum remove mysql

ps.我移除前有先備份,但事實上証明、並不需要

3.移除被remi更新的相關套件-->yum remove *remi

5.檢查有無之前更新的remi安裝的套件(rpm -qa|grep remi),若有記得利用(yum remove *remi)移除,或是用(rpm -e)手動移除。

4.移除epel與remi:
yum remove epel-release-5-3  -->  會將相關套件 remi-release-5-7 一起移除。

5.利用yum install 裝回php與mysql
yum install php
yum install mysql

6.檢查設定檔與相關的套件

7.重新啟動Apache與mysql

 



升級法二:

1.從官網(http://dev.centos.org/centos/5/)下載CentOS-Testing.repo檔案(http://dev.centos.org/centos/5/CentOS-Testing.repo)至/etc/yum.repos.d/目錄下

2.CentOS-Testing.repo檔案內容
##########################################
[c5-testing]
name=CentOS-5 Testing
baseurl=http://dev.centos.org/centos/$releasever/testing/$basearch/
enabled=0
gpgcheck=1
gpgkey=http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing

# CentOS-Testing:
# !!!! CAUTION !!!!
# This repository is a proving grounds for packages on their way to CentOSPlus and CentOS Extras.
# They may or may not replace core CentOS packages, and are not guaranteed to function properly.
# These packages build and install, but are waiting for feedback from testers as to
# functionality and stability. Packages in this repository will come and go during the
# development period, so it should not be left enabled or used on production systems without due
# consideration.
##########################################


將CentOS-Testing.repo檔案內的enabled=0 改成 enabled=1啟動這個repo

3.
※先備份php.ini、httpd.conf、my.cnf
※yum install php-->php5.1.6升級至php5.2.10
※yum update   httpd也有更新(從2.2.3-->2.2.8)結果httpd.conf設定檔恢復成預設值 --> 將備份檔覆蓋httpd.conf,然後restart httpd

arrow
arrow
    全站熱搜

    result945 發表在 痞客邦 留言(0) 人氣()