{"id":10153,"date":"2023-04-16T10:57:47","date_gmt":"2023-04-16T01:57:47","guid":{"rendered":"https:\/\/lab4ict.com\/system\/?p=10153"},"modified":"2023-04-19T05:40:52","modified_gmt":"2023-04-18T20:40:52","slug":"mongodb-6-0%e3%81%ab%e3%83%8d%e3%83%83%e3%83%88%e3%83%af%e3%83%bc%e3%82%af%e7%b5%8c%e7%94%b1%e3%81%a7%e3%82%a2%e3%82%af%e3%82%bb%e3%82%b9%e5%8f%af%e8%83%bd%e3%81%ab%e3%81%99%e3%82%8b%ef%bc%81%ef%bc%88","status":"publish","type":"post","link":"https:\/\/lab4ict.com\/system\/archives\/10153","title":{"rendered":"MongoDB 6.0\u306b\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u7d4c\u7531\u3067\u63a5\u7d9a\u53ef\u80fd\u306b\u3059\u308b\uff01\uff08Rocky Linux 9\uff09"},"content":{"rendered":"<p>Rocky Linux 9\u4e0a\u306eMongoDB 6.0\u306b\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u7d4c\u7531\u3067\u63a5\u7d9a\u53ef\u80fd\u306b\u3057\u307e\u3059\uff01<br \/>\n<!--more--><\/p>\n<h2>MongoDB\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u8a2d\u5b9a\u3092\u78ba\u8a8d\u3059\u308b\uff01<\/h2>\n<p>MongoDB\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u8a2d\u5b9a\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u3001127.0.0.1\u304b\u3089\u306e\u307f\u53ef\u80fd\u3067\u3001\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u7d4c\u7531\u304b\u3089\u306e\u63a5\u7d9a\u306f\u4e0d\u53ef\u306b\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1,5,6]; title: ; notranslate\" title=\"\">\r\n# ss -lnp4\r\nNetid   State    Recv-Q   Send-Q      Local Address:Port        Peer Address:Port   Process                             \r\nudp     UNCONN   0        0               127.0.0.1:323              0.0.0.0:*       users:((&quot;chronyd&quot;,pid=734,fd=5))   \r\ntcp     LISTEN   0        128               0.0.0.0:22               0.0.0.0:*       users:((&quot;sshd&quot;,pid=747,fd=3))      \r\ntcp     LISTEN   0        4096            127.0.0.1:27017            0.0.0.0:*       users:((&quot;mongod&quot;,pid=36714,fd=13)) \r\n# cat \/etc\/mongod.conf\r\n...\r\nnet:\r\n  port: 27017\r\n  bindIp: 127.0.0.1  # Enter 0.0.0.0,:: to bind to all IPv4 and IPv6 addresses or, alternatively, use the net.bindIpAll setting.\r\n<\/pre>\n<h2>\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u7d4c\u7531\u3067\u63a5\u7d9a\u53ef\u80fd\u306b\u8a2d\u5b9a\u3059\u308b\uff01<\/h2>\n<p>\u300cbindIp\u300d\u306e\u8a2d\u5b9a\u3092\u300c127.0.0.1\u300d\u304b\u3089\u300c0.0.0.0\u300d\u306b\u5909\u66f4\u3057\u307e\u3059\u3002\u30a2\u30af\u30bb\u30b9\u5143\u304c\u78ba\u5b9a\u3057\u3066\u3044\u308c\u3070\u3001\u30a2\u30af\u30bb\u30b9\u5143\u306eIP\u30a2\u30c9\u30ec\u30b9\u306e\u307f\u8a2d\u5b9a\u3057\u305f\u307b\u3046\u304c\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u304c\u5f37\u5316\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1,6,7,11]; title: ; notranslate\" title=\"\">\r\n# vi \/etc\/mongod.conf\r\n...\r\nnet:\r\n  port: 27017\r\n  bindIp: 0.0.0.0\r\n# systemctl restart mongod\r\n# ss -lnp4\r\nNetid   State    Recv-Q   Send-Q      Local Address:Port        Peer Address:Port   Process                             \r\nudp     UNCONN   0        0               127.0.0.1:323              0.0.0.0:*       users:((&quot;chronyd&quot;,pid=734,fd=5))   \r\ntcp     LISTEN   0        128               0.0.0.0:22               0.0.0.0:*       users:((&quot;sshd&quot;,pid=747,fd=3))      \r\ntcp     LISTEN   0        4096              0.0.0.0:27017            0.0.0.0:*       users:((&quot;mongod&quot;,pid=44101,fd=14)) \r\n<\/pre>\n<h2>Firewalld\u306e\u901a\u4fe1\u8a31\u53ef\u8a2d\u5b9a\u3092\u884c\u3046\uff01<\/h2>\n<p>Firewalld\u306e\u901a\u4fe1\u8a31\u53ef\u8a2d\u5b9a\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1,3,5]; title: ; notranslate\" title=\"\">\r\n# firewall-cmd --permanent --add-port=27017\/tcp\r\nsuccess\r\n# firewall-cmd --reload\r\nsuccess\r\n# firewall-cmd --list-all\r\npublic (active)\r\n  target: default\r\n  icmp-block-inversion: no\r\n  interfaces: enp0s3\r\n  sources: \r\n  services: cockpit dhcpv6-client ssh\r\n  ports: 27017\/tcp\r\n  protocols: \r\n  forward: yes\r\n  masquerade: no\r\n  forward-ports: \r\n  source-ports: \r\n  icmp-blocks: \r\n  rich rules: \r\n<\/pre>\n<h2>\u304a\u308f\u308a\u306b<\/h2>\n<p>MongoDB\u306b\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u63a5\u7d9a\u3059\u308b\u305f\u3081\u306b\u306f\u3001MongoDB\u306e\u63a5\u7d9a\u5143\u306e\u8a2d\u5b9a\u3092\u5909\u66f4\u3059\u308b\u5fc5\u8981\u304c\u3042\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>Rocky Linux 9\u4e0a\u306eMongoDB 6.0\u306b\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u7d4c\u7531\u3067\u63a5\u7d9a\u53ef\u80fd\u306b\u3057\u307e\u3059\uff01<\/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-10153","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\/10153","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=10153"}],"version-history":[{"count":10,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/10153\/revisions"}],"predecessor-version":[{"id":10234,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/10153\/revisions\/10234"}],"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=10153"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/categories?post=10153"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/tags?post=10153"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}