{"id":10167,"date":"2023-04-16T12:06:46","date_gmt":"2023-04-16T03:06:46","guid":{"rendered":"https:\/\/lab4ict.com\/system\/?p=10167"},"modified":"2023-04-17T21:16:42","modified_gmt":"2023-04-17T12:16:42","slug":"mongodb-shell%ef%bc%88mongosh%ef%bc%89%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-22-04%ef%bc%89","status":"publish","type":"post","link":"https:\/\/lab4ict.com\/system\/archives\/10167","title":{"rendered":"MongoDB Shell\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\uff01\uff08Ubuntu Desktop 22.04\uff09"},"content":{"rendered":"<p>Ubuntu Desktop 22.04\u306bMongoDB Shell\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<br \/>\n<!--more--><\/p>\n<h2>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308bOS\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u78ba\u8a8d\u3059\u308b\uff01<\/h2>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308bOS\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ hostnamectl | grep &quot;Operating System&quot;\r\nOperating System: Ubuntu 22.04.2 LTS\r\n<\/pre>\n<h2>\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u9375\u3092\u767b\u9332\u3059\u308b\uff01<\/h2>\n<p>\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u9375\u3092\u767b\u9332\u3092\u767b\u9332\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ wget -qO - https:\/\/www.mongodb.org\/static\/pgp\/server-6.0.asc | sudo apt-key add -\r\n<\/pre>\n<h2>\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u8a2d\u5b9a\u3092\u884c\u3046\uff01<\/h2>\n<p>\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u8a2d\u5b9a\u3092\u884c\u3044\u307e\u3059\u3002Ubuntu Desktop 22.04\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u304c\u300120.04\u7528\u306e\u8a2d\u5b9a\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ echo &quot;deb &#x5B; arch=amd64,arm64 ] https:\/\/repo.mongodb.org\/apt\/ubuntu focal\/mongodb-org\/6.0 multiverse&quot; | sudo tee \/etc\/apt\/sources.list.d\/mongodb-org-6.0.list\r\n<\/pre>\n<h2>\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u60c5\u5831\u3092\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3059\u308b\uff01<\/h2>\n<p>\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u60c5\u5831\u3092\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; 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>mongosh\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; 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\u63a5\u7d9a\u3059\u308b\uff01<\/h2>\n<p>MongoDB Shell\u3092\u4f7f\u7528\u3057\u3066\u3001\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u7d4c\u7531\u3067MongoDB\u306b\u63a5\u7d9a\u3057\u3066\u307f\u307e\u3059\u3002\u300cmongodb:\/\/\u300d\u306e\u5f8c\u306b\u306f\u3001\u63a5\u7d9a\u5148\u306e\u30b5\u30fc\u30d0\u540d\u3068\u30dd\u30fc\u30c8\u756a\u53f7\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ mongosh &quot;mongodb:\/\/vmsddb71:27017&quot;\r\nCurrent Mongosh Log ID:\t643b6800975a65d8a9a13455\r\nConnecting to:\t\tmongodb:\/\/vmsddb71:27017\/?directConnection=true&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>Ubuntu Desktop 22.04\u3078\u306emongosh\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u3001\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u542b\u3081\u306620.04\u3068\u540c\u3058\u624b\u9806\u306b\u306a\u308a\u307e\u3059\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 22.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":[74,217,51],"class_list":["post-10167","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mongodb","tag-mongodb","tag-mongosh","tag-ubuntu"],"_links":{"self":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/10167","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=10167"}],"version-history":[{"count":14,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/10167\/revisions"}],"predecessor-version":[{"id":10193,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/10167\/revisions\/10193"}],"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=10167"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/categories?post=10167"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/tags?post=10167"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}