OpenSSL upgrade and PHP plus extension templates OpenSSL

Source: Internet
Author: User
Tags openssl library openssl version

Upgrade the OpenSSL version to version 1.0.2l for example

Here's how:

1. Download the latest version of the OpenSSL source package

wget ftp://ftp.openssl.org/source/openssl-1.0.2l.tar.gz

https://www.openssl.org/source/



2. Installing OpenSSL



1) TAR–XZVF openssl-1.0.2l.tar.gz


2) CD openssl-1.0.2l


3)./config shared zlib--prefix=/usr/local/ssl


4) Make


5) make Install


6) Mv/usr/bin/openssl/usr/bin/openssl.bak


7) Mv/usr/include/openssl/usr/include/openssl.bak (1.0.21 version does not have this file in the installation of the most


New 1.1.0f When there is this file, it is necessary to do this step)


8) Ln–s/usr/local/ssl/bin/openssl/usr/bin/openssl


9) Ln–s/usr/local/ssl/include/openssl/usr/include/openssl


Configure the library file search path


echo "/usr/local/ssl/lib" >>/etc/ld.so.conf



3. Upgrade complete

See if the OpenSSL version is 1.1.0f again


OpenSSL version



4. There is also a need to restart other OpenSSL-related services.

(Available through Lsof | grep Libssl | awk ' {print '} ' | Sort | Uniq view services related to OpenSSL library)



Service PHP-FPM Restart



5. PHP Plus expansion module OpenSSL


1) cd/opt/php-5.3.26/ext/openssl/


2) CP Config0.m4 CONFIG.M4


3)/usr/local/php/bin/phpize


4)./configure--with-openssl--with-php-config=/usr/local/php/bin/php-config


5) Make


6) make Install


7) When the installation is complete, a directory of. so files (openssl.so) is returned. Copy the openssl.so file to you in this directory


Under Extension_dir specified in PHP.ini (Find in php.ini file: Extension_dir =), I mean


The directory is/usr/local/php

First CD to return a directory for a. so file (openssl.so)


CP openssl.so/usr/local/php/


8) Edit the php.ini file


Vi/usr/local/php/php.ini

Added at the end of the file


Extension=openssl.so


9) plus PHP test page


Write a test page in your nginx or Apache site Directory


Vim test.php


<?php

Phpinfo ();

?>


9) Restart Nginx and PHP-FTM services

/usr/local/nginx/sbin/nginx-s Reload

Service PHP-FPM Restart



10) in the browser input/HTTP/server ip/test.php, you can see the status of the OpenSSL support is enabled





OpenSSL upgrade and PHP plus extension templates OpenSSL

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.