Reprinted from: http://www.zabbix.cc/technic/1858/
CentOS7.0 has been announced for a while, so today we migrated zabbix.cc from CentOS6.5 to CentOS7.0, and changed Apache to Nginx.
Here is a brief introduction to the method of installing php5.6.
After installing the php5.6 version, it is no longer necessary to install Zend Guard, but using the yum command to install php-opcache and php-pecl-apcu can effectively improve the execution speed of php.
1. Configure yum source
Make sure that the link to the yum source is valid in advance.
# rpm -Uvh http://ftp.iij.ad.jp/pub/linux/fedora/epel/7/x86_64/e/epel-release-7-5.noarch.rpm # rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
2. Confirm the installed php version
# yum list --enablerepo=remi --enablerepo=remi-php56 | grep php
3. Install php5.6
# yum install --enablerepo=remi --enablerepo=remi-php56 php php-opcache php-pecl-apcu php-devel php-mbstring php-mcrypt php-mysqlnd php-phpunit-PHPUnit php-pecl-xdebug php-pecl-xhprof php-pdo php-pear php-fpm php-cli php-xml php-bcmath php-process php-gd php-common
php-opcache and php-pecl-apcu will effectively improve the execution speed of php.
4. Confirm the php version
# php -v PHP 5.6.6 (cli) (built: Feb 19 2015 10:19:37) Copyright (c) 1997-2015 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2015, by Zend Technologies with Xdebug v2.3.1, Copyright (c) 2002-2015, by Derick Rethans