{"id":175,"date":"2018-05-24T21:39:10","date_gmt":"2018-05-24T12:39:10","guid":{"rendered":"https:\/\/0x0c.info\/?p=175"},"modified":"2018-05-24T21:39:10","modified_gmt":"2018-05-24T12:39:10","slug":"%e3%80%90centos7%e3%80%91-mongodb%e3%82%922-6%e3%81%8b%e3%82%893%e7%b3%bb%e3%81%ab%e3%82%a2%e3%83%83%e3%83%97%e3%83%87%e3%83%bc%e3%83%88%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/0x0c.info\/?p=175","title":{"rendered":"\u3010CentOS7\u3011 MongoDB\u30922.6\u304b\u30893\u7cfb\u306b\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3059\u308b"},"content":{"rendered":"<p>\t\t\t\t\u3044\u308d\u3044\u308d\u3068\u9762\u5012\u306a\u3053\u3068\u306f\u305b\u305a\u3001\u30b5\u30af\u30c3\u3068\u30c0\u30f3\u30d7&amp;\u30ea\u30b9\u30c8\u30a2\u3067\u3084\u3063\u3064\u3051\u307e\u3059\u3002<\/p>\n<h2>\u30d0\u30c3\u30af\u30a2\u30c3\u30d7&amp;\u53e4\u3044\u306e\u524a\u9664<\/h2>\n<pre><code>service mongod stop\nmkdir mddump\nmongodump --dbpath \/var\/lib\/mongo .\/mddump\nmkdir mdbackup\nmv \/var\/lib\/mongo .\/mdbackup\/\nyum remove mongo*     \n<\/code><\/pre>\n<h2>3.2\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n<p><code>vi \/etc\/yum.repos.d\/mongodb-org-3.2.repo<\/code> \u3068\u3057\u3001\u5185\u5bb9\u3092<\/p>\n<pre><code>[mongodb-org-3.2]\nname=MongoDB Repository\nbaseurl=https:\/\/repo.mongodb.org\/yum\/redhat\/$releasever\/mongodb-org\/3.2\/x86_64\/\ngpgcheck=1\nenabled=1\ngpgkey=https:\/\/www.mongodb.org\/static\/pgp\/server-3.2.asc\n<\/code><\/pre>\n<p>\u3068\u3057\u307e\u3059\u3002<br \/>\n\u3082\u3063\u3068\u65b0\u3057\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u3057\u305f\u3044\u65b9\u306f  https:\/\/docs.mongodb.com\/manual\/tutorial\/install-mongodb-on-red-hat\/  \u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><code>yum install mongodb-org mongodb-org-server<\/code> \u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<p><code>vi \/etc\/mongod.conf<\/code> \u3068\u3057\u300117\u884c\u76ee\u306e\u30b3\u30e1\u30f3\u30c8\u3092\u5916\u3057\u305f\u4e0a\u3067<\/p>\n<pre><code>engine: wiredTiger\n<\/code><\/pre>\n<p>\u3068\u3057\u307e\u3059\u3002engine\u3068\u3044\u3046\u6587\u5b57\u5217\u306e\u524d\u306b\u884c\u982d\u304b\u3089\u534a\u89d2\u7a7a\u767d\u304c\u4e8c\u500b\u5165\u3063\u3066\u3044\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002\u30b3\u30ed\u30f3\u306e\u5f8c\u308d\u306e\u30b9\u30da\u30fc\u30b9\u3082\u5fc5\u8981\u3067\u3059\u3002<\/p>\n<h2>\u30ea\u30b9\u30c8\u30a2<\/h2>\n<pre><code>service mongod start\nmongorestore .\/mddump\n<\/code><\/pre>\n<p>\u4ee5\u4e0a\uff5e\t\t<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3044\u308d\u3044\u308d\u3068\u9762\u5012\u306a\u3053\u3068\u306f\u305b\u305a\u3001\u30b5\u30af\u30c3\u3068\u30c0\u30f3\u30d7&amp;\u30ea\u30b9\u30c8\u30a2\u3067\u3084\u3063\u3064\u3051\u307e\u3059\u3002 \u30d0\u30c3\u30af\u30a2\u30c3\u30d7&amp;\u53e4\u3044\u306e\u524a\u9664 service mongod stop mkdir mddump mongodump &#8211;dbpath \/var\/lib\/mongo .\/mddump mkdir mdbackup mv \/var\/lib\/mongo .\/mdbackup\/ yum remove mongo* 3.2\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb vi \/etc\/yum.repos.d\/mongodb-org-3.2.repo \u3068\u3057\u3001\u5185\u5bb9\u3092 [mongodb-org-3.2] name=MongoDB Repository baseurl=https:\/\/repo.mongodb.org\/yum\/redhat\/$releasever\/mongodb-org\/3.2\/x86_64\/ gpgcheck=1 enabled=1 gpgkey=https:\/\/www.mongodb.org\/static\/pgp\/server-3.2.asc \u3068\u3057\u307e\u3059\u3002 \u3082\u3063\u3068\u65b0\u3057\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u3057\u305f\u3044\u65b9\u306f https:\/\/docs.mongodb.com\/manual\/tutorial\/install-mongodb-on-red-hat\/ \u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\u3002 yum install mongodb-org mongodb-org-server \u3092\u5b9f\u884c\u3057\u307e\u3059\u3002 vi \/etc\/mongod.conf \u3068\u3057\u300117\u884c\u76ee\u306e\u30b3\u30e1\u30f3\u30c8\u3092\u5916\u3057\u305f\u4e0a\u3067 engine: wiredTiger \u3068\u3057\u307e\u3059\u3002engine\u3068\u3044\u3046\u6587\u5b57\u5217\u306e\u524d\u306b\u884c\u982d\u304b\u3089\u534a\u89d2\u7a7a\u767d\u304c\u4e8c\u500b\u5165\u3063\u3066\u3044\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002\u30b3\u30ed\u30f3\u306e\u5f8c\u308d\u306e\u30b9\u30da\u30fc\u30b9\u3082\u5fc5\u8981\u3067\u3059\u3002 \u30ea\u30b9\u30c8\u30a2 service mongod start mongorestore .\/mddump \u4ee5\u4e0a\uff5e<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[21,52],"class_list":["post-175","post","type-post","status-publish","format-standard","hentry","category-linux","tag-centos7","tag-mongodb"],"_links":{"self":[{"href":"https:\/\/0x0c.info\/index.php?rest_route=\/wp\/v2\/posts\/175","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/0x0c.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/0x0c.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/0x0c.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/0x0c.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=175"}],"version-history":[{"count":0,"href":"https:\/\/0x0c.info\/index.php?rest_route=\/wp\/v2\/posts\/175\/revisions"}],"wp:attachment":[{"href":"https:\/\/0x0c.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=175"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/0x0c.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=175"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/0x0c.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=175"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}