Go to http://www.sourceforge.net download Libmcrypt,mhash,mcrypt installation package
Libmcrypt (libmcrypt-2.5.8.tar.gz):
MCrypt (mcrypt-2.6.8.tar.gz):
Mhash (mhash-0.9.9.9.tar.gz):
Install Libmcrypt First
#tar -zxvf libmcrypt-2.5. 8. Tar . GZ#CD Libmcrypt-2.5. 8 #. /configure#make#makeinstall
Installing Mhash
#tar -zxvf mhash-0.9. 9.9. Tar . GZ#CD Mhash-0.9. 9.9 #. /configure#make#makeinstall
Installing MCrypt
#tar -zxvf mcrypt-2.6. 8. Tar . GZ#CD mcrypt-2.6. 8 #LD_LIBRARY_PATH=/usr/local/lib./configure#make# make Install
Finally, check whether the installation is successful
Go to the PHP installation directory and locate the MCrypt directory
CD php-5.3. 3/ext/mcrypt/
Execute sequentially
Phpize
See the following:
Configuring For:php API Version: 20090626Zend Module API No: 20090626Zend Extension API No: 220090626
Continue with the following command:
./configure--with-php-config=/usr/local/php/bin/php-config
Do not know the above path can be found with the following command
Whereis Php-config
Until you do not error, appear: Config.status:creating config.h, execute the following command
Make Make Install
At the end of the final, you will be prompted as follows, stating that you are done
Installing shared extensions: /usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/
By the way, check if the mrcypt.so extension has been created successfully
Then the thing is simple, add a extension=mcrypt.so to your php.ini
MCrypt Extensions for PHP under Linux CentOS