拆除各類房型技巧純熟,快速有效率
免費現場估價,值得您信賴
居家清潔找裝潢工程機會,線上超過上百筆精選裝潢案件,無論接案新手、專職SOHO
接案工作室、公司,都能在這找到

首頁  •  tw 論壇 • 軟體討論     • 

[教學]PHP 5.3 降為 5.2

房東:小高
發表時間:2014-05-01
[檢舉]


因為下面的網址已經移除了,所以可以下載 php-5.2-x64 並根據以下指令安裝囉!












1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19



yum install libXpm.so.4 libt1.so.5 autoconf automake gd

 

rpm -ivh php-5.2.17-1.el6.art.x86_64.rpm

rpm -ivh php-cli-5.2.17-1.el6.art.x86_64.rpm

rpm -ivh php-common-5.2.17-1.el6.art.x86_64.rpm

rpm -ivh php-devel-5.2.17-1.el6.art.x86_64.rpm

 

rpm -ivh php-gd-5.2.17-1.el6.art.x86_64.rpm

rpm -ivh php-ldap-5.2.17-1.el6.art.x86_64.rpm

rpm -ivh php-mbstring-5.2.17-1.el6.art.x86_64.rpm

rpm -ivh php-mysql-5.2.17-1.el6.art.x86_64.rpm

rpm -ivh php-pdo-5.2.17-1.el6.art.x86_64.rpm

rpm -ivh php-xml-5.2.17-1.el6.art.x86_64.rpm

rpm -ivh t1lib-5.1.2-6.el6_2.1.x86_64.rpm

 

; 避免 yum 更新到 php 做以下設定

vi /etc/yum.conf

加入

exclude=php*





 


 

-- 以下作法因為網址已移除,所以沒辦法用了!! --------------------------------












1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53



; 查詢 php rpm 並移除

 

rpm -qa | grep php

 

rpm -e --nodeps phpxxxx

 

; 32bit

 

rpm -ivh  http://www6.atomicorp.com/channels/atomic/centos/6/i386/RPMS/php-common-5.2.17-1.el6.art.i686.rpm

rpm -ivh  http://www6.atomicorp.com/channels/atomic/centos/6/i386/RPMS/php-cli-5.2.17-1.el6.art.i686.rpm

rpm -ivh  http://www6.atomicorp.com/channels/atomic/centos/6/i386/RPMS/php-5.2.17-1.el6.art.i686.rpm

 

 

rpm -ivh  http://www6.atomicorp.com/channels/atomic/centos/6/i386/RPMS/php-mbstring-5.2.17-1.el6.art.i686.rpm

rpm -ivh  http://www6.atomicorp.com/channels/atomic/centos/6/i386/RPMS/php-devel-5.2.17-1.el6.art.i686.rpm

rpm -ivh  http://www6.atomicorp.com/channels/atomic/centos/6/i386/RPMS/php-ldap-5.2.17-1.el6.art.i686.rpm

 

rpm -ivh  http://www6.atomicorp.com/channels/atomic/centos/6/i386/RPMS/php-xml-5.2.17-1.el6.art.i686.rpm

rpm -ivh  http://www6.atomicorp.com/channels/atomic/centos/6/i386/RPMS/php-pdo-5.2.17-1.el6.art.i686.rpm

 

yum install libXpm.so.4 libt1.so.5 autoconf automake

 

rpm -ivh  http://www6.atomicorp.com/channels/atomic/centos/6/i386/RPMS/php-gd-5.2.17-1.el6.art.i686.rpm

rpm -ivh  http://www6.atomicorp.com/channels/atomic/centos/6/i386/RPMS/php-mysql-5.2.17-1.el6.art.i686.rpm

 

 

 

; 64bit

 

rpm -ivh http://www6.atomicorp.com/channels/atomic/centos/6/x86_64/RPMS/php-common-5.2.17-1.el6.art.x86_64.rpm

rpm -ivh http://www6.atomicorp.com/channels/atomic/centos/6/x86_64/RPMS/php-cli-5.2.17-1.el6.art.x86_64.rpm

rpm -ivh http://www6.atomicorp.com/channels/atomic/centos/6/x86_64/RPMS/php-5.2.17-1.el6.art.x86_64.rpm

 

 

rpm -ivh http://www6.atomicorp.com/channels/atomic/centos/6/x86_64/RPMS/php-mbstring-5.2.17-1.el6.art.x86_64.rpm

rpm -ivh http://www6.atomicorp.com/channels/atomic/centos/6/x86_64/RPMS/php-devel-5.2.17-1.el6.art.x86_64.rpm

rpm -ivh http://www6.atomicorp.com/channels/atomic/centos/6/x86_64/RPMS/php-ldap-5.2.17-1.el6.art.x86_64.rpm

rpm -ivh http://www6.atomicorp.com/channels/atomic/centos/6/x86_64/RPMS/php-xml-5.2.17-1.el6.art.x86_64.rpm

rpm -ivh http://www6.atomicorp.com/channels/atomic/centos/6/x86_64/RPMS/php-pdo-5.2.17-1.el6.art.x86_64.rpm

 

rpm -ivh http://mirror.centos.org/centos/6/os/x86_64/Packages/t1lib-5.1.2-6.el6_2.1.x86_64.rpm

rpm -ivh http://www6.atomicorp.com/channels/atomic/centos/6/x86_64/RPMS/php-mysql-5.2.17-1.el6.art.x86_64.rpm

 

rpm -ivh http://www6.atomicorp.com/channels/atomic/centos/6/x86_64/RPMS/php-gd-5.2.17-1.el6.art.x86_64.rpm

 

vi /etc/php.ini

把 short_open_tag = Off 改成 On

service httpd restart

 

; 避免 yum 更新到 php 做以下設定

vi /etc/yum.conf

加入

exclude=php*







 

 


 

 

 

 





  • 贊助網站       

    優潔清潔公司
    夏季清潔讓您煥然一新,專業清潔團隊,寶貝家具不受損,輕鬆擁有乾淨居家,守護您的健康環境
    油漆粉刷工程
    優質油漆師傅,專業的油漆工程,免費諮詢刷油漆大小事,值得您信賴!
    清潔公司
    清潔公司, 電話清潔, 清潔保養, 電腦清潔, 清潔消毒, 清潔服務, 消毒服務

  • 1 樓住戶:小高
    發表時間:2014-05-01
    [檢舉]

    由於之前系統為了測試新東西、所以安裝了許多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

    2 樓住戶:小高
    發表時間:2014-05-01
    [檢舉]

    升級版本

    CentOS yum 只有php5.1.6

    但工作需要因此在網路上找方法讓php 5.2.1 升級到5.3.8

    參考

    http://www.webtatic.com/packages/php53/

    http://blog.smps.tp.edu.tw/~kcodavid/index.php?load=read&id=564

    首先

    1.rpm -ivh http://repo.webtatic.com/yum/centos/5/`uname -i`/webtatic-release-5-0.noarch.rpm

    2.

    安裝

    yum --enablerepo=webtatic install php

    升級

    yum --enablerepo=webtatic update php

    但php5.3.8 有許多安全性的修改使得先前的函式會產生安全性警告

    因此,可以升級到5.2.17

    yum --disablerepo=* --enablerepo=webtatic --exclude=php*5.3* update php



    降級版本

    若已經安裝到5.3.8造成網站產生許多警告訊息,可以利用降級的方法恢復

    1. 先移除php 包含php套件等

    yum remove php*

    2.

    yum --disablerepo=* --enablerepo=webtatic --exclude=php*5.3* install php (將會安裝5.2.17)

    3.安裝 php套件

    yum --disablerepo=* --enablerepo=webtatic --exclude=php*5.3* install php-mbstring

    如安裝 php-mcrypt , php-devel , php-gd , php-mysql 等

    可參考

    http://www.webtatic.com/packages/php53/

    3 樓住戶:小高
    發表時間:2014-05-01
    [檢舉]

    php與mysql降級過程
    php與mysql降級過程:


    1.移除php-->yum remove php

    2.移除mysql-->yum remove mysql

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

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

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

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

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

    8.重新啟動Apache與mysql

    4 樓住戶:阿凱
    發表時間:2014-07-02
    [檢舉]

    降級版本

    若已經安裝到5.3.8造成網站產生許多警告訊息,可以利用降級的方法恢復

    1. 先移除php 包含php套件等

    yum remove php*

    2.

    yum --disablerepo=* --enablerepo=webtatic --exclude=php*5.3* install php (將會安裝5.2.17)

    3.安裝 php套件

    yum --disablerepo=* --enablerepo=webtatic --exclude=php*5.3* install php-mbstring

    如安裝 php-mcrypt , php-devel , php-gd , php-mysql 等

    可參考

    http://www.webtatic.com/packages/php53/

    5 樓住戶:阿凱
    發表時間:2014-07-11
    [檢舉]

    5.3
    http://blog.yam.com/cehome/article/52538256
    http://rpg1982.blogspot.tw/2012/04/centos6-php-53-52.html

    1. 安裝 atomic repository
    wget -q -O - http://www.atomicorp.com/installers/atomic | sh
    安裝完畢會看到 /etc/yum.repos.d/atomic.repo

    2. 移除 php5.3 (如無安裝過即跳過此步驟)
    yum remove php*

    3. 安裝 php 5.2
    php-5.2* php-mbstring-5.2* php-xml-5.2* php-ldap-5.2* php-gd-5.2* php-xml-5.2* php-pdo-5.2*

    4.避免升級到 php 5.3
    vi /etc/yum.repos.d/atomic.repo 或 /etc/yum.conf
    加入 exclude=php-5.3* (加在 [atomic] 內)

    6 樓住戶:test
    發表時間:2014-07-15
    [檢舉]

    php-mysql-5.3.3-1.fc12.i686
    php-cli-5.3.3-1.fc12.i686
    php-ldap-5.3.3-1.fc12.i686
    php-pdo-5.3.3-1.fc12.i686
    php-common-5.3.3-1.fc12.i686



    rpm -qa | grep php

    yum remove php-common-5.3.3-1.fc12.i686


    yum install php-cli-5.1.6-3.i386.rpm php-common-5.1.6-3.i386.rpm php-ldap-5.1.6-3.i386.rpm php-mysql-5.1.6-3.i386.rpm php-pdo-5.1.6-3.i386.rpm php-5.1.6-3.i386.rpm



     共 6 人回應  選擇頁數 【第1 頁】 

    姓名:
    佈告內容: