Defaul ClearOS 6.6 comes with PHP version 5.3.3-40. If you followed the ClearOS all-in-one server install, this is the version you end up with. It’s old. I needed to upgrade PHP to version 5.4.x doing a project. This is how I did it.
Import Tim Burgess his repository
# rpm --import ftp://timburgess.net/RPM-GPG-KEY-TimB.txt
# cd /tmp # wget ftp://timburgess.net/repo/clearos/6/os/x86_64/timb-release-1-1.noarch.rpm # rpm -Kv timb-release-1-1.noarch.rpm # rpm -Uvh timb-release-1-1.noarch.rpm
Install t1lib, ‘PostScript Type 1 font rasterizer’ dependence
yum --enablerepo=clearos-core -y install t1lib
Example:
[...] Dependencies Resolved ========================================================================================================= Package Arch Version Repository Size ========================================================================================================= Installing: t1lib x86_64 5.1.2-6.el6_2.1 clearos-core 159 k Transaction Summary ========================================================================================================= Install 1 Package(s) Total download size: 159 k Installed size: 386 k [...] Installed: t1lib.x86_64 0:5.1.2-6.el6_2.1 Complete!
Now upgrade PHP to 5.4.19
# yum --enablerepo=timb -y update php
Example
Dependencies Resolved ========================================================================================================= Package Arch Version Repository Size ========================================================================================================= Updating: php x86_64 5.4.19-1.clearos timb 2.7 M Updating for dependencies: php-cli x86_64 5.4.19-1.clearos timb 2.6 M php-common x86_64 5.4.19-1.clearos timb 923 k php-gd x86_64 5.4.19-1.clearos timb 141 k php-ldap x86_64 5.4.19-1.clearos timb 57 k php-mbstring x86_64 5.4.19-1.clearos timb 943 k php-mysql x86_64 5.4.19-1.clearos timb 134 k php-pdo x86_64 5.4.19-1.clearos timb 118 k php-process x86_64 5.4.19-1.clearos timb 59 k php-soap x86_64 5.4.19-1.clearos timb 219 k php-xml x86_64 5.4.19-1.clearos timb 169 k Transaction Summary ========================================================================================================= Upgrade 11 Package(s) Total download size: 8.0 M Downloading Packages: [...] Complete!
Now check you installed PHP version:
# php -v PHP 5.4.19 (cli) (built: Sep 2 2013 22:09:58) Copyright (c) 1997-2013 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
You might need to restart Apache web server to see results in your web project.
# service httpd restart Stopping httpd: [ OK ] Starting httpd: [ OK ]
Sources:
https://www.clearos.com/support/documentation/clearos/content:en_us:kb_howtos_adding_tim_s_repo