{"id":102,"date":"2023-06-05T13:10:36","date_gmt":"2023-06-05T05:10:36","guid":{"rendered":"http:\/\/pro369.com\/linux\/?p=102"},"modified":"2019-05-21T09:02:56","modified_gmt":"2019-05-21T09:02:56","slug":"%e7%82%baphp%e6%8f%90%e4%be%9bssh2%e7%9a%84%e6%94%af%e6%8f%b4","status":"publish","type":"post","link":"https:\/\/por.tw\/linux\/%e7%82%baphp%e6%8f%90%e4%be%9bssh2%e7%9a%84%e6%94%af%e6%8f%b4\/","title":{"rendered":"\u70baphp\u63d0\u4f9bssh2\u7684\u652f\u63f4"},"content":{"rendered":"<p><strong>\u70baphp\u63d0\u4f9bssh2\u7684\u652f\u63f4<\/p>\n<p> \u7528\u4f86\u5728php\u7a0b\u5f0f\u88e1\u65b9\u4fbf\u7684\u9023\u5230\u9060\u7aef\u4e3b\u6a5f<\/p>\n<p> \u57f7\u884c\u7a0b\u5f0f<\/p>\n<p> \u4e26\u53d6\u56de\u7d50\u679c<br \/> <\/strong><br \/> <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/visdacom.com\/linux\/wp-content\/uploads\/2013\/04\/3999776086.jpg\"  width=\"291\" height=\"173\" \/><strong><\/p>\n<p> \u9996\u5148\uff0c\u7cfb\u7d71\u9700\u8981\u5df2\u7d93\u88dd\u6709openssl\u548copenssl-devel\u5305<\/p>\n<p> rpm -qa | grep openssl<\/p>\n<p> \u7136\u5f8c\uff0c\u5b89\u88ddlibssh2<\/p>\n<p> \u7576\u4e0b\u4f86\u539f\u59cb\u78bc\u5f8c<\/p>\n<p> .\/configure &amp;&amp; make all install<\/p>\n<p> \u518d\u7136\u5f8c\uff0c\u5b89\u88ddPECL\/ssh2<\/p>\n<p> \u53ef\u4ee5\u7528\u6307\u4ee4pear install ssh2 (\u773c\u524d\u53ef\u80fd\u53ea\u80fd\u7528pear install ssh2-beta )<\/p>\n<p> \u6216\u662f\u662f\u53bbPECL\/ssh2 \u7576\u4e0b\u4f86\u539f\u59cb\u78bc<\/p>\n<p> \u7136\u5f8c<\/p>\n<p> phpize &amp;&amp; .\/configure &ndash;with-ssh2 &amp;&amp; make<\/p>\n<p> \u518d\u7136\u5f8c\u628a\u751f\u6210\u7684ssh2.so \u6a94\u6848\u8986\u5236\u5230php.ini \u4e2d\u7533\u660e\u7684extension_dir \u76ee\u9304\u4e0b\uff08\u9019\u88e1\u662f\/usr\/lib\/php4\uff09<\/p>\n<p> cp modules\/ssh2.so \/usr\/lib\/php4\/<\/p>\n<p> \u518d\u5728\/etc\/php.d\u76ee\u9304\u4e0b\u65b0\u589e\u4e00\u500b\u6a94\u6848ssh2.ini<\/p>\n<p> echo &quot;extension=ssh2.so&quot; &gt; \/etc\/php.d\/ssh2.ini<\/p>\n<p> \u518d\u91cd\u8d77web server\uff0c\u8b93\u5176\u91cd\u8b80php.ini<\/p>\n<p> \u641e\u5b9a<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u70baphp\u63d0\u4f9bssh2\u7684\u652f\u63f4 \u7528\u4f86\u5728php\u7a0b\u5f0f\u88e1\u65b9\u4fbf\u7684\u9023\u5230\u9060\u7aef\u4e3b\u6a5f \u57f7\u884c\u7a0b\u5f0f \u4e26\u53d6\u56de\u7d50\u679c \u9996\u5148\uff0c\u7cfb\u7d71\u9700\u8981\u5df2\u7d93\u88dd\u6709 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":531,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[20],"class_list":["post-102","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","tag-linux"],"_links":{"self":[{"href":"https:\/\/por.tw\/linux\/wp-json\/wp\/v2\/posts\/102"}],"collection":[{"href":"https:\/\/por.tw\/linux\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/por.tw\/linux\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/por.tw\/linux\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/por.tw\/linux\/wp-json\/wp\/v2\/comments?post=102"}],"version-history":[{"count":0,"href":"https:\/\/por.tw\/linux\/wp-json\/wp\/v2\/posts\/102\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/por.tw\/linux\/wp-json\/wp\/v2\/media\/531"}],"wp:attachment":[{"href":"https:\/\/por.tw\/linux\/wp-json\/wp\/v2\/media?parent=102"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/por.tw\/linux\/wp-json\/wp\/v2\/categories?post=102"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/por.tw\/linux\/wp-json\/wp\/v2\/tags?post=102"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}