1. 程式人生 > >yum安裝高版本php

yum安裝高版本php

1.檢查當前安裝的PHP包 yum list installed | grep php  

2.如果有安裝的PHP包,先刪除他們 yum remove php.x86_64 php-cli.x86_64 php-common.x86_64 php-gd.x86_64 php-ldap.x86_64 php-mbstring.x86_64 php-mcrypt.x86_64 php-mysql.x86_64 php-pdo.x86_64  

3.配置yum源   追加CentOS 6.5的epel及remi源。 # rpm -Uvh http://ftp.iij.ad.jp/pub/linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm # rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm 以下是CentOS 7.0的源。 # yum install epel-release # rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm 使用yum list命令檢視可安裝的包(Packege)。 # yum list --enablerepo=remi --enablerepo=remi-php56 | grep php

4.安裝PHP5.6.x yum源配置好了,下一步就安裝PHP5.6。 # yum install --enablerepo=remi --enablerepo=remi-php56 php php-opcache php-devel php-mbstring php-mcrypt php-mysqlnd php-phpunit-PHPUnit php-pecl-xdebug php-pecl-xhprof

5.用PHP命令檢視版本 # php --version ---------------------  作者:G1LUCK  來源:CSDN  原文:https://blog.csdn.net/gggoodluck/article/details/78951399?utm_source=copy  版權宣告:本文為博主原創文章,轉載請附上博文連結!