Home>Article>Backend Development> How to install the openssl extension of php7 under centos7

How to install the openssl extension of php7 under centos7

醉折花枝作酒筹
醉折花枝作酒筹 forward
2021-06-24 09:26:41 1900browse

As one of the core extensions of the system, openssl implements encryption extensions for PHP data security by encrypting the content with private keys and decrypting the public keys with the same encryption method. Today we will learn how to install the openssl extension of php7 under centos7.

How to install the openssl extension of php7 under centos7

To run the laravel project on the new server today, you need to install the openssl extension. The following are the installation steps

1. First find the php extension The directory I have is under '/usr/local/php-7.1.5/ext'

How to install the openssl extension of php7 under centos7

2. Enter the openssl directory and modify a config0.m4 inside Execute the command for config.m4 as "mv config0.m4 config.m4"

3. Enter phpize '/usr/local/php/bin/phpize '

How to install the openssl extension of php7 under centos7

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

How to install the openssl extension of php7 under centos75.Compile After successful installation, you will be prompted to generate a .so file in a certain directory

make

sudo make install

How to install the openssl extension of php7 under centos7

##6. Configure php. ini, add extension

How to install the openssl extension of php7 under centos7

7. Restart the php service'/etc/init.d/php-fpm restart'

How to install the openssl extension of php7 under centos7

8. To check whether the installation is successful, search the openssl module in phpinfo

How to install the openssl extension of php7 under centos7

Recommended learning:

php video tutorial

The above is the detailed content of How to install the openssl extension of php7 under centos7. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete