Mình làm theo hướng dẫn này:
You can install Mcrypt from the PHP Source Tree as a module if you choose.

You first need to ensure you have libmcrypt, libmcrypt-devel, and mcrypt installed, then do:

# cd php-5.x.x/ext/mcrypt
# phpize
# aclocal
# ./configure
# make && make install

Enable the module by adding: 'extension=mcrypt.so' to PHP.ini.

Done!

Very handy if you need to install a single module and you may have installed PHP via RPM, but don't wish to recompile your whole PHP install.
Mọi chuyện hoàn toàn bình thường nhưng khi khởi động lại apache thì nó thông báo:
PHP Warning: Module 'mcrypt' already loaded in Unknown on line 0
PHP 5.4.32 (cli) (built: Sep 5 2014 04:18:53)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
with XCache v2.0.1, Copyright (c) 2005-2012, by mOo
with the ionCube PHP Loader v4.6.1, Copyright (c) 2002-2014, by ionCube Ltd., and
with Zend Guard Loader v3.3, Copyright (c) 1998-2013, by Zend Technologies
Xin vui lòng giúp đỡ mình.