[转载]PHP 5.6 on CentOS/RHEL 7.0 and 6.6 via Yum

https://webtatic.com/packages/php56/

PHP 5.6.5 has been released on PHP.net on 22nd January 2014, and is also available for CentOS/RHEL 6.5 at Webtatic via Yum.

PHP 5.6 adds new features such as:

  • constant scalar expressions
  • variadic functions
  • argument unpacking
  • exponentiation operator
  • support for large(>2GiB) file uploads
  • SSL/TLS improvements including peer verification by default
  • a new command line debugger called phpdbg

To see what else has been added, check out the What has changed in PHP 5.6.x.

To install, first you must add the Webtatic EL yum repository information corresponding to your CentOS/RHEL version to yum:

CentOS/RHEL 7.x:

rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

CentOS/RHEL 6.x:

rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm

Now you can install PHP 5.6 (along with an opcode cache) by doing:

yum install php56w php56w-opcache

If you would like to upgrade php to this version it is recommended that you first check that your system will support the upgrade, e.g. making sure any CPanel-like software can run after the upgrade.

Unless you know what you are doing, it is risky upgrading an existing system. It’s much safer to do this by provisioning a separate server to perform the upgrade as a fresh install instead.

If you know what you are doing, you can upgrade PHP by:

yum install yum-plugin-replace
 
yum replace --enablerepo=webtatic-testing php-common --replace-with=php56w-common

It will likely give you a message “WARNING: Unable to resolve all providers …”. This is normal, and you can continue by tying “y“. You will be given a chance to see what packages will be installed and removed before again being given a chance to confirm.

SAPIs – different runtime environments of PHP

mod_php NTS
(non-thread safety) Contained in the php56w package, this SAPI integrates into Apache Httpd 2.2.*. It is the standard SAPI for use with httpd prefork mpm (the default mode httpd is ran under. It is not thread-safe, but doesn’t need to be due to prefork not using threads. It’s located at /usr/lib[64]/httpd/modules/libphp5.so
cli
Contained in the php56w-cli package, this SAPI allows running scripts from the command-line, and also has a built-in web server for development-use. Located at /usr/bin/php
fpm
Contained in the php56w-fpm package, fpm (FastCGI Process Manager) is a scalable FastCGI process, which acts similar to how Httpd prefork mpm works managing it’s forks. Located at /usr/sbin/php-fpm, it is controlled using the /etc/init.d/php-fpm service script
phpdbg
Contained in the php56w-phpdbg package, phpdbg has the ability to debug scripts using breakpoints from the command-line, and also supports remote-debugging using an external Java client for remote communication.
embedded
Contained in the php56w-embedded package, this SAPI allows embedding PHP in other applications. It’s library is located at /usr/lib[64]/libphp5.so
cgi, fastcgi
Contained in the php56w-cli package, these SAPIs are not recommended for use, but are available where needed. They both exist in the binary at /usr/bin/php-cgi.
mod_php TS
(thread safety) Contained in the php56w package, this SAPI integrates into Apache Httpd 2.2.*. It is the standard SAPI for use with httpd worker mpm. It’s supposed to be thread-safe, but can’t guarantee to be, and certainly not under additional PHP extensions. It’s better to use FastCGI SAPIs than this one. It’s located at /usr/lib[64]/httpd/modules/libphp5-zts.so

Packages

Package Provides
php55w mod_php, php55w-zts
php55w-bcmath  
php55w-cli php-cgi, php-pcntl, php-readline
php56w-common php-api, php-bz2, php-calendar, php-ctype, php-curl, php-date, php-ereg, php-exif, php-fileinfo, php-filter, php-ftp, php-gettext, php-gmp, php-hash, php-iconv, php-json, php-libxml, php-openssl, php-pcre, php-pecl-Fileinfo, php-pecl-phar, php-pecl-zip, php-reflection, php-session, php-shmop, php-simplexml, php-sockets, php-spl, php-tokenizer, php-zend-abi, php-zip, php-zlib
php56w-dba  
php56w-devel  
php56w-embedded php-embedded-devel
php56w-enchant  
php56w-fpm  
php56w-gd  
php56w-imap  
php56w-interbase php_database, php-firebird
php56w-intl  
php56w-ldap  
php56w-mbstring  
php56w-mcrypt  
php56w-mssql  
php56w-mysql php-mysqli, php_database
php56w-mysqlnd php-mysqli, php_database
php56w-odbc php-pdo_odbc, php_database
php56w-opcache php55w-pecl-zendopcache
php56w-pdo  
php56w-pear  
php56w-pecl-apcu  
php56w-pecl-gearman  
php56w-pecl-geoip  
php56w-pecl-imagick  
php56w-pecl-memcache  
php56w-pecl-xdebug  
php56w-pgsql php-pdo_pgsql, php_database
php56w-phpdbg  
php56w-process php-posix, php-sysvmsg, php-sysvsem, php-sysvshm
php56w-pspell  
php56w-recode  
php56w-snmp  
php56w-soap  
php56w-tidy  
php56w-xml php-dom, php-domxml, php-wddx, php-xsl
php56w-xmlrpc  

Opcode Caches

The PHP distribution now comes with an opcode cache. This is the Zend Optimizer+ opcode cache, now known as the Zend OPcache extension. This extension is optional, so does not preclude you from using an alternate one.

Due to it being included in the PHP source distribution, it will be well maintained and more suitable for use while other Opcode cache’s are being updated over the coming months.

yum install php56w-opcache

error_reporting E_ALL now includes E_STRICT

As mentioned in the PHP 5.4 guide:

You may get a lot more errors coming out of your error logs if by default your error_reporting is set to E_ALL now without explicitly turning off E_STRICT. The default php.ini that comes with the PHP package turns this off by default, but if you are upgrading from an existing installation, your php.ini may not be updated, meaning this will likely be turned on.

时间: 2024-08-29 00:08:48

[转载]PHP 5.6 on CentOS/RHEL 7.0 and 6.6 via Yum的相关文章

PHP 5.4 on CentOS/RHEL 7.0, 6.5 and 5.10 via Yum

PHP 5.4.36 has been released on PHP.net on 18th December 2014, and is also available for CentOS/RHEL 5.10 and 6.5 at Webtatic via Yum. Update 2013-07-21 – A new package “php54w-mysqlnd” has been added as an alternative to “php54w-mysql”. This will in

[转载]How to Install Google Chrome 39 in CentOS/RHEL 6 and Fedora 19/18

FROM: http://tecadmin.net/install-google-chrome-in-centos-rhel-and-fedora/ Google Chrome is a freeware web browser developed by Google. It was released as a beta version for Microsoft Windows on September 2, 2008, and as a stable public release on De

[转载]Install Opera 12.16 Web Browser in CentOS/RHEL and Fedora

FROM: http://tecadmin.net/install-opera-web-browser-in-centos-rhel-fedora/ Opera is an modern web browser with modern style with powerful features. Its Off-Road mode compresses pages for faster, all-conditions browsing. It helps you stay online when

安装LAMP服务器(Apache,MariaDB的,PHP)在CentOS / RHEL / Linux

Install LAMP Server (Apache, MariaDB, PHP) On CentOS/RHEL/Scientific Linux 7 By SK Share on Facebook Tweet on Twitter LAMP is a combination of operating system and open-source software stack. The acronym of LAMP is derived from first letters of Linux

Install MySQL 5.7 on Fedora 25/24, CentOS/RHEL 7.3/6.8/5.11

1. Change root user Bash su - ## OR ## sudo -i 2. Install MySQL YUM repository Fedora Bash ## Fedora 25 ## dnf install https://dev.mysql.com/get/mysql57-community-release-fc25-9.noarch.rpm ## Fedora 24 ## dnf install https://dev.mysql.com/get/mysql57

Install Oracle Java JDK/JRE 7u55 on Fedora 20/19, CentOS/RHEL 6.5/5.10

What's new in Sun/Oracle Java 7 VM Compressed 64-bit object pointers Garbage-First GC (G1) JSR 292: VM support for non-Java languages (InvokeDynamic) Lang JSR 294: Language and VM support for modular programming JSR 308: Annotations on Java types JSR

RHEL/CentOS 6.x使用EPEL6与remi的yum源安装MySQL 5.5.x

PS:如果既想获得 RHEL 的高质量.高性能.高可靠性,又需要方便易用(关键是免费)的软件包更新功能,那么 FedoraProject 推出的 EPEL(Extra Packages for Enterprise Linux)正好适合你.EPEL(http://fedoraproject.org/wiki/EPEL) 是由 Fedora 社区打造,为 RHEL 及衍生发行版如 CentOS.Scientific Linux 等提供高质量软件包的项目.装上了 EPEL,就像在 Fedora 上一

CentOS/RHEL Linux安装EPEL第三方软件源

EPEL(Extra Packages for Enterprise Linux) 是由 Fedora 社区打造,为 RHEL 及衍生发行版如 CentOS等提供高质量软件包的项目.装上了EPEL,就像在 Fedora 上一样,可以通过 yum install 软件包名,即可安装很多以前需要编译安装的软件.常用的软件或一些比较流行的软件,比如现在流行的nginx, openvpn等等,都可以使用EPEL很方便的安装更新. 安装EPEL源 更新: 目前可以直接通过执行命令: yum install

如何在CentOS/RHEL上安装或升级新的内核版本

Linux内核版本 Linux内核版本分为主线.稳定和长期版本.(所有内核版本都可以在内核开发官方网站https://www.kernel.org上获取)目前我们看到最新的稳定内核版本为4.10.12. 主线版本代表整个Linux内核的一个树干,新的主线版本每2-3个月发布一次,所有的新功能及特性都将会包含主线版本中.稳定内核则是在主线版本中,被认为是"稳定的"得出.稳定内核的任何错误修复都将从主线树中返回,也就是主线内核出现的任何错误(包括之前的任何旧版本内核的错误和BUG)在得到修