一、安装openssl
cd /root
wget /source/openssl-3.0.
tar xvzf openssl-3.0.
cd openssl-3.0.8
./config
make
make install
解决 OpenSSL 1. and "Can't locate in @INC"
dnf install perl
openssl version -a 查看openssl版本
二、安装curl
cd /root
wget /download/curl-8.0.
tar -xvf curl-8.0.
cd curl-8.0.1
./configure --with-openssl
make
make install
查看版本
curl --version
显示curl 8.0.1表示安装成功
完成一二两步就可以在命令行输入,查看是否正常运行
curl
三、PHP安装openssl扩展
cd /root/php-7.3.0/ext/openssl
cp config0.m4 config.m4
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config --with-openssl
make V=s -j$(nproc) && make install
报错:‘RSA_SSLV23_PADDING’ undeclared (first use in this function); did you mean ‘RSA_NO_PADDING’?
cd /root
wget /source/openssl-1.1.
tar xvzf openssl-1.1.
cd openssl-1.1.1q
./config
make
make install解决 OpenSSL 1. and "Can't locate in @INC"
dnf install perl
生成了一个扩展文件
vi /usr/local/php/lib/
extension=/usr/local/php/lib/php/extensions/no-debug-non-zts-20180731/
四、PHP安装curl扩展
cd /root/php-7.3.0/ext/curl
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config --with-curl=/root/curl
报错:checking for cURL 7.15.5 or greater... configure: error: cURL version 7.15.5 or later is required to compile php with cURL support
解决报错:
/download/archeology/ 挑选一个curl的版本
/download/archeology/curl-7.20. 这边挑选了这个版本cd /root
wget /download/archeology/curl-7.20.
tar zxvf curl-7.20.
cd curl-7.20.0
./configure --with-ssl=/usr/local/ssl
make && make install
make && make install
生成了一个扩展文件
vi /usr/local/php/lib/
extension=/usr/local/php/lib/php/extensions/no-debug-non-zts-20180731/