Most of the time, the OpenSSL component is used, the following is a description of Linux under the PHP installation OpenSSL extension:
Install the OpenSSL component, the general PHP installation directory has many extension components of the installation package, of course, including OpenSSL, for example, my PHP installation directory is/data/php-5.4.32, then the installation directory of the OpenSSL component is/data/ Php-5.4.32/ext/openssl, and then do the following:
(1) Cd/data/php-5.4.32/ext/openssl
(2) MV Config0.m4 CONFIG.M4
(3)/data/php/bin/phpize
(4)./configure--with-openssl--with-php-config=/data/php/bin/php-config, if this step cannot find OpenSSL ' s <evp.h> The error executes the following command:
Yum Install OpenSSL Openssl-devel
Ln-s/usr/lib64/libssl.so/usr/lib/
Then repeat (3) (4) Step
(5) Make
(6) Make install, successful installation will generate a directory containing openssl.so
Modify the php.ini file, you should first set up a storage directory for the extension component, for example, my storage directory is/data/php/ext, then modify the Extension_dir in php.ini to Extension_dir = "/data/php/ext", Then add extension=openssl.so at the end of the extension, and finally save the file
Restart PHP and Nginx
Phpinfo See if OpenSSL is installed successfully
This article is from the "small white Plus small white" blog, please be sure to keep this source http://bxtser.blog.51cto.com/9259025/1671988
Linux install OpenSSL extension under PHP