Archive Old post. Originally published 19 August 2011 on the WordPress version of this site. Preserved here for the search engines and the curious. Old me had opinions.
Geek 2 min read

PHP Mcrypt on CentOS 6

Yay, CentOS 6 still doesn’t by default include mcrypt in it’s distribution on repositories.

There is hope, EPEL to the rescue again:

rpm -ivh http://www.mirrorservice.org/sites/dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
yum update

You should see EPEL listed as the repos, then:

yum install php-mcrypt

Also a few of you have mentioned you need to restart Apache. To do this:

service httpd restart

Done.

If you want to do the same for CentOS 7 then simply use this instead:

rpm -ivh http://www.mirrorservice.org/sites/dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
yum update

**Please note the above download is for CentOS 6 x86_64**

UPDATE 12/02/2013: Updated to Latest Link for EPEL 6.8
UPDATE 05/01/2015: Added the link for CentOS 7/EPEL 7.5

Hey There!

Thanks for stopping by, this is by far one of my most popular ever posts on my site, while your here why not have a look at some of my other articles. Or even better get in touch to find out how I might be able to help on your next project!

digital-ocean


Filed under Geek. No comments, on purpose.