自从昨天以来,我已经将OpenSSL-1.0.2h应用于我的Nginx服务器,我从源代码重新编译。 对于OpenSSL部分,我已经遵循了这个指南: https : //syslint.com/blog/tutorial/how-to-upgrade-openssl-on-centos-7-or-rhel-7/ 。 事后编译Nginx比较容易:
./configure --prefix=/etc/nginx ... --with-openssl=/usr/local/src/openssl-1.0.2h
$ openssl version OpenSSL 1.0.2h 3 May 2016 $ which openssl /usr/bin/openssl $ ls /usr/bin/openssl /usr/bin/openssl -> /usr/local/ssl/bin/openssl $ find / -name "openssl" ... /usr/include/openssl /usr/local/src/openssl-1.0.2h/apps/openssl /usr/local/src/openssl-1.0.2h/include/openssl /usr/local/src/openssl-1.0.2h/.openssl/include/openssl /usr/local/src/openssl-1.0.2h/.openssl/bin/openssl /usr/local/ssl/include/openssl /usr/local/ssl/bin/openssl ... $ nginx -V nginx version: nginx/1.11.1 built by gcc 4.8.5 20150623 (Red Hat 4.8.5-4) (GCC) built with OpenSSL 1.0.2h 3 May 2016 $ ssh -V OpenSSH_6.6.1p1, OpenSSL 1.0.1e-fips 11 Feb 2013 $ php -i ... OpenSSL support => enabled OpenSSL Library Version => OpenSSL 1.0.1e-fips 11 Feb 2013 OpenSSL Header Version => OpenSSL 1.0.1e-fips 11 Feb 2013 Native OpenSSL support => enabled ...
不幸的是,GooglingsearchPHP文档( http://php.net/manual/en/openssl.installation.php )并没有帮助我。 我考虑用最新的OpenSSL重新编译PHP,提供:
./configure -disable-shared ... --with-openssl=/usr/local/src/openssl-1.0.2h
然而这告诉我:
configure: error: Cannot find OpenSSL's libraries
任何帮助表示赞赏!
我想你应该安装openssl-devel( yum install openssl-devel
)。 然后你可以用最新的OpenSSL重新编译PHP。