Install php-mcrypt on CentOS 6

For me the answer was:

1) Get the Repos from

wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
sudo rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm

2) Install it via:

sudo yum update
sudo yum install php-mcrypt*

3) Edit the mcrypt.ini

sudo nano /etc/php.d/mcrypt.ini

add this

extension=/usr/lib64/php/modules/mcrypt.so

Finally 4) Restart your webserver:

sudo service httpd restart

I run this steps in CentOS 6.3 (64) on Azure From Microsoft Linux image

Hope it helps you.

Best Regards.


I had the same issue, and found the previous suggestions gave me enough info to get it working on my server. The following is what I did:

1) Install EPEL repository (From: http://www.rackspace.com/knowledge_center/article/installing-rhel-epel-repo-on-centos-5x-or-6x):

wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
sudo rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm

2) Install it via:

yum update
yum install php-mcrypt*

The yum update updated the repository reference on my server then the 2nd command got what I needed :)

3) Restart your webserver. For my apache install I did:

service httpd restart

Tags:

Php

Centos