{"id":10223,"date":"2023-04-19T05:30:48","date_gmt":"2023-04-18T20:30:48","guid":{"rendered":"https:\/\/lab4ict.com\/system\/?p=10223"},"modified":"2023-04-19T05:35:09","modified_gmt":"2023-04-18T20:35:09","slug":"mongodb-shell%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%ef%bc%88ubuntu-desktop-20-04%ef%bc%89","status":"publish","type":"post","link":"https:\/\/lab4ict.com\/system\/archives\/10223","title":{"rendered":"MongoDB Shell\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\uff01\uff08Ubuntu Desktop 20.04\uff09"},"content":{"rendered":"<p>Ubuntu Desktop 20.04\u306bMongoDB Shell\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<br \/>\n<!--more--><\/p>\n<h2>MongoDB\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u7ba1\u7406\u7528\u306e\u30ad\u30fc\u3092\u8ffd\u52a0\u3059\u308b\uff01<\/h2>\n<p>MongoDB\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u7ba1\u7406\u7528\u306e\u30ad\u30fc\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n$ wget -qO - https:\/\/www.mongodb.org\/static\/pgp\/server-5.0.asc | sudo apt-key add -\r\n<\/pre>\n<h2>MongoDB\u7528\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u7ba1\u7406\u7528\u306e\u30ea\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3059\u308b\uff01<\/h2>\n<p>MongoDB\u7528\u306e\u30ea\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n$ sudo echo &quot;deb &#x5B; arch=amd64,arm64 ] https:\/\/repo.mongodb.org\/apt\/ubuntu focal\/mongodb-org\/5.0 multiverse&quot; | sudo tee \/etc\/apt\/sources.list.d\/mongodb-org-5.0.list\r\n<\/pre>\n<h2>MongoDB\u7528\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u30ea\u30ed\u30fc\u30c9\u3059\u308b\uff01<\/h2>\n<p>MongoDB\u7528\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u30ea\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n$ sudo apt-get update\r\n<\/pre>\n<h2>mongosh\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\uff01<\/h2>\n<p>Ubuntu\u306e\u5834\u5408\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306bmongosh\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n$ sudo apt-get install -y mongodb-mongosh\r\n<\/pre>\n<h2>MongoDB\u306b\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u7d4c\u7531\u3067\u30a2\u30af\u30bb\u30b9\u3059\u308b\uff01<\/h2>\n<p>MongoDB\u306b\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u7d4c\u7531\u3067\u30a2\u30af\u30bb\u30b9\u3057\u307e\u3059\u3002\u30b5\u30fc\u30d0\u306eIP\u30a2\u30c9\u30ec\u30b9\u304c\u3001\u300c192.168.1.1\u300d\u306e\u5834\u5408\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30a2\u30af\u30bb\u30b9\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n$ mongosh &quot;mongodb:\/\/192.168.1.1:27017&quot;\r\n<\/pre>\n<h2>\u304a\u308f\u308a\u306b<\/h2>\n<p>Ubuntu Desktop 20.04\u304b\u3089\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u3067MongoDB\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u305f\u3081\u306b\u3001MongoDB Shell\u3092\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>Ubuntu Desktop 20.04\u306bMongoDB Shell\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\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-10223","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\/10223","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=10223"}],"version-history":[{"count":5,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/10223\/revisions"}],"predecessor-version":[{"id":10229,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/10223\/revisions\/10229"}],"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=10223"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/categories?post=10223"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/tags?post=10223"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}