php7 Installing openssl Extension Method
- 2021-09-12 00:43:15
- OfStack
1. My source code is the/home/topsec/Documents/php-7. 0.11, and the installation position is the/usr/local/php7, php.ini under the/usr/local/php7/lib. If there is no php. ini, the configuration file php. ini-development or php. ini-production in the source code needs to be renamed php. ini and placed under lib.
2. Enter the extension directory of openssl:/home/topsec/Documents/php-7. 0.11/ext/openssl
3. Run phpize
/usr/local/php7/bin/phpize
4. Perform the installation
./configure --with-openssl --with-php-config=/usr/local/php7/bin/php-config
make&&make install
5. In the process, libssl may not be found. Execute the following command and then re-execute 4. Execute the installation
yum install openssl
yum install openssl-devel
6. After the installation, you will be prompted to generate the. so file in a directory where I generated the/usr/local/php7/lib/php/extensions/no-debug-non-zts-20151012/
7. Open php. ini
vim /usr/local/php7/lib/php.ini
Add the following two sentences
extension_dir = "/usr/local/php7/lib/php/extensions/no-debug-non-zts-20151012/"
extension=openssl.so
8. Restart php.