美文网首页服务器
centOS 升级 php 5.3 到 5.4

centOS 升级 php 5.3 到 5.4

作者: 踏云小子 | 来源:发表于2017-02-10 21:49 被阅读14次

    1.检查当前安装的PHP包

    yum list installed | grep php
    

    2.Type in the following to download and install the required files:

    wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm && rpm -Uvh epel-release-latest-6.noarch.rpm
    
    wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm && rpm -Uvh remi-release-6*.rpm
    

    3.Now to enable the REMI repository globally:

    nano /etc/yum.repos.d/remi.repo
    

    做如下修改

    [remi]
    name=Remi's RPM repository for Enterprise Linux 6 - $basearch
    #baseurl=http://rpms.remirepo.net/enterprise/6/remi/$basearch/
    mirrorlist=http://rpms.remirepo.net/enterprise/6/remi/mirror
    enabled=1  #将0改成1
    gpgcheck=1
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
    

    CTRL-O 保存, CTRL-X退出
    4.安装php

    sudo yum install php php-gd php-mysql php-mcrypt
    

    相关文章

      网友评论

        本文标题:centOS 升级 php 5.3 到 5.4

        本文链接:https://www.haomeiwen.com/subject/bnrnittx.html