ScaleScaleScaleScale

Tips / Nginx


How to install PHP 5.5 on CentOS/RHEL 5.9 / 6.4

Today we are going to see what’s new on PHP 5.5 and have a quick tutorial about how to install php 5.5 on CentOS/RHEL. PHP 5.5 has been released on 22nd August 2013, and the good news are that we can install this new version for CentOS/RHEL 5.9 and 6.4.

What’s new on PHP 5.5.x?

  • Support for generators via the yield keyword
  • Finally, try-catch blocks now support the finally block (no pun intended)
  • The list() construct can now be used inside a foreach control structure (this saves code)
  • Passing arbitrary expressions to empty() instead of variables is now supported
  • Array and string literals can now be dereferenced directly (this is useful)
  • New password hashing API

If you want to know more about the new features check out What has changed in PHP 5.5.x

Anyway, let’s go to the good stuff.

Installing PHP 5.5 on CentOS/RHEL

Add your repo depending on what version you are using.

For CentOS/RHEL 6.x:

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

For CentOS/RHEL 5.x:

rpm -Uvh http://mirror.webtatic.com/yum/el5/latest.rpm

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

yum install php55w

PHP 5.5.x Opcode Caches

The new version of PHP comes with an opcode cache. This is the Zend Optimizer + opcode cache, known as the Zend OPcache extension. You can install this opcode cache using this command:

yum install php55w-opcache

We recommend installing the most used packages, such as:

yum install php55w-devel php55w-mbstring php55w-mcrypt php55w-gd php55w-mysql php55w-xml

Check your php version:

php -v

What other php 5.5.x packages can you install?

Package Provides

php55w mod_php, php55w-zts
php55w-bcmath
php55w-cli php-cgi, php-pcntl, php-readline
php55w-common php-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
php55w-dba
php55w-devel
php55w-embedded php-embedded-devel
php55w-enchant
php55w-fpm
php55w-gd
php55w-imap
php55w-interbase php_database, php-firebird
php55w-intl
php55w-ldap
php55w-mbstring
php55w-mcrypt
php55w-mssql
php55w-mysql php-mysqli, php_database
php55w-mysqlnd php-mysqli, php_database
php55w-odbc php-pdo_odbc, php_database
php55w-opcache php55w-pecl-zendopcache
php55w-pdo
php55w-pecl-memcache
php55w-pecl-xdebug
php55w-pgsql php-pdo_pgsql, php_database
php55w-process php-posix, php-sysvmsg, php-sysvsem, php-sysvshm
php55w-pspell
php55w-recode
php55w-snmp
php55w-soap
php55w-tidy
php55w-xml php-dom, php-domxml, php-wddx, php-xsl
php55w-xmlrpc

Popular search terms:

  • centos nginx 1 4 0
  • Do you want to install opcode cache of the PHP? [y/n]:
  • how to install php 5 5 in centos 6 9
  • https://yandex ru/clck/jsredir?from=yandex ru;search;web;;&text=&etext=1829 1ftH-Z9ICDKBgJZIufSb6oXN7n59_Daabc5k2b67bbV2T5KBkeSIgv7TkrwjTVuQ 13e4641fa21994d8f7b8c46908c39975f0406dcb&uuid=&state=_BLhILn4SxNIvvL0W45KSic66uCIg23qh8iRG98qeIXme
profile

Esteban Borges

Linux Geek, Webperf Addict, Nginx Fan. CTO @Infranetworking