~~~txt
检查当前安装的PHP包
命令:yum list installed | grep php
~~~
~~~txt
如果有安装的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
~~~
~~~txt
配置yum源
命令:yum install epel-release
rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
查看可安装的包(Packege)
命令:yum list --enablerepo=remi --enablerepo=remi-php56 | grep php
~~~
~~~txt
安装PHP
命令:
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
~~~
~~~txt
查看是否安装成功
命令:php –version
~~~