{"id":54,"date":"2019-10-25T10:06:46","date_gmt":"2019-10-25T02:06:46","guid":{"rendered":"http:\/\/www.diminghaixin.com\/?p=54"},"modified":"2019-10-27T12:56:32","modified_gmt":"2019-10-27T04:56:32","slug":"php%e5%ae%89%e8%a3%85%e6%89%a9%e5%b1%95%e5%b9%b6%e4%bd%bf%e7%94%a8composer%e5%bc%95%e5%85%a5%e5%8c%85%ef%bc%88%e4%bb%a5mongodb%e4%b8%ba%e4%be%8b%ef%bc%89","status":"publish","type":"post","link":"https:\/\/www.biubiu.run\/?p=54","title":{"rendered":"php\u5b89\u88c5\u6269\u5c55\u5e76\u4f7f\u7528composer\u5f15\u5165\u5305\uff08\u4ee5mongodb\u4e3a\u4f8b\uff09"},"content":{"rendered":"<h4>\u5b89\u88c5\u6269\u5c55<\/h4>\n<p>\u9996\u5148\u5b89\u88c5pecl<\/p>\n<pre><code class=\"language-shell line-numbers\">\/\/php\u7248\u672c &gt; 7\nwget http:\/\/pear.php.net\/go-pear.phar\nphp go-pear.phar\n<\/code><\/pre>\n<p>\u5b89\u88c5\u6269\u5c55<\/p>\n<pre><code class=\"language-shell line-numbers\">pecl install mongodb\necho \"extension=mongodb.so\" &gt;&gt; `php --ini | grep \"Loaded Configuration\" | sed -e \"s|.*:\\s*||\"`\n<\/code><\/pre>\n<p>\u82e5\u9700\u8981\u5b89\u88c5\u6307\u5b9a\u7248\u672cmongodb\u6269\u5c55<\/p>\n<pre><code class=\"language-shell line-numbers\">pecl install mongodb-1.6.0\necho \"extension=mongodb.so\" &gt;&gt; `php --ini | grep \"Loaded Configuration\" | sed -e \"s|.*:\\s*||\"`\n<\/code><\/pre>\n<p>\u68c0\u67e5\u662f\u5426\u5b89\u88c5\u6210\u529f<\/p>\n<pre><code class=\"language-shell line-numbers\">php -m |grep mongodb\n<\/code><\/pre>\n<h4>\u4f7f\u7528composer \u5728\u9879\u76ee\u4e2d\u5f15\u5165 mongodb<\/h4>\n<p>\u5b89\u88c5composer<\/p>\n<pre><code class=\"language-shell line-numbers\">curl -sS https:\/\/getcomposer.org\/installer | php\nmv composer.phar \/usr\/local\/bin\/composer\n<\/code><\/pre>\n<blockquote><p>\n  \u6ce8\u610f\uff1a \u5982\u679c\u4e0a\u8ff0\u547d\u4ee4\u56e0\u4e3a\u6743\u9650\u6267\u884c\u5931\u8d25\uff0c \u8bf7\u4f7f\u7528 sudo \u518d\u6b21\u5c1d\u8bd5\u8fd0\u884c mv \u90a3\u884c\u547d\u4ee4\n<\/p><\/blockquote>\n<pre><code class=\"language-shell line-numbers\">composer require mongodb\/mongodb\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u5b89\u88c5\u6269\u5c55 \u9996\u5148\u5b89\u88c5pecl \/\/php\u7248\u672c &#038;gt [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"aside","meta":{"_mi_skip_tracking":false},"categories":[5],"tags":[7,8,6],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.biubiu.run\/index.php?rest_route=\/wp\/v2\/posts\/54"}],"collection":[{"href":"https:\/\/www.biubiu.run\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.biubiu.run\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.biubiu.run\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.biubiu.run\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=54"}],"version-history":[{"count":7,"href":"https:\/\/www.biubiu.run\/index.php?rest_route=\/wp\/v2\/posts\/54\/revisions"}],"predecessor-version":[{"id":61,"href":"https:\/\/www.biubiu.run\/index.php?rest_route=\/wp\/v2\/posts\/54\/revisions\/61"}],"wp:attachment":[{"href":"https:\/\/www.biubiu.run\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=54"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.biubiu.run\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=54"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.biubiu.run\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=54"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}