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
yum install -y epel-release
centos6 用这个
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repo
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
centos7 用这个
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
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
yum install --enablerepo=remi --enablerepo=remi-php56 php-fpm php-mysqlnd php-gd php-redis php-pecl-memcache
systemctl enable php-fpm
systemctl daemon-reload
sed -i "/pm.max_children =/c pm.max_children = 500" /etc/php-fpm.d/www.conf
sed -i "/date.timezone =/c date.timezone = Asia/Shanghai" /etc/php.ini
systemctl start php-fpm
原创文章,作者:cy,如若转载,请注明出处:https://www.cygzs.net/