{"id":10132,"date":"2023-04-16T10:40:52","date_gmt":"2023-04-16T01:40:52","guid":{"rendered":"https:\/\/lab4ict.com\/system\/?p=10132"},"modified":"2023-04-16T11:28:22","modified_gmt":"2023-04-16T02:28:22","slug":"mongodb%e3%82%92%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab%e3%81%99%e3%82%8b%ef%bc%81","status":"publish","type":"post","link":"https:\/\/lab4ict.com\/system\/archives\/10132","title":{"rendered":"MongoDB 6.0\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\uff01\uff08Rocky Linux 9\uff09"},"content":{"rendered":"<p>MongoDB 6.0\u3092Rocky Linux 9\u306b\u30a4\u30f3\u30b9\u30c8\u30eb\u3057\u307e\u3059\u3002<br \/>\n<!--more--><\/p>\n<h2>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u74b0\u5883\u3092\u78ba\u8a8d\u3059\u308b\uff01<\/h2>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u524d\u306b\u74b0\u5883\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n# hostnamectl\r\n Static hostname: vmsddb71\r\n       Icon name: computer-vm\r\n         Chassis: vm\r\n      Machine ID: c5cfb03d2529409da1a18560f71e844a\r\n         Boot ID: e21f5a827a8f46c58129862560bb2f59\r\n  Virtualization: oracle\r\nOperating System: Rocky Linux 9.1 (Blue Onyx)      \r\n     CPE OS Name: cpe:\/o:rocky:rocky:9::baseos\r\n          Kernel: Linux 5.14.0-162.6.1.el9_1.x86_64\r\n    Architecture: x86-64\r\n Hardware Vendor: innotek GmbH\r\n  Hardware Model: VirtualBox\r\n<\/pre>\n<h2>\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u60c5\u5831\u3092\u8a2d\u5b9a\u3059\u308b\uff01<\/h2>\n<p>MongoDB\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u60c5\u5831\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n# cat &lt;&lt;EOF | tee \/etc\/yum.repos.d\/mongodb-org-6.0.repo\r\n&#x5B;mongodb-org-6.0]\r\nname=MongoDB Repository\r\nbaseurl=https:\/\/repo.mongodb.org\/yum\/redhat\/9\/mongodb-org\/6.0\/x86_64\/\r\ngpgcheck=1\r\nenabled=1\r\ngpgkey=https:\/\/www.mongodb.org\/static\/pgp\/server-6.0.asc\r\nEOF\r\n&#x5B;mongodb-org-6.0]\r\nname=MongoDB Repository\r\nbaseurl=https:\/\/repo.mongodb.org\/yum\/redhat\/9\/mongodb-org\/6.0\/x86_64\/\r\ngpgcheck=1\r\nenabled=1\r\ngpgkey=https:\/\/www.mongodb.org\/static\/pgp\/server-6.0.asc\r\n<\/pre>\n<h2>MongoDB\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\uff01<\/h2>\n<p>MongoDB\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n# yum install -y mongodb-org\r\n<\/pre>\n<p>\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u6307\u5b9a\u3057\u305f\u3044\u5834\u5408\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n# yum install -y mongodb-org-6.0.4 mongodb-org-database-6.0.4 mongodb-org-server-6.0.4 mongodb-org-mongos-6.0.4 mongodb-org-tools-6.0.4\r\n<\/pre>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u56fa\u5b9a\u3059\u308b\u5834\u5408\u306f\u3001\u300c\/etc\/yum.conf\u300d\u306b\u4ee5\u4e0b\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\nexclude=mongodb-org,mongodb-org-database,mongodb-org-server,mongodb-mongosh,mongodb-org-mongos,mongodb-org-tools\r\n<\/pre>\n<h2>\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30d1\u30b9\u3092\u78ba\u8a8d\u3059\u308b\uff01<\/h2>\n<p>\u30c7\u30fc\u30bf\u3068\u30ed\u30b0\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306f\u4ee5\u4e0b\u306b\u306a\u308a\u307e\u3059\u3002\u5909\u66f4\u3059\u308b\u5834\u5408\u306f\u3001\u300c\/etc\/mongod.conf\u300d\u3092\u4fee\u6b63\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n    \/var\/lib\/mongo (\u30c7\u30fc\u30bf\u30c7\u30a3\u30ec\u30af\u30c8\u30ea)\r\n    \/var\/log\/mongodb (\u30ed\u30b0\u30c7\u30a3\u30ec\u30af\u30c8\u30ea)\r\n<\/pre>\n<h2>MongoDB\u306e\u8d77\u52d5\u306e\u8a2d\u5b9a\u3092\u884c\u3046\uff01<\/h2>\n<p>MongoDB\u3092\u81ea\u52d5\u8d77\u52d5\u3059\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3057\u3001MongoDB\u3092\u8d77\u52d5\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n# systemctl enable --now mongod\r\n# systemctl status mongod\r\n\u25cf mongod.service - MongoDB Database Server\r\n     Loaded: loaded (\/usr\/lib\/systemd\/system\/mongod.service; enabled; vendor preset: disabled)\r\n     Active: active (running) since Sun 2023-04-16 10:37:49 JST; 2s ago\r\n       Docs: https:\/\/docs.mongodb.org\/manual\r\n   Main PID: 36714 (mongod)\r\n     Memory: 68.6M\r\n        CPU: 589ms\r\n     CGroup: \/system.slice\/mongod.service\r\n             \u2514\u250036714 \/usr\/bin\/mongod -f \/etc\/mongod.conf\r\n...\r\n<\/pre>\n<h2>MongoDB\u306b\u63a5\u7d9a\u3059\u308b\uff01<\/h2>\n<p>MongoDB\u306e\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3092\u4f7f\u7528\u3057\u3066\u3001MongoDB\u306b\u63a5\u7d9a\u3067\u304d\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n# mongosh\r\nCurrent Mongosh Log ID:\t643b5c8a43c65f5bfa4669e1\r\nConnecting to:\t\tmongodb:\/\/127.0.0.1:27017\/?directConnection=true&amp;serverSelectionTimeoutMS=2000&amp;appName=mongosh+1.8.0\r\nUsing MongoDB:\t\t6.0.5\r\nUsing Mongosh:\t\t1.8.0\r\n...\r\ntest&gt; quit\r\n#\r\n<\/pre>\n<h2>\u304a\u308f\u308a\u306b<\/h2>\n<p>MongoDB\u3092Rocky Linux 9\u306bMongoDB\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3057\u305f\u3002<\/p>\n<h2>\u53c2\u8003\u60c5\u5831<\/h2>\n<ul>\n<li><a href=\"https:\/\/www.mongodb.com\/docs\/\" target=\"_blank\" rel=\"noopener\">MongoDB - Documentation<\/a><\/li>\n<li><a href=\"https:\/\/www.mongodb.com\/docs\/manual\/\" target=\"_blank\" rel=\"noopener\">MongoDB Server - Manual<\/a><\/li>\n<\/ul>\n<h2>\u95a2\u9023\u8a18\u4e8b<\/h2>\n<div class=\"sc_getpost\"><a class=\"clearfix\" href=\"https:\/\/lab4ict.com\/system\/archives\/9850\" ><div class=\"sc_getpost_thumb post-box-thumbnail__wrap\"><img decoding=\"async\" src=\"data:image\/gif;base64,R0lGODdhAQABAPAAAN3d3QAAACwAAAAAAQABAAACAkQBADs=\" width=\"150\" height=\"150\" alt=\"\u3010\u8a18\u4e8b\u4e00\u89a7\u3011MongoDB\u3092\u4f7f\u3044\u3053\u306a\u3059\uff01\" loading=\"lazy\" data-src=\"https:\/\/lab4ict.com\/system\/wp-content\/uploads\/2018\/09\/eyecatch_mongodb_01-150x150.png\" class=\"lazyload\"><\/div><div class=\"title\">\u3010\u8a18\u4e8b\u4e00\u89a7\u3011MongoDB\u3092\u4f7f\u3044\u3053\u306a\u3059\uff01<\/div><div class=\"substr\">MongoDB\u3092\u4f7f\u3044\u3053\u306a\u3059\u305f\u3081\u306e\u8a18\u4e8b\u4e00\u89a7\u3092\u63b2\u8f09\u3057\u307e\u3059\u3002...<\/div><\/a><\/div>\n<h2>\u53c2\u8003\u66f8\u7c4d\uff08Amazon\uff09<\/h2>\n<p><iframe sandbox=\"allow-popups allow-scripts allow-modals allow-forms allow-same-origin\" style=\"width:120px;height:240px;\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" frameborder=\"0\" src=\"\/\/rcm-fe.amazon-adsystem.com\/e\/cm?lt1=_blank&bc1=000000&IS2=1&bg1=FFFFFF&fc1=000000&lc1=0000FF&t=infotecr-22&language=ja_JP&o=9&p=8&l=as4&m=amazon&f=ifr&ref=as_ss_li_til&asins=B07BGC4MJ1&linkId=0d0d3ef2181b83931f80739f4cfceb0e\"><\/iframe><\/p>\n<hr \/>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>MongoDB 6.0\u3092Rocky Linux 9\u306b\u30a4\u30f3\u30b9\u30c8\u30eb\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"author":1,"featured_media":9875,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[117],"tags":[],"class_list":["post-10132","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mongodb"],"_links":{"self":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/10132","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/comments?post=10132"}],"version-history":[{"count":17,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/10132\/revisions"}],"predecessor-version":[{"id":10164,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/10132\/revisions\/10164"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/media\/9875"}],"wp:attachment":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/media?parent=10132"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/categories?post=10132"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/tags?post=10132"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}