参考文档:http://essun.blog.51cto.com/721033/1288442
安装的时候提示要安装zlib库
yum -y install zlib zlib-devel
源码安装PHP的时候错误太多,到最后给我搞崩溃了
我就直接yum安装了
文章转自:http://blog.aboutc.net/linux/50/yum-install-php-on-linux
添加 epel 源
# rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
添加 remi 源
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
安装 PHP
# yum --enablerepo=remi,remi-php55 install php-fpm php-common php-devel php-mysqlnd php-mbstring php-mcrypt
[root@oracle src]# php -v
PHP 5.5.37 (cli) (built: Jun 21 2016 14:21:25)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
启动 php-fpm
# service php-fpm start
Starting php-fpm: