Query if PHP is installed
[CPP]View PlainCopy
- #rpm-qa|grep PHP
Delete previously installed PHP version (yum install)
[CPP]View PlainCopy
- #rpm-E php-fpm-5.3.3-47.el6.x86_64--nodeps
- #rpm-E php-common-5.3.3-47.el6.x86_64--nodeps
- #rpm-E php-cli-5.3.3-47.el6.x86_64--nodeps
- #rpm-E php-odbc-5.3.3-47.el6.x86_64--nodeps
- #rpm-E php-xml-5.3.3-47.el6.x86_64--nodeps
- #rpm-E Php-pear-1.9.4-5.el6.noarch--nodeps
- #rpm-E php-mbstring-5.3.3-47.el6.x86_64--nodeps
- #rpm-E php-ldap-5.3.3-47.el6.x86_64--nodeps
- #rpm-E php-bcmath-5.3.3-47.el6.x86_64--nodeps
- #rpm-E php-pecl-redis-2.2.8-1.el6.x86_64--nodeps
- #rpm-E php-pdo-5.3.3-47.el6.x86_64--nodeps
- #rpm-E php-gd-5.3.3-47.el6.x86_64--nodeps
- #rpm-E php-mysql-5.3.3-47.el6.x86_64--nodeps
- #rpm-E php-xmlrpc-5.3.3-47.el6.x86_64--nodeps
- #rpm-E php-pecl-igbinary-1.2.1-1.el6.x86_64--nodeps
Update source
[CPP]View PlainCopy
- #rpm-UVH https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
- #rpm-UVH https://mirror.webtatic.com/yum/el6/latest.rpm
View a list of PHP versions
[Plain]View PlainCopy
- #yum List php*
Install PHP and related software
[Plain]View PlainCopy
#yum Install php55w.x86_64 php55w-fpm.x86_64 php55w-mysql.x86_64 php55w-gd.x86_64 libjpeg* php55w-ldap.x86_64 php55w-odbc.x86_64 php55w-pear.noarch php55w-xml.x86_64 php55w-xmlrpc.x86_64 php55w-mbstring.x86_64 Php55w-bcmath.x86_64 Php-mhash
CentOS6.5 installing the specified PHP version (php5.5) (RPM)