Fully installed MCrypt under Ubuntu

Source: Internet
Author: User
Tags mcrypt

SOURCE article:

Install MCrypt under Ubuntu

1, first of all to download three software

0libmcrypt-2.5.8.tar.gz

: http://sourceforge.net/project/showfiles.php?group_id=87941&package_id=91774&release_id=487459

Mhash-0.9.9.tar.gz

: http://sourceforge.net/project/showfiles.php?group_id=4286&package_id=4300&release_id=645636

Mcrypt-2.6.8.tar.gz

: http://sourceforge.net/project/showfiles.php?group_id=87941&package_id=91948&release_id=642101

2. Install Libmcrypt First

#tar-ZXVF libmcrypt-2.5.8.tar.gz
#cd libmcrypt-2.5.8
#./configure
#make
#make Install
Description: Libmcript is installed by default on/usr/local

3. Installing Mhash
#tar-ZXVF mhash-0.9.9.9.tar.gz
#cd mhash-0.9.9.9
#./configure
#make
#make Install

4. 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

Description: Because Libmcrypt's link library could not be found when configuring MCrypt, it could not be compiled because the Libmcrypt link library is under the/usr/local/folder. To add ld_library_path=/usr/local Import key library when configuring MCrypt

5. Installing PHP Extensions: Dynamic loading
The common problem of using PHP is: Compile php forget to add an extension, and then want to add extensions, but because after installing PHP and installed something such as pear, do not want to remove the catalog reload, so you can use Phpize.
The method is:
1). To have PHP compression package identical to the existing PHP, expand to enter the Ext/mcrypt directory (inside the mcrypt PHP extension)
#cd/usr/local/software/php-5.3.2/ext/mcrypt
2). Execute/usr/local/php/bin/phpize
#/usr/local/php/bin/phpize
3). Compile and install
After the execution, you will find that the current directory more than some configure files, if no error, then run according to the prompts
./configure--with-php-config=/usr/local/php/bin/php-config
Be careful to make sure that/usr/local/php/bin/php-config exists first.
Make
Make install

4). Copy the mcrypt.so file
You will be prompted to mcrypt.so the directory where the file is located after make install
#cp/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/mcrypt.so/usr/local/software/php-5.3.2/ext

5). Configure PHP.ini
#vi/usr/local/php/lib/php.ini
Modify PHP.ini
Configuration Extension_dir = "/usr/local/software/php-5.3.2/ext"
At the end add a sentence extension=mcrypt.so

6. Finally restart Nginx

Fully installed MCrypt under Ubuntu

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.