<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[沧海一粟]]></title> 
<link>http://www.dzhope.com/index.php</link> 
<description><![CDATA[Web系统架构与服务器运维,php开发]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[沧海一粟]]></copyright>
<item>
<link>http://www.dzhope.com/post//</link>
<title><![CDATA[centos系统中php Curl 无法访问https ，更换ssl_version NSS为openssl]]></title> 
<author>jed &lt;jed521@163.com&gt;</author>
<category><![CDATA[服务器技术]]></category>
<pubDate>Sat, 30 Sep 2017 06:23:24 +0000</pubDate> 
<guid>http://www.dzhope.com/post//</guid> 
<description>
<![CDATA[ 
	在centos 6上面,curl模块的ssl 支持默认为NSS，涉及到的程序里有https，是需要双向认证的，这时使用NSS会报错,所以需要更换为openssl.<br/><br/>一、查看系统自带的curl的版本<br/><div class="code"><br/>&#91;root@localhost local&#93;# curl -V<br/>curl 7.19.7<br/></div><br/>二、得到curl当前版本是7.19.7，我们去官方下载<a href="http://curl.haxx.se/download/archeology/" target="_blank">http://curl.haxx.se/download/archeology/</a> 同样版本,然后解压、编译。<br/><div class="code"><br/>wget http://curl.haxx.se/download/archeology/curl-7.19.7.tar.gz<br/>tar -zxf curl-7.19.7.tar.gz<br/>cd curl-7.19.7<br/>./configure --without-nss --with-ssl<br/>make &amp;&amp; make install<br/></div><br/>#–without-nss 禁用nss, –with-ssl启用openssl的支持.<br/><br/>三、将curl的库载入动态共享文件,并重新加载<br/><div class="code"><br/>echo &quot;/usr/local/lib&quot; &gt;&gt; /etc/ld.so.conf <br/>ldconfig<br/></div><br/>四、查看新安装后curl的版本<br/><div class="code"><br/>&#91;root@localhost local&#93;# curl -V<br/>curl 7.19.7 (x86_64-unknown-linux-gnu) libcurl/7.19.7 OpenSSL/1.0.1e zlib/1.2.3 libidn/1.18<br/>Protocols: tftp ftp telnet dict http file https ftps <br/>Features: IDN IPv6 Largefile NTLM SSL libz <br/></div><br/>五、重启你的httpd/nginx服务和php服务器<br/><div class="code"><br/>service nginx restart #或service httpd restart<br/>service php-fpm restart<br/></div><br/><br/>参考：<br/><a href="https://segmentfault.com/q/1010000005596871/a-1020000005610086" target="_blank">https://segmentfault.com/q/1010000005596871/a-1020000005610086</a><br/><a href="http://www.yiecho.com/391" target="_blank">http://www.yiecho.com/391</a>
]]>
</description>
</item><item>
<link>http://www.dzhope.com/post//#blogcomment</link>
<title><![CDATA[[评论] centos系统中php Curl 无法访问https ，更换ssl_version NSS为openssl]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.dzhope.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>