这是本文档旧的修订版!
安装php56
CentOS 6使用yum安装PHP5.6
删除旧php包 <code bash> 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 </code>
配置epel源
<code bash> yum install -y epel-release wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo </code>
配置remi源 <code bash> rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm </code>
安装php5.6.x <code bash> 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 </code>
安装php-fpm <code bash> yum install --enablerepo=remi --enablerepo=remi-php56 php-fpm </code>
配置开机启动服务 <code bash> #设置php-fpm开机启动 chkconfig php-fpm on #启动php-fpm /etc/init.d/php-fpm start </code>
查看是否安装成功 <code bash> ps -ef | grep php netstat -anp | grep 9000 </code>
