Linux under php5.3.3 installation mcrypt extension

Source: Internet
Author: User
Tags mcrypt

Specific operation:

First, download the package

1, download PHP (version to be consistent with the system installation)

Http://pan.baidu.com/s/1mifTbfE

2, download libmcrypt (install MCrypt need this package)

Http://pan.baidu.com/s/1mifTbfE

3, download Mhash (install MCrypt need this package)

Http://pan.baidu.com/s/1mifTbfE

4. Download MCrypt

Http://pan.baidu.com/s/1mifTbfE

Or:

wget http: //downloads .sourceforge.net /project/mcrypt/Libmcrypt/2 .5.8 /libmcrypt-2 .5.8. tar .gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fmcrypt%2Ffiles%2FLibmcrypt%2F2.5.8%2F&ts=1430725959&use_mirror=ncu wget http: //downloads .sourceforge.net /project/mcrypt/MCrypt/2 .6.8 /mcrypt-2 .6.8. tar .gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fmcrypt%2Ffiles%2FMCrypt%2F2.6.8%2F&ts=1430726021&use_mirror=ncu wget http: //downloads .sourceforge.net /project/mhash/mhash/0 .9.9.9 /mhash-0 .9.9.9. tar .gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fmhash%2Ffiles%2Fmhash%2F0.9.9.9%2F&ts=1430726218&use_mirror=ncu wget http: //museum .php.net /php5/php-5 .3.3. tar .gz

After downloading the above package, upload to the/USR/LOCAL/SRC directory

Second, install the package

1, installation Libmcrypt

CD/USR/LOCAL/SRC #进入软件包存放目录

Tar zxvf libmcrypt-2.5.8.tar.gz #解压

CD libmcrypt-2.5.8 #进入安装目录

./configure #配置

Make #编译

Make install #安装

2, Installation Mhash

Cd/usr/local/src

Tar zxvf mhash-0.9.9.9.tar.gz

CD mhash-0.9.9.9

./configure

Make

Make install

3, Installation MCrypt

Cd/usr/local/src

Tar zxvf mcrypt-2.6.8.tar.gz

CD mcrypt-2.6.8

Ln-s/usr/local/bin/libmcrypt_config/usr/bin/libmcrypt_config #添加软连接

Export ld_library_path=/usr/local/lib: $LD _library_path #添加环境变量

./configure

Make

Make install

Third, recompile PHP

Attention:

tar zxf php-5.3.3. tar .gz cd php-5.3.3 /ext/mcrypt/ /usr/bin/phpize (This command has, you can, if not, can only download php5.3.3 source (Http://pan.baidu.com/s/1mifTbfE), to do./configure) . /configure --with-php-config= /usr/bin/php-config make make install echo ‘extension=mcrypt.so‘ /etc/php .d /mcrypt .ini /etc/init .d /httpd reload php -m | grep ‘mcrypt‘ Compile and install:

1. Check the PHP compilation parameters installed before the system

/usr/local/php/bin/php-i |grep Configure #查看php编译参数, the compilation parameters are recorded, followed by the

2. Install PHP

Cd/usr/local/src

Tar zxvf php-5.3.3.tar.gz

CD php-5.3.3

'./configure '--prefix=/usr/local/php '--enable-mbstring=all '--with-config-file-path=/usr/local/php/etc '-- With-zlib '--with-mysql=/usr/local/mysql-5.1.38/'--with-gd '--with-mysqli=/usr/local/mysql-5.1.38/bin/mysql_ Config '--with-jpeg-dir=/usr '--with-png-dir=/usr '--enable-fpm '--enable-soap '--with-freetype-dir=/usr/lib64 '--with-iconv=/usr/local '--with-curl '--with-mcrypt '

Here you can refer to the previous installation./configure

#在之前的编译参数后面增加 '--with-mcrypt ' carriage return

Make #编译

Make install #安装

Iv. testing whether the MCrypt extension has been successfully installed

Create a new info.php test page in the site directory, write the following code, save

<?php

Phpinfo ();

?>

Linux under php5.3.3 installation mcrypt extension

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.