I recently setup a VPS with Virtualmin for a Magento installation and was dissapointed to find out that centos6 does not come with the prepackaged mcrypt extension. The automated virtualmin installer had failed to include it so I had to find a way to install it.
I tried yum install php-mcrypt but there was no package found in the default repository. After adding the EPEL repository PHP did not work anymore.
Here’s what I did instead on a brand new Virtualmin installation with PHP5.3.
wget http://dl.fedoraproject.org/pub/epel/6/i386/php-mcrypt-5.3.3-1.el6.i686.rpm wget http://dl.fedoraproject.org/pub/epel/6/i386/libmcrypt-2.5.8-9.el6.i686.rpm
And then just run a local yum install:
yum localinstall php-mcrypt-5.3.3-1.el6.i686.rpm yum localinstall libmcrypt-2.5.8-9.el6.i686.rpm
Restart apache and you are good to go!