Category Archives: Red Hat/CentOS

RPMforge howto

The RPMforge project is an open source project that provides RPM packages for various distributions (RH, CentOS, Fedora, …). To enable RPMforge you can install the rpmforge-release package for your distribution.

For RHEL5 / CentOS-5:
i386

# wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.i386.rpm
# rpm -Uvh rpmforge-release-0.5.1-1.el5.rf.i386.rpm

x86_64

# wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm
# rpm -Uvh rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm

For older releases (RHEL 4 / CentOS 4) please follow the instructions available on RPMrepo Wiki

How do I check what version of Centos/Fedora/RH my server is running?

You can run the command below at a command prompt to see what version of Centos/Fedora/RH your server is running.

[root@hydra:~]# cat /etc/redhat-release
CentOS release 5.2 (Final)

Fedora sample:

[root@s2 ~]# cat /etc/redhat-release
Fedora release 7 (Moonshine)

Upgrading to PHP 5.2.5 on RHEL and CentOS

As you probably know, the latest CentOS and RHEL distros are available only with PHP 5.1.6 and if you want to upgrade PHP, you need to install it manually (or to find someone to do it for you 🙂 ). The 5.2.5 release brings several security enhancements, more than 60 bug fixes, and improved performance for those of you that like arrays (and really, who doesn’t?). I wanted to install latest RoundCube webmail application and it won’t work if you don’t have PHP> 5.2. Also, latest Vivvo won’t work without 5.2.x

So, if you don’t want to build rpms or to go through ./configure, make, make install nightmare, you can enable Jason Litka yum repository to your RHEL or CentOS system. To do this please follow next few steps.

First you need to validate that the packages came from Jason Litka and you’ll do it with next command:

#rpm --import http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka

After you added his public GPG key, you’ll need to adjust yum so he can search at his repo. To do this, please follow next steps:

#nano -w /etc/yum.repos.d/utterramblings.repo

Now copy next lines inside this file and save those changes.

[utterramblings]
name=Jason's Utter Ramblings Repo
baseurl=http://www.jasonlitka.com/media/EL$releasever/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka

Now you can upgrade your PHP installation with simple:

#yum update php

More information about this can be found HERE.

#php -v

should return

[root@ns1 ~]# php -v
PHP 5.2.6 (cli) (built: May  5 2008 10:32:59)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
[root@ns1 ~]#

I forget to say that you should restart httpd after upgrade.