CentOS7.0公布也有一段時間了,因此今天把zabbix.cc從CentOS6.5遷移到CentOS7.0,并把Apache改為Nginx了。
在這里簡單介紹一下安裝php5.6的方法。
安裝php5.6版本以后不再需要安裝Zend Guard,而是用yum命令安裝php-opcache及php-pecl-apcu就可以有效的提高php執(zhí)行速度。
1. 配置yum源
事先確認yum源的鏈接是不是有效的。
# 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. 確認安裝的php版本
# yum list --enablerepo=remi --enablerepo=remi-php56 | grep php
3. 安裝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及php-pecl-apcu會有效的提高php執(zhí)行速度。
4. 確認php版本
# php -vPHP 5.6.6 (cli) (built: Feb 19 2015 10:19:37)Copyright (c) 1997-2015 The PHP GroupZend 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