{"id":447,"date":"2023-02-25T13:10:58","date_gmt":"2023-02-25T05:10:58","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=447"},"modified":"2023-04-29T21:01:58","modified_gmt":"2023-04-29T13:01:58","slug":"install-openssl-with-source-under-centos","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/02\/25\/install-openssl-with-source-under-centos\/","title":{"rendered":"CentOS\u4e0b\u6e90\u7801\u5b89\u88c5OpenSSL"},"content":{"rendered":"<h2>\u67e5\u770bopenssl\u5f53\u524d\u7248\u672c<\/h2>\n<pre><code># rpm -qa | grep openssl\nopenssl-libs-1.0.2k-16.el7.x86_64\nopenssl-1.0.2k-16.el7.x86_64\nopenssl-devel-1.0.2k-16.el7.x86_64<\/code><\/pre>\n<p><!-- more --><\/p>\n<h2>\u6e90\u7801\u5b89\u88c5openssl-1.1.1<\/h2>\n<p>OpenSSL\u6700\u65b0\u7684\u7a33\u5b9a\u7248\u672c\u662f1.1.1\u7cfb\u5217\u3002\u4e5f\u662f\u957f\u671f\u652f\u6301\uff08LTS\uff09\u7248\u672c\uff0c\u652f\u6301\u52302023\u5e749\u670811\u65e5\u3002\u6211\u4eec\u4e4b\u524d\u7684LTS\u7248\u672c\uff081.0.2\u7cfb\u5217\uff09\u5c06\u7ee7\u7eed\u652f\u6301\u52302019\u5e7412\u670831\u65e5\uff08\u5b89\u5168\u4fee\u590d\u4ec5\u5728\u652f\u6301\u7684\u6700\u540e\u4e00\u5e74\uff09\u30021.1.0\u7cfb\u5217\u76ee\u524d\u4ec5\u63a5\u6536\u5b89\u5168\u4fee\u590d\u7a0b\u5e8f\uff0c\u5e76\u5c06\u4e8e2019\u5e749\u670811\u65e5\u505c\u6b62\u652f\u6301\u3002\u9f13\u52b11.0.2\u548c1.1.0\u7684\u6240\u6709\u7528\u6237\u5c3d\u5feb\u5347\u7ea7\u52301.1.1\u30020.9.8,1.0.0\u548c1.0.1\u7248\u672c\u73b0\u5728\u4e0d\u518d\u652f\u6301\uff0c\u4e0d\u5e94\u4f7f\u7528\u3002<\/p>\n<pre><code># wget https:\/\/www.openssl.org\/source\/openssl-1.1.1d.tar.gz\n# tar -zxf openssl-1.1.1d.tar.gz \n# cd openssl-1.1.1d\n# .\/config --prefix=\/usr\/local\/openssl --openssldir=\/usr\/local\/openssl shared\n# make depend\n# make &amp;&amp; make install\n# ln -s \/usr\/local\/openssl\/bin\/openssl \/usr\/local\/bin\/openssl\n# ln -s \/usr\/local\/openssl\/lib\/libssl.so.1.1 \/usr\/lib64\/\n# ln -s \/usr\/local\/openssl\/lib\/libcrypto.so.1.1 \/usr\/lib64\/\n# openssl version\nOpenSSL 1.1.1d  10 Sep 2019<\/code><\/pre>\n<ul>\n<li><code>\u2013prefix<\/code>\uff1a\u6307\u5b9a\u5b89\u88c5\u76ee\u5f55<\/li>\n<li><code>\u2013openssldir<\/code>\uff1a\u6307\u5b9aopenssl\u914d\u7f6e\u6587\u4ef6\u8def\u5f84<\/li>\n<li><code>\u2013shared<\/code>\uff1a\u521b\u5efa\u52a8\u6001\u94fe\u63a5\u5e93<\/li>\n<\/ul>\n<pre><code>echo &quot;\/usr\/local\/openssl\/lib&quot; &gt;&gt; \/etc\/ld.so.conf\nldconfig<\/code><\/pre>\n<blockquote>\n<p>\u82e5\u7f16\u8bd1Nginx\uff0c<code>\u2013with-openssl=\/usr\/local\/openssl<\/code>\u5373\u53ef<\/p>\n<\/blockquote>\n<p>\u81f3\u4e8e\u4e3a\u4ec0\u4e48\u4e0d\u9700\u5378\u8f7drpm\u5305\u5b89\u88c5\u7684<code>openssl-1.0.2<\/code>\uff0c\u800c\u76f4\u63a5\u5b89\u88c5<code>openssl-1.1.1<\/code>\u7684\u539f\u56e0\u5982\u4e0b:<\/p>\n<pre><code># which openssl         #rpm\u5305\u6240\u5b89\u88c5\u7684openssl\uff0c\u5176\u4e8c\u8fdb\u5236\u6587\u4ef6\u4f4d\u7f6e\n\/usr\/bin\/openssl\n# echo $PATH            #PATH\u73af\u5883\u53d8\u91cf\u52a0\u8f7d\u8def\u5f84\u987a\u5e8f\uff0c\/usr\/local\/bin\u67e5\u8be2\u5728\u524d\n\/usr\/local\/sbin:\/usr\/local\/bin:\/usr\/sbin:\/usr\/bin:\/root\/bin<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u67e5\u770bopenssl\u5f53\u524d\u7248\u672c # rpm -qa | grep openssl openssl-libs-1.0 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[146],"class_list":["post-447","post","type-post","status-publish","format-standard","hentry","category-devops-base","tag-openssl"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/447","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=447"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/447\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=447"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=447"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=447"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}