As a prerequisite you have to have installed Ruby 1.9.x on your CentOS system.
If you don’t know how to do it, follow the instructions on this post:
Installing Ruby 1.9 on CentOS
Once you are ready follow the next steps:
On a terminal type:
$ gem install passenger
$ passenger-install-apache2-module
This last command is going to walk you through the process of installation,
helping you install whatever is missing on your system and at the end giving the instructions
to “patch” your apache’s configurations file.
On my case, I had to install the following modules:
$ yum install httpd-devel
$ yum install apr-devel
$ yum install apr-util-devel
After installing them re-run the command again
$ passenger-install-apache2-module
And then edit the apache configuration
/etc/httpd/conf/httpd.conf
Ad the following lines to the file: