{"id":13260,"date":"2023-11-16T14:24:06","date_gmt":"2023-11-16T06:24:06","guid":{"rendered":"https:\/\/92it.top\/?p=13260"},"modified":"2023-11-16T14:24:06","modified_gmt":"2023-11-16T06:24:06","slug":"centos-7%e5%ae%89%e8%a3%85%e6%96%b0%e7%89%88%e6%9c%ac%e7%9a%84-openssl","status":"publish","type":"post","link":"https:\/\/92it.top\/?p=13260","title":{"rendered":"CentOS 7\u5b89\u88c5\u65b0\u7248\u672c\u7684 OpenSSL"},"content":{"rendered":"\n<p><strong>\u80cc\u666f<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>CentOS7\u81ea\u5e26OpenSSL\u7248\u672c\u8f83\u4f4e\uff0c\u5728\u7f16\u8bd1\u5b89\u88c5python\u8f83\u9ad8\u7248\u672c\u540e\uff0c\u4f7f\u7528pip\u4f1a\u62a5https\u76f8\u5173\u9519\u8bef\uff0c\u65e0\u6cd5\u5b89\u88c5\u7b2c\u4e09\u65b9\u5305\u3002\u800cCentOS7\u81ea\u5e26yum\u5e93\u4e2dOpenSSL\u7248\u672c\u592a\u4f4e\uff0c\u53ea\u80fd\u624b\u52a8\u7f16\u8bd1\u5b89\u88c51.1.1 \u3002Ubuntu18.04\u53ca\u4ee5\u4e0a\u8f83\u65b0\u7248\u672c\u5219\u81ea\u5e26OpenSSL1.1.1\u6216\u66f4\u9ad8\u7248\u672c\uff0c\u4e0d\u9700\u8981\u81ea\u5df1\u5b89\u88c5\u3002<\/p>\n\n\n\n<p><strong>\u5b89\u88c5<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>1\u3001\u5b98\u7f51\u4e0b\u8f7d<br>https:\/\/www.openssl.org\/source\/<br>\u73b0\u5728\u662f1.1.1u\u7248\uff0c\u4e0b\u8f7dopenssl-1.1.1u.tar.gz\u6587\u4ef6\uff0c\u5e76\u4e0a\u4f20\u5230CentOS7\u670d\u52a1\u5668\u4e2d<\/p>\n\n\n\n<p>2\u3001\u5378\u8f7d\u8001\u7248\u672c<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$> sudo yum remove openssl<\/pre>\n\n\n\n<p>3\u3001\u5b89\u88c5gcc\u548cperl<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$> sudo yum install gcc-c++\n$> sudo yum install perl-core  #\u4f1a\u5b89\u88c5perl\u3001perl-CPAN\u7b49\uff0cmake test\u7684\u65f6\u5019\u9700\u8981<\/pre>\n\n\n\n<p>4\u3001\u89e3\u538b\u6e90\u4ee3\u7801\u5305\uff1a\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u89e3\u538b\u4e0b\u8f7d\u7684\u6e90\u4ee3\u7801\u5305\u3002\u5047\u8bbe\u60a8\u5df2\u7ecf\u4e0b\u8f7d\u5230\u4e86\u540d\u4e3a <code>openssl-x.x.x.tar.gz<\/code> \u7684\u6587\u4ef6\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">tar -xf openssl-x.x.x.tar.gz<\/pre>\n\n\n\n<p>5\u3001\u8fdb\u5165\u6e90\u4ee3\u7801\u76ee\u5f55\uff1a\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u5165\u89e3\u538b\u540e\u7684\u6e90\u4ee3\u7801\u76ee\u5f55\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">cd openssl-x.x.x<\/pre>\n\n\n\n<p>6\u3001\u914d\u7f6e\u7f16\u8bd1\u9009\u9879\uff1a\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u914d\u7f6e OpenSSL \u7684\u7f16\u8bd1\u9009\u9879\u3002\u60a8\u53ef\u4ee5\u6839\u636e\u9700\u8981\u8fdb\u884c\u9002\u5f53\u7684\u8c03\u6574\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">.\/config --prefix=\/usr\/local\/openssl --openssldir=\/usr\/local\/openssl<\/pre>\n\n\n\n<p>7\u3001\u7f16\u8bd1\u5e76\u5b89\u88c5\uff1a\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u7f16\u8bd1\u548c\u5b89\u88c5\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">make &amp;&amp; make install<\/pre>\n\n\n\n<p>8\u3001\u521b\u5efa\u8f6f\u8fde\u63a5\u5e76\u52a0\u5165\u8def\u5f84<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ln -s \/usr\/local\/openssl\/bin\/openssl \/usr\/bin\/openssl\nln -s \/usr\/local\/openssl\/include\/openssl \/usr\/include\/openssl\nln -s \/usr\/local\/openssl\/lib\/libssl.so \/usr\/lib64\/libssl.so\necho \"\/usr\/local\/openssl\/lib\" >> \/etc\/ld.so.conf\nldconfig -v \r<\/pre>\n\n\n\n<p>9\u3001\u5b89\u88c5\u5b8c\u6210\u67e5\u770b\u7248\u672c<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">openssl version<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u80cc\u666f CentOS7\u81ea\u5e26OpenSSL\u7248\u672c\u8f83\u4f4e\uff0c\u5728\u7f16\u8bd1\u5b89\u88c5python\u8f83\u9ad8\u7248\u672c\u540e\uff0c\u4f7f\u7528pip\u4f1a\u62a5https\u76f8\u5173 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[],"_links":{"self":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/13260"}],"collection":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=13260"}],"version-history":[{"count":1,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/13260\/revisions"}],"predecessor-version":[{"id":13261,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/13260\/revisions\/13261"}],"wp:attachment":[{"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=13260"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=13260"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=13260"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}