CentOSyumphpmcrypt extension installation method

Source: Internet
Author: User
Tags mcrypt
This article mainly introduces how to install phpmcrypt extension using yum in CentOS. For more information, see CentOS.

When you use yum install php-mcrypt to install the mcrypt extension, the system prompts that the installation package is not installed.

Setting up Install Process
No package php-mcrypt available.
Error: Nothing to do

Mcrypt is an encrypted Extension Library, which can be used to load it.22 encryption and decryption algorithms

CentOS6 is installed with php5.3.2 by default.

The default redhat repos php does not contain mcrypt extensions.
According to Red Hat Official News (https://bugzilla.redhat.com/show_bug.cgi? Id = 621268) RHEL does not intend to add mcrypt support for PHP
Joe Orton 2010-08-05 04:47:17 EDT

Thanks for the report.

We are not planning to ship mcrypt support for PHP.

 Solution:

Download the new php 5.3 source code package from the php official website and decompress it to the local directory.
After entering the ext directory under the extracted Directory, mcrypt will be found,
Go to the mcrypt Directory

# Cd/ext/mcrypt

# Phpize

Note: If-bash: phpize not Found is reported, yum install php-devel can enable phpize to dynamically compile and install extensions.

#./Configure-with-php-config =/usr/sbin/php/bin/php-config

# Make & make install

Appears:

----------------------------------------------------------------------
Libraries have been installed in:
/Var/php-5.3.10/ext/mcrypt/modules

If you ever happen to want to link against installed libraries
In a given directory, LIBDIR, you must either use libtool, and
Specify the full pathname of the library, or use the '-llibdir'
Flag during linking and do at least one of the following:
-Add LIBDIR to the 'ld _ LIBRARY_PATH 'environment variable
During execution
-Add LIBDIR to the 'ld _ RUN_PATH 'environment variable
During linking
-Use the '-Wl,-rpath-Wl, libdir' linker flag
-Have your system administrator add LIBDIR to '/etc/ld. so. Conf'

See any operating system documentation about shared libraries
More information, such as the ld (1) and ld. so (8) manual pages.
----------------------------------------------------------------------

Build complete.
Don't forget to run 'Make test '.

Installing shared extensions:/usr/lib64/php/modules/
View:

# Php-m

...

Libxml
Mbstring
Mcrypt
Mysql
...
[Zend Modules]
Installed successfully!

View phpinfo again to view the mcrypt extension details.

Related Article

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.