[转载]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 |
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 |
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.
[转载]PHP 5.6 on CentOS/RHEL 7.0 and 6.6 via Yum的更多相关文章
- PHP 5.4 on CentOS/RHEL 6.4 and 5.9 via Yum
PHP 5.4 on CentOS/RHEL 6.4 and 5.9 via Yum PHP 5.4.16 has been released on PHP.net on 6th June 2013, ...
- 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 ...
- 【Linux】YUM Repositories for CentOS, RHEL & Fedora Systems
这里是官方wiki:https://wiki.centos.org/AdditionalResources/Repositories 一.简介 YUM(Yellowdog Updater Modifi ...
- [转载]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 freewa ...
- [转载]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 br ...
- Install Google Chrome on Fedora 28/27, CentOS/RHEL 7.5 (在 fedora 28 等 上 安装 chrome)
今天在使用 fedora 安装 chrome 的时候遇到了问题,今天进行将安装过程进行记录下来.需要安装第三方软件仓库. 我们需要进行安装 fedora-workstation-repositorie ...
- 如何在CentOS/RHEL & Fedora上安装MongoDB 3.2
MongoDB(名称取自"huMONGOus")是一个有着全面灵活的索引支持和丰富的查询的数据库.MongoDB通过GridFS提供强大的媒体存储.点击这里获取MongoDB的更多 ...
- (转)RHEL/CentOS 6.x使用EPEL6与remi的yum源安装MySQL 5.5.x
PS:如果既想获得 RHEL 的高质量.高性能.高可靠性,又需要方便易用(关键是免费)的软件包更新功能,那么 Fedora Project 推出的 EPEL(Extra Packages for En ...
- 通过yum升级CentOS/RHEL最小化安装
1.如果你有安装CentOS / RHEL最小服务器安装,您可能有很多麻烦没有安装包 2.有一种方法来安装所有的包,需要一个基本的服务器,使用yum groupinstall命令 3.从最小的安装基本 ...
随机推荐
- ADF_Data Binding系列2_使用URL Service Data Control
2015-02-16 Created By BaoXinjian
- MessageBox
首先要知道MessageBox返回的值为DialogResult类型.返回值可能有如下: DialogResult.OK //点击“确定”按钮后返回的值 DialogResult.YES //点击 ...
- phonegap文件,目录操作以及网络上传,下载文件(含demo)
正在做一个跨平台的应用,需要使用phonegap进行文件的一些基本操作. 需求如下:可以选择本地图片,或者从相机选择图片,并进行显示在本地,然后上传到服务器,以及可以从服务器下载图片显示出来,如果本地 ...
- GC之七--gc日志分析工具
性能测试排查定位问题,分析调优过程中,会遇到要分析gc日志,人肉分析gc日志有时比较困难,相关图形化或命令行工具可以有效地帮助辅助分析. Gc日志参数 通过在tomcat启动脚本中添加相关参数生成gc ...
- gerrit error: unpack failed: error Permission denied
gerrit服务器迁移后,clone和pull代码到本地,都没问题. 但是,push时,报错: 查看了下git版本库存储目录,发现git下版本库镜像文件owner都是root.因为之前安装的gerri ...
- web.xml 的加载过程
初始化过程: 在启动Web项目时,容器(比如Tomcat)会读web.xml配置文件中的两个节点<listener>和<contex-param>. 接着容器会创建一个Serv ...
- [CF148E] Porcelain (分组背包)
题目链接:http://codeforces.com/problemset/problem/148/E 题目大意:有n组数据,每次可以从任意一组的两端取出1个数,问你取m个数最大能组成多少? 思路:先 ...
- Ubuntu-tomcat7目录
ubuntu下通过apt-get install tomcat7方式安装的tomcat目录分布如下,做个记录: user@myserver:/var/lib/tomcat7$ ls -lttotal ...
- 类似新浪 腾讯微博字数统计 控制js(区分中英文 符号)
<script> ; function Q(s) { return document.getElementById(s); } function checkWord(c) { len = ...
- 根据指定Word模板生成Word文件
最近业务需要批量打印准考证信息 1.根据Table数据进行循环替换,每次替换的时候只替换Word中第一个Table的数据, 2.每次替换之后将Word中第一个Table数据进行复制,将复制Table和 ...