在CentOS/RHEL 6.2上使用YUM安裝PHP5.4

來源:互聯網
上載者:User

標籤:安全模式   伺服器   魔術   特色   

核心命令

rpm -Uvh http://repo.webtatic.com/yum/el6/latest.rpm   yum install php54w


以下轉自範例:


php5.4於2012年5月8號發布,從php5.4.0開始php加入了一些新特色如:


Traits支援

內建了一個簡單的Web伺服器

提供了數組簡短文法

直接對函數傳回值進行數組取值

最終刪除魔術方法及安全模式

你可以在這裡看到更新日誌。


這裡使用 Webtatic EL6的YUM源來安裝php5.4,我們首頁安裝Webtatic EL6 YUM源

rpm -Uvh http://repo.webtatic.com/yum/el6/latest.rpm  

安裝php5.4

yum install php54w  

如果安裝失敗,建議您先卸載以前的php再進行安裝,使用yum remove php php-*


附帶的php擴充列表:

PackageProvides

php54wmod_php

php54w-bcmath 

php54w-cliphp-cgi, php-pcntl, php-readline

php54w-commonphp-api, php-bz2, php-calendar, php-ctype, php-curl, php-date, php-exif, php-fileinfo, 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

php54w-dba 

php54w-devel 

php54w-embeddedphp-embedded-devel

php54w-enchant 

php54w-fpm 

php54w-gd 

php54w-imap 

php54w-interbasephp_database, php-firebird

php54w-intl 

php54w-ldap 

php54w-mbstring 

php54w-mcrypt 

php54w-mssql 

php54w-mysqlphp-mysqli, php_database

php54w-odbcphp-pdo_odbc, php_database

php54w-pdo 

php54w-pgsqlphp-pdo_pgsql, php_database

php54w-processphp-posix, php-sysvmsg, php-sysvsem, php-sysvshm

php54w-pspell 

php54w-recode 

php54w-snmp 

php54w-soap 

php54w-tidy 

php54w-xmlphp-dom, php-domxml, php-wddx, php-xsl

php54w-xmlrpc 

php54w-zts 


鑒於目前Webtatic對php5.3提供的擴充也就這麼多,php5.4也就提供這些。www.linuxidc.com 其它擴充像 opcode caches目前還沒有出來,但是Webtatic會努力的儘快公布出來。


注意事項

最新版本中的error_reporting 中E_ALL 現在包含了 E_STRICT,會出現更多的警告及錯誤提示。預設情況下error_reporting是關閉狀態,但是如果是從舊的php版本中升級而來,php.ini可能得不到更新,error_reporting可能開啟著。


關於php5.4在centos5上的安裝升級

因為centos已經過去的版本了,用的越來越少,把php5.4移植到centos5上也需要大量的工作,估計夠嗆能完成啊。


在CentOS/RHEL 6.2上使用YUM安裝PHP5.4

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.