{"id":29413,"date":"2024-02-20T09:26:47","date_gmt":"2022-11-26T21:43:27","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8rocky-linux%e4%b8%8a%e9%80%9a%e8%bf%87mongodb-6-0%e8%bf%9b%e8%a1%8c%e5%a4%8d%e5%88%b6%e3%80%82\/"},"modified":"2025-08-12T14:00:13","modified_gmt":"2025-08-12T06:00:13","slug":"%e5%9c%a8rocky-linux%e4%b8%8a%e9%80%9a%e8%bf%87mongodb-6-0%e8%bf%9b%e8%a1%8c%e5%a4%8d%e5%88%b6%e3%80%82","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8rocky-linux%e4%b8%8a%e9%80%9a%e8%bf%87mongodb-6-0%e8%bf%9b%e8%a1%8c%e5%a4%8d%e5%88%b6%e3%80%82\/","title":{"rendered":"\u5728Rocky Linux\u4e0a\u901a\u8fc7MongoDB 6.0\u8fdb\u884c\u590d\u5236"},"content":{"rendered":"<p>\u672c\u6765\u6211\u6253\u7b97\u4f7f\u7528MongoDB 5.0\uff08\u56e0\u4e3a\u6709\u5f88\u591a\u65e5\u8bed\u89e3\u91ca\u6587\u7ae0\uff09\uff0c\u4f46\u5f53\u6211\u5f00\u59cb\u6784\u5efa\u9636\u6bb5\u65f6\uff0c\u53d1\u73b0\u5df2\u7ecf\u53d1\u5e03\u4e866.0\u7248\u672c\uff0c\u6240\u4ee5\u8fd9\u7bc7\u6587\u7ae0\u53ea\u662f\u8bf4\u5148\u8bd5\u8bd5\u770b\u3002<\/p>\n<p>\u57282022\u5e7411\u670817\u65e5\uff0cRocky Linux\u7684\u6700\u65b0\u7248\u672c\u53ef\u7528\u4e8e\u64cd\u4f5c\u7cfb\u7edf\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"nv\">$ <\/span><span class=\"nb\">cat<\/span> \/etc\/redhat-release\r\nRocky Linux release 8.7 <span class=\"o\">(<\/span>Green Obsidian<span class=\"o\">)<\/span>\r\n<\/code><\/pre>\n<p>\u867d\u7136\u5df2\u7ecf\u8fdb\u884c\u4e86\u6700\u5c0f\u5b89\u88c5\u548cyum\u66f4\u65b0\uff0c\u4f46\u901a\u5e38\u4f1a\u5148\u5b89\u88c5\u5e38\u7528\u8f6f\u4ef6\u5305\uff0c\u6240\u4ee5\u53ef\u80fd\u4f1a\u51fa\u73b0\u4f9d\u8d56\u5173\u7cfb\u3002\u53e6\u5916\uff0c\u4e3a\u4e86\u65b9\u4fbf\u8d77\u89c1\uff0c\u6211\u5c06SELinux\u7981\u7528\u4e86\u3002<\/p>\n<h1>\u5b89\u88c5<\/p>\n<p>\u7531\u4e8eRocky\u9ed8\u8ba4\u7684\u5b58\u50a8\u5e93\u6ca1\u6709MongoDB\uff0c\u56e0\u6b64\u9700\u8981\u6dfb\u52a0RHEL\u5b58\u50a8\u5e93\uff08\u7531\u4e8e\u6ca1\u6709\u8d44\u91d1\uff0c\u6240\u4ee5\u4f7f\u7528\u793e\u533a\u7248\uff09\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"nv\">$ <\/span><span class=\"nb\">cat<\/span> \/etc\/yum.repos.d\/mongodb-org-6.0.repo\r\n<span class=\"o\">[<\/span>mongodb-org-6.0]\r\n<span class=\"nv\">name<\/span><span class=\"o\">=<\/span>MongoDB Repository\r\n<span class=\"nv\">baseurl<\/span><span class=\"o\">=<\/span>https:\/\/repo.mongodb.org\/yum\/redhat\/<span class=\"nv\">$releasever<\/span>\/mongodb-org\/6.0\/x86_64\/\r\n<span class=\"nv\">gpgcheck<\/span><span class=\"o\">=<\/span>1\r\n<span class=\"nv\">enabled<\/span><span class=\"o\">=<\/span>1\r\n<span class=\"nv\">gpgkey<\/span><span class=\"o\">=<\/span>https:\/\/www.mongodb.org\/static\/pgp\/server-6.0.asc\r\n<\/code><\/pre>\n<p>\u6211\u60f3\u5728\u5b89\u88c5 Ansible \u65f6\u56fa\u5b9a\u7248\u672c\uff0c\u6240\u4ee5\u8981\u67e5\u627e\u5e26\u6709\u7248\u672c\u540d\u79f0\u7684\u540d\u79f0\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"nv\">$ <\/span><span class=\"nb\">sudo <\/span>dnf search <span class=\"nt\">--showduplicates<\/span> mongodb-org\r\n\u30e1\u30bf\u30c7\u30fc\u30bf\u306e\u671f\u9650\u5207\u308c\u306e\u6700\u7d42\u78ba\u8a8d: 0:11:13 \u6642\u9593\u524d\u306e 2022\u5e7411\u670817\u65e5 03\u664252\u520633\u79d2 \u306b\u5b9f\u65bd\u3057\u307e\u3057\u305f\u3002\r\n<span class=\"o\">===================<\/span> \u540d\u524d \u5b8c\u5168\u4e00\u81f4: mongodb-org <span class=\"o\">====================<\/span>\r\nmongodb-org-6.0.3-1.el8.x86_64 : MongoDB open <span class=\"nb\">source<\/span>\r\n     ...: document-oriented database system <span class=\"o\">(<\/span>metapackage<span class=\"o\">)<\/span>\r\nmongodb-org-6.0.0-1.el8.x86_64 : MongoDB open <span class=\"nb\">source<\/span>\r\n     ...: document-oriented database system <span class=\"o\">(<\/span>metapackage<span class=\"o\">)<\/span>\r\nmongodb-org-6.0.1-1.el8.x86_64 : MongoDB open <span class=\"nb\">source<\/span>\r\n     ...: document-oriented database system <span class=\"o\">(<\/span>metapackage<span class=\"o\">)<\/span>\r\nmongodb-org-6.0.2-1.el8.x86_64 : MongoDB open <span class=\"nb\">source<\/span>\r\n     ...: document-oriented database system <span class=\"o\">(<\/span>metapackage<span class=\"o\">)<\/span>\r\nmongodb-org-6.0.3-1.el8.x86_64 : MongoDB open <span class=\"nb\">source<\/span>\r\n     ...: document-oriented database system <span class=\"o\">(<\/span>metapackage<span class=\"o\">)<\/span>\r\n<\/code><\/pre>\n<p>\u5c06mongodb-org-6.0.3-1.el8.x86_64\u8bbe\u4e3a\u5f53\u524d\u7248\u672c\u3002<\/p>\n<p>\u5148\u8bd5\u7740\u5b89\u88c5\u5e76\u542f\u52a8\u4e00\u4e0b\u3002<\/p>\n<pre class=\"post-pre\"><code>$ sudo systemctl start mongod\r\n$ sudo systemctl status mongod\r\n\u25cf mongod.service - MongoDB Database Server\r\n   Loaded: loaded (\/usr\/lib\/systemd\/system\/mongod.service; enabled&gt;\r\n   Active: active (running) since Thu 2022-11-17 04:26:28 EST; 3s &gt;\r\n     Docs: https:\/\/docs.mongodb.org\/manual\r\n  Process: 106174 ExecStart=\/usr\/bin\/mongod $OPTIONS (code=exited,&gt;\r\n  Process: 106171 ExecStartPre=\/usr\/bin\/chmod 0755 \/var\/run\/mongod&gt;\r\n  Process: 106170 ExecStartPre=\/usr\/bin\/chown mongod:mongod \/var\/r&gt;\r\n  Process: 106168 ExecStartPre=\/usr\/bin\/mkdir -p \/var\/run\/mongodb &gt;\r\n Main PID: 106177 (mongod)\r\n   Memory: 144.3M\r\n   CGroup: \/system.slice\/mongod.service\r\n           \u2514\u2500106177 \/usr\/bin\/mongod -f \/etc\/mongod.conf\r\n\r\n11\u6708 17 04:26:27 STMNG001 systemd[1]: Starting MongoDB Database Se&gt;\r\n11\u6708 17 04:26:27 STMNG001 mongod[106174]: about to fork child proc&gt;\r\n11\u6708 17 04:26:27 STMNG001 mongod[106177]: forked process: 106177\r\n11\u6708 17 04:26:28 STMNG001 mongod[106174]: child process started su&gt;\r\n11\u6708 17 04:26:28 STMNG001 systemd[1]: Started MongoDB Database Ser&gt;\r\nlines 1-18\/18 (END)\r\n<\/code><\/pre>\n<p>\u603b\u4e4b\u5c31\u662f\u80fd\u8dd1\u8d77\u6765\u4e86\u3002<br \/>\n\u867d\u7136\u4e0e\u6b64\u65e0\u5173\uff0c\u4f46\u636e\u8bf4 MongoDB \u4ece 5.0 \u7248\u672c\u5f00\u59cb\uff0c\u53ea\u80fd\u5728 SandyBridge\uff08\u5982\u679c\u662f AMD \u7684\u8bdd\u5c31\u662f Bulldozer\uff09\u53ca\u4ee5\u540e\u7684 CPU \u4e0a\u8fd0\u884c\uff0c\u6211\u66fe\u7ecf\u8bd5\u56fe\u5728\u4e00\u53f0\u8001\u65e7\u7684\u6d4b\u8bd5\u673a\u4e0a\u8fd0\u884c\uff0c\u7ed3\u679c\u6839\u672c\u65e0\u6cd5\u542f\u52a8\uff0c\u6d6a\u8d39\u4e86\u5f88\u591a\u65f6\u95f4\u3002<\/p>\n<h1>\u590d\u5236\u7684\u914d\u7f6e<\/p>\n<h2>\u7f51\u7edc\u914d\u7f6e<\/p>\n<p>\u8fd9\u6b21\u662f1\u53f0\u4e3b\u670d\u52a1\u5668\u548c2\u53f0\u5907\u4efd\u670d\u52a1\u5668\u76843\u4e2a\u526f\u672c\u6784\u6210\u3002<\/p>\n<pre class=\"post-pre\"><code>    inet 192.168.163.41\/24 brd 192.168.163.255 scope global noprefixroute ens224\r\n       valid_lft forever preferred_lft forever\r\n<\/code><\/pre>\n<pre class=\"post-pre\"><code>    inet 192.168.163.42\/24 brd 192.168.163.255 scope global noprefixroute ens224\r\n       valid_lft forever preferred_lft forever\r\n<\/code><\/pre>\n<pre class=\"post-pre\"><code>    inet 192.168.163.43\/24 brd 192.168.163.255 scope global noprefixroute ens224\r\n       valid_lft forever preferred_lft forever\r\n<\/code><\/pre>\n<p>\u9ebb\u7169\u6240\u4ee5\u8a72\u7db2\u7d61\u5b8c\u5168\u88ab\u5f9e\u5916\u754c\u9694\u96e2\uff0c\u53ea\u5141\u8a31\u6578\u64da\u5eab\u901a\u4fe1\uff0c\u9632\u706b\u7246\u5c0d\u8a72\u5340\u6bb5\u8a2d\u7f6e\u5168\u901a\u3002<\/p>\n<pre class=\"post-pre\"><code>$ sudo firewall-cmd --list-all --zone=drop\r\ndrop (active)\r\n  target: DROP\r\n  icmp-block-inversion: no\r\n  interfaces: ens224\r\n  sources:\r\n  services:\r\n  ports:\r\n  protocols:\r\n  forward: no\r\n  masquerade: no\r\n  forward-ports:\r\n  source-ports:\r\n  icmp-blocks:\r\n  rich rules:\r\n\trule family=\"ipv4\" source address=\"192.168.163.0\/24\" accep\r\n<\/code><\/pre>\n<h2>\u914d\u7f6e<\/p>\n<p>\u5728\u9605\u8bfb\u516c\u5f0f\u6587\u4ef6\u7684\u540c\u65f6\u8fdb\u884c\u8bbe\u7f6e\uff08\u6682\u65f6\u4e0d\u8003\u8651AccessControl\uff09<\/p>\n<pre class=\"post-pre\"><code><span class=\"nv\">$ <\/span><span class=\"nb\">cat<\/span> \/etc\/mongod.conf\r\n<span class=\"c\"># mongod.conf<\/span>\r\n\r\n<span class=\"c\"># for documentation of all options, see:<\/span>\r\n<span class=\"c\">#   http:\/\/docs.mongodb.org\/manual\/reference\/configuration-options\/<\/span>\r\n\r\n<span class=\"c\"># where to write logging data.<\/span>\r\nsystemLog:\r\n  destination: file\r\n  logAppend: <span class=\"nb\">true\r\n  <\/span>path: \/var\/log\/mongodb\/mongod.log\r\n\r\n<span class=\"c\"># Where and how to store data.<\/span>\r\nstorage:\r\n  dbPath: \/var\/lib\/mongo\r\n  journal:\r\n    enabled: <span class=\"nb\">true<\/span>\r\n<span class=\"c\">#  engine:<\/span>\r\n<span class=\"c\">#  wiredTiger:<\/span>\r\n\r\n<span class=\"c\"># how the process runs<\/span>\r\nprocessManagement:\r\n  fork: <span class=\"nb\">true<\/span>  <span class=\"c\"># fork and run in background<\/span>\r\n  pidFilePath: \/var\/run\/mongodb\/mongod.pid  <span class=\"c\"># location of pidfile<\/span>\r\n  timeZoneInfo: \/usr\/share\/zoneinfo\r\n\r\n<span class=\"c\"># network interfaces<\/span>\r\nnet:\r\n  port: 27017\r\n  bindIp: 0.0.0.0 <span class=\"c\"># Enter 0.0.0.0,:: to bind to all IPv4 and IPv6 addresses or, alternatively, use the net.bindIpAll setting.<\/span>\r\n\r\n<span class=\"c\">#security:<\/span>\r\n\r\n<span class=\"c\">#operationProfiling:<\/span>\r\n\r\nreplication:\r\n  replSetName: <span class=\"s2\">\"staging_rs\"<\/span>\r\n\r\n<span class=\"c\">#sharding:<\/span>\r\n\r\n<span class=\"c\">## Enterprise-Only Options<\/span>\r\n\r\n<span class=\"c\">#auditLog:<\/span>\r\n\r\n<span class=\"c\">#snmp:<\/span>\r\n<\/code><\/pre>\n<p>\u5373\u4f7f\u8fd9\u6837\u8bf4\uff0c\u53ea\u6709\u4e24\u5904\u8fdb\u884c\u4e86\u66f4\u6539\u3002<\/p>\n<pre class=\"post-pre\"><code>$ diff \/etc\/mongod.conf \/tmp\/mongod.conf\r\n29c29,30\r\n&lt;   bindIp: 0.0.0.0 # Enter 0.0.0.0,:: to bind to all IPv4 and IPv6 addresses or, alternatively, use the net.bindIpAll setting.\r\n---\r\n&gt;   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&gt;\r\n35,36c36\r\n&lt; replication:\r\n&lt;   replSetName: \"staging_rs\"\r\n---\r\n&gt; #replication:\r\n<\/code><\/pre>\n<p>\u5b98\u65b9\u6587\u4ef6\u8981\u6c42\u5728`bindIp`\u4e2d\u8bb0\u5f55localhost\u3001\u4e3b\u673a\u540d\u7b49\u4fe1\u606f\uff0c\u4f46\u5373\u4f7f\u6309\u7167\u6b64\u8bbe\u5b9a\uff0c\u4ecd\u7136\u5bfc\u81f4\u9000\u51fa\u4ee3\u780148\u3002\u800c\u4e14\u7531\u4e8e\u8fd9\u6bb5\u4ee3\u7801\u5728\u7269\u7406\u4e0a\u662f\uff08\u4ee5\u4e0b\u7565\uff09\uff0c\u6240\u4ee5\u8bbe\u7f6e\u4e3a0.0.0.0\u6765\u5b8c\u5168\u5f00\u653e\u3002\u5982\u679c\u60a8\u77e5\u9053\u539f\u56e0\uff0c\u8bf7\u544a\u8bc9\u6211\u3002<\/p>\n<h2>\u786e\u8ba4\u6c9f\u901a<\/p>\n<p>\u6682\u65f6\u53ef\u4ee5\u901a\u8fc7 hosts \u6587\u4ef6\u6765\u8bbf\u95ee\u4e3b\u673a\u540d\u3002<\/p>\n<pre class=\"post-pre\"><code>$ cat \/etc\/hosts\r\n127.0.0.1   node1 localhost localhost.localdomain localhost4 localhost4.localdomain4\r\n::1         node1 localhost localhost.localdomain localhost6 localhost6.localdomain6\r\n192.168.163.41 node1\r\n192.168.163.42 node2\r\n192.168.163.43 node3\r\n<\/code><\/pre>\n<p>\u8bd5\u8bd5\u8fde\u63a5<\/p>\n<pre class=\"post-pre\"><code>$ mongosh --host node2\r\nCurrent Mongosh Log ID:\t63760d87b8ca90e34cfd2773\r\nConnecting to:\t\tmongodb:\/\/node2:27017\/?directConnection=true&amp;appName=mongosh+1.6.0\r\nUsing MongoDB:\t\t6.0.3\r\nUsing Mongosh:\t\t1.6.0\r\n\r\nFor mongosh info see: https:\/\/docs.mongodb.com\/mongodb-shell\/\r\n\r\n\r\nTo help improve our products, anonymous usage data is collected and sent to MongoDB periodically (https:\/\/www.mongodb.com\/legal\/privacy-policy).\r\nYou can opt-out by running the disableTelemetry() command.\r\n\r\n------\r\n   The server generated these startup warnings when booting\r\n   2022-11-17T05:31:28.076-05:00: Access control is not enabled for the database. Read and write access to data and configuration is unrestricted\r\n   2022-11-17T05:31:28.076-05:00: \/sys\/kernel\/mm\/transparent_hugepage\/enabled is 'always'. We suggest setting it to 'never'\r\n   2022-11-17T05:31:28.076-05:00: vm.max_map_count is too low\r\n------\r\n\r\n------\r\n   Enable MongoDB's free cloud-based monitoring service, which will then receive and display\r\n   metrics about your deployment (disk utilization, CPU, operation statistics, etc).\r\n\r\n   The monitoring data will be available on a MongoDB website with a unique URL accessible to you\r\n   and anyone you share the URL with. MongoDB may use this information to make product\r\n   improvements and to suggest MongoDB products and deployment options to you.\r\n\r\n   To enable free monitoring, run the following command: db.enableFreeMonitoring()\r\n   To permanently disable this reminder, run the following command: db.disableFreeMonitoring()\r\n------\r\n\r\ntest&gt; exit\r\n<\/code><\/pre>\n<pre class=\"post-pre\"><code>$ mongosh --host node3\r\nCurrent Mongosh Log ID:\t63760e92516565ee42298ecc\r\nConnecting to:\t\tmongodb:\/\/node3:27017\/?directConnection=true&amp;appName=mongosh+1.6.0\r\nUsing MongoDB:\t\t6.0.3\r\nUsing Mongosh:\t\t1.6.0\r\n\r\nFor mongosh info see: https:\/\/docs.mongodb.com\/mongodb-shell\/\r\n\r\n------\r\n   The server generated these startup warnings when booting\r\n   2022-11-17T05:31:28.106-05:00: Access control is not enabled for the database. Read and write access to data and configuration is unrestricted\r\n   2022-11-17T05:31:28.107-05:00: \/sys\/kernel\/mm\/transparent_hugepage\/enabled is 'always'. We suggest setting it to 'never'\r\n   2022-11-17T05:31:28.107-05:00: vm.max_map_count is too low\r\n------\r\n\r\n------\r\n   Enable MongoDB's free cloud-based monitoring service, which will then receive and display\r\n   metrics about your deployment (disk utilization, CPU, operation statistics, etc).\r\n\r\n   The monitoring data will be available on a MongoDB website with a unique URL accessible to you\r\n   and anyone you share the URL with. MongoDB may use this information to make product\r\n   improvements and to suggest MongoDB products and deployment options to you.\r\n\r\n   To enable free monitoring, run the following command: db.enableFreeMonitoring()\r\n   To permanently disable this reminder, run the following command: db.disableFreeMonitoring()\r\n------\r\n\r\ntest&gt; exit\r\n<\/code><\/pre>\n<p>\u770b\u8d77\u6765\u8fde\u63a5\u6ca1\u6709\u95ee\u9898\u3002<\/p>\n<h2>\u8bd5\u8bd5\u540c\u65f6\u8fdb\u884c<\/p>\n<p>\u9023\u7d50\u5230\u81ea\u5df1<\/p>\n<pre class=\"post-pre\"><code>$ mongosh\r\nCurrent Mongosh Log ID:\t63760f4babfcbf3520a2f501\r\nConnecting to:\t\tmongodb:\/\/127.0.0.1:27017\/?directConnection=true&amp;serverSelectionTimeoutMS=2000&amp;appName=mongosh+1.6.0\r\nUsing MongoDB:\t\t6.0.3\r\nUsing Mongosh:\t\t1.6.0\r\n\r\nFor mongosh info see: https:\/\/docs.mongodb.com\/mongodb-shell\/\r\n\r\n------\r\n   The server generated these startup warnings when booting\r\n   2022-11-17T05:31:28.082-05:00: Access control is not enabled for the database. Read and write access to data and configuration is unrestricted\r\n   2022-11-17T05:31:28.082-05:00: \/sys\/kernel\/mm\/transparent_hugepage\/enabled is 'always'. We suggest setting it to 'never'\r\n   2022-11-17T05:31:28.082-05:00: vm.max_map_count is too low\r\n------\r\n\r\n------\r\n   Enable MongoDB's free cloud-based monitoring service, which will then receive and display\r\n   metrics about your deployment (disk utilization, CPU, operation statistics, etc).\r\n\r\n   The monitoring data will be available on a MongoDB website with a unique URL accessible to you\r\n   and anyone you share the URL with. MongoDB may use this information to make product\r\n   improvements and to suggest MongoDB products and deployment options to you.\r\n\r\n   To enable free monitoring, run the following command: db.enableFreeMonitoring()\r\n   To permanently disable this reminder, run the following command: db.disableFreeMonitoring()\r\n------\r\n\r\ntest&gt;\r\n<\/code><\/pre>\n<p>rs.initiate() \u7684\u4e00\u4e2a\u540d\u5b57\u9519\u8bef<\/p>\n<pre class=\"post-pre\"><code>test&gt; rs.initiate()\r\n{\r\n  info2: 'no configuration specified. Using a default configuration for the set',\r\n  me: 'STMNG001:27017',\r\n  ok: 1\r\n}\r\nstaging_rs [direct: other] test&gt; rs.conf()\r\n{\r\n  _id: 'staging_rs',\r\n  version: 1,\r\n  term: 1,\r\n  members: [\r\n    {\r\n      _id: 0,\r\n      host: 'STMNG001:27017',\r\n      arbiterOnly: false,\r\n      buildIndexes: true,\r\n      hidden: false,\r\n      priority: 1,\r\n      tags: {},\r\n      secondaryDelaySecs: Long(\"0\"),\r\n      votes: 1\r\n    }\r\n  ],\r\n  protocolVersion: Long(\"1\"),\r\n  writeConcernMajorityJournalDefault: true,\r\n  settings: {\r\n    chainingAllowed: true,\r\n    heartbeatIntervalMillis: 2000,\r\n    heartbeatTimeoutSecs: 10,\r\n    electionTimeoutMillis: 10000,\r\n    catchUpTimeoutMillis: -1,\r\n    catchUpTakeoverDelayMillis: 30000,\r\n    getLastErrorModes: {},\r\n    getLastErrorDefaults: { w: 1, wtimeout: 0 },\r\n    replicaSetId: ObjectId(\"63760f6dcc9599202db21af9\")\r\n  }\r\n}\r\n<\/code><\/pre>\n<p>\u203b \u8fd9\u662f\u4e00\u4e2a\u9519\u8bef\u3002<\/p>\n<p>\u5982\u679c\u5728 rs.initiate() \u4e2d\u52a0\u5165\u53c2\u6570\u5e76\u8fdb\u884c\u4e00\u6b21\u6027\u521d\u59cb\u5316\u5c31\u597d\u4e86\uff0c\u4f46\u662f\u4e00\u65e6\u8fdb\u884c\u4e86\u4e00\u6b21\u521d\u59cb\u5316\uff0cinitiate \u5c31\u4e0d\u4f1a\u518d\u5de5\u4f5c\u4e86\u3002<\/p>\n<pre class=\"post-pre\"><code>staging_rs [direct: primary] test&gt; rs.initiate( {\r\n...    _id : \"staging_rs\",\r\n...    members: [\r\n...       { _id: 0, host: \"node1:27017\" },\r\n...       { _id: 1, host: \"node2:27017\" },\r\n...       { _id: 2, host: \"node3:27017\" }\r\n...    ]\r\n... })\r\nMongoServerError: already initialized\r\n<\/code><\/pre>\n<p>\u65e2\u7136\u5df2\u7ecf\u641e\u7838\u4e86\uff0c\u90a3\u5c31\u53ea\u80fd\u7ee7\u7eed\u6267\u884c rs.add\uff08\u56e0\u4e3a\u5220\u9664\u526f\u672c\u96c6\u4fe1\u606f\u770b\u8d77\u6765\u76f8\u5f53\u9ebb\u70e6\uff09\u3002<\/p>\n<pre class=\"post-pre\"><code>staging_rs [direct: primary] test&gt; rs.add(\r\n...     { _id: 1, host: \"node2:27017\" }\r\n... )\r\n{\r\n    ok: 1,\r\n    '$clusterTime': {\r\n    clusterTime: Timestamp({ t: 1668682278, i: 1 }),\r\n    signature: {\r\n        hash: Binary(Buffer.from(\"0000000000000000000000000000000000000000\", \"hex\"), 0),\r\n        keyId: Long(\"0\")\r\n    }\r\n    },\r\n    operationTime: Timestamp({ t: 1668682278, i: 1 })\r\n}\r\n<\/code><\/pre>\n<pre class=\"post-pre\"><code>staging_rs [direct: primary] test&gt; rs.add(\r\n...     { _id: 2, host: \"node3:27017\" }\r\n... )\r\n{\r\n    ok: 1,\r\n    '$clusterTime': {\r\n    clusterTime: Timestamp({ t: 1668682321, i: 1 }),\r\n    signature: {\r\n        hash: Binary(Buffer.from(\"0000000000000000000000000000000000000000\", \"hex\"), 0),\r\n        keyId: Long(\"0\")\r\n    }\r\n    },\r\n    operationTime: Timestamp({ t: 1668682321, i: 1 })\r\n}\r\n<\/code><\/pre>\n<p>\u901a\u8fc7\u547d\u4ee4 rs.status() \u6765\u68c0\u67e5\u72b6\u6001\u3002<\/p>\n<pre class=\"post-pre\"><code>staging_rs [direct: primary] test&gt; rs.status()\r\n{\r\n  set: 'staging_rs',\r\n  date: ISODate(\"2022-11-17T10:53:07.205Z\"),\r\n  myState: 1,\r\n  term: Long(\"2\"),\r\n  syncSourceHost: '',\r\n  syncSourceId: -1,\r\n  heartbeatIntervalMillis: Long(\"2000\"),\r\n  majorityVoteCount: 2,\r\n  writeMajorityCount: 2,\r\n  votingMembersCount: 3,\r\n  writableVotingMembersCount: 3,\r\n  optimes: {\r\n    lastCommittedOpTime: { ts: Timestamp({ t: 1668682379, i: 1 }), t: Long(\"2\") },\r\n    lastCommittedWallTime: ISODate(\"2022-11-17T10:52:59.238Z\"),\r\n    readConcernMajorityOpTime: { ts: Timestamp({ t: 1668682379, i: 1 }), t: Long(\"2\") },\r\n    appliedOpTime: { ts: Timestamp({ t: 1668682379, i: 1 }), t: Long(\"2\") },\r\n    durableOpTime: { ts: Timestamp({ t: 1668682379, i: 1 }), t: Long(\"2\") },\r\n    lastAppliedWallTime: ISODate(\"2022-11-17T10:52:59.238Z\"),\r\n    lastDurableWallTime: ISODate(\"2022-11-17T10:52:59.238Z\")\r\n  },\r\n  lastStableRecoveryTimestamp: Timestamp({ t: 1668682339, i: 1 }),\r\n  electionCandidateMetrics: {\r\n    lastElectionReason: 'electionTimeout',\r\n    lastElectionDate: ISODate(\"2022-11-17T10:43:19.198Z\"),\r\n    electionTerm: Long(\"2\"),\r\n    lastCommittedOpTimeAtElection: { ts: Timestamp({ t: 0, i: 0 }), t: Long(\"-1\") },\r\n    lastSeenOpTimeAtElection: { ts: Timestamp({ t: 1668681761, i: 1 }), t: Long(\"1\") },\r\n    numVotesNeeded: 1,\r\n    priorityAtElection: 1,\r\n    electionTimeoutMillis: Long(\"10000\"),\r\n    newTermStartDate: ISODate(\"2022-11-17T10:43:19.207Z\"),\r\n    wMajorityWriteAvailabilityDate: ISODate(\"2022-11-17T10:43:19.225Z\")\r\n  },\r\n  members: [\r\n    {\r\n      _id: 0,\r\n      name: 'node1:27017',\r\n      health: 1,\r\n      state: 1,\r\n      stateStr: 'PRIMARY',\r\n      uptime: 590,\r\n      optime: { ts: Timestamp({ t: 1668682379, i: 1 }), t: Long(\"2\") },\r\n      optimeDate: ISODate(\"2022-11-17T10:52:59.000Z\"),\r\n      lastAppliedWallTime: ISODate(\"2022-11-17T10:52:59.238Z\"),\r\n      lastDurableWallTime: ISODate(\"2022-11-17T10:52:59.238Z\"),\r\n      syncSourceHost: '',\r\n      syncSourceId: -1,\r\n      infoMessage: '',\r\n      electionTime: Timestamp({ t: 1668681799, i: 1 }),\r\n      electionDate: ISODate(\"2022-11-17T10:43:19.000Z\"),\r\n      configVersion: 5,\r\n      configTerm: 2,\r\n      self: true,\r\n      lastHeartbeatMessage: ''\r\n    },\r\n    {\r\n      _id: 1,\r\n      name: 'node2:27017',\r\n      health: 1,\r\n      state: 2,\r\n      stateStr: 'SECONDARY',\r\n      uptime: 108,\r\n      optime: { ts: Timestamp({ t: 1668682379, i: 1 }), t: Long(\"2\") },\r\n      optimeDurable: { ts: Timestamp({ t: 1668682379, i: 1 }), t: Long(\"2\") },\r\n      optimeDate: ISODate(\"2022-11-17T10:52:59.000Z\"),\r\n      optimeDurableDate: ISODate(\"2022-11-17T10:52:59.000Z\"),\r\n      lastAppliedWallTime: ISODate(\"2022-11-17T10:52:59.238Z\"),\r\n      lastDurableWallTime: ISODate(\"2022-11-17T10:52:59.238Z\"),\r\n      lastHeartbeat: ISODate(\"2022-11-17T10:53:05.733Z\"),\r\n      lastHeartbeatRecv: ISODate(\"2022-11-17T10:53:05.734Z\"),\r\n      pingMs: Long(\"0\"),\r\n      lastHeartbeatMessage: '',\r\n      syncSourceHost: 'node1:27017',\r\n      syncSourceId: 0,\r\n      infoMessage: '',\r\n      configVersion: 5,\r\n      configTerm: 2\r\n    },\r\n    {\r\n      _id: 2,\r\n      name: 'node3:27017',\r\n      health: 1,\r\n      state: 2,\r\n      stateStr: 'SECONDARY',\r\n      uptime: 65,\r\n      optime: { ts: Timestamp({ t: 1668682379, i: 1 }), t: Long(\"2\") },\r\n      optimeDurable: { ts: Timestamp({ t: 1668682379, i: 1 }), t: Long(\"2\") },\r\n      optimeDate: ISODate(\"2022-11-17T10:52:59.000Z\"),\r\n      optimeDurableDate: ISODate(\"2022-11-17T10:52:59.000Z\"),\r\n      lastAppliedWallTime: ISODate(\"2022-11-17T10:52:59.238Z\"),\r\n      lastDurableWallTime: ISODate(\"2022-11-17T10:52:59.238Z\"),\r\n      lastHeartbeat: ISODate(\"2022-11-17T10:53:05.735Z\"),\r\n      lastHeartbeatRecv: ISODate(\"2022-11-17T10:53:06.255Z\"),\r\n      pingMs: Long(\"0\"),\r\n      lastHeartbeatMessage: '',\r\n      syncSourceHost: 'node2:27017',\r\n      syncSourceId: 1,\r\n      infoMessage: '',\r\n      configVersion: 5,\r\n      configTerm: 2\r\n    }\r\n  ],\r\n  ok: 1,\r\n  '$clusterTime': {\r\n    clusterTime: Timestamp({ t: 1668682379, i: 1 }),\r\n    signature: {\r\n      hash: Binary(Buffer.from(\"0000000000000000000000000000000000000000\", \"hex\"), 0),\r\n      keyId: Long(\"0\")\r\n    }\r\n  },\r\n  operationTime: Timestamp({ t: 1668682379, i: 1 })\r\n}\r\n<\/code><\/pre>\n<p>\u4f3c\u4e4e\u6b63\u5728\u521b\u5efa\u4e00\u4e2a\u75311\u4e2a\u4e3b\u8282\u70b9\u548c2\u4e2a\u526f\u672c\u8282\u70b9\u7ec4\u6210\u7684\u666e\u901aMongoDB ReplicaSet\u3002<\/p>\n<h1>\u786e\u8ba4\u52a8\u4f5c<\/p>\n<p>\u6570\u636e\u5e93\u786e\u8ba4<\/p>\n<pre class=\"post-pre\"><code>staging_rs [direct: primary] test&gt; show dbs\r\nadmin    80.00 KiB\r\nconfig  176.00 KiB\r\nlocal   436.00 KiB\r\n<\/code><\/pre>\n<p>\u521b\u5efa\u4e00\u4e2a\u65b0\u9879\u76ee<\/p>\n<pre class=\"post-pre\"><code>staging_rs [direct: primary] test&gt; use hogedb\r\nswitched to db hogedb\r\n<\/code><\/pre>\n<p>\u63d2\u5165<\/p>\n<pre class=\"post-pre\"><code>staging_rs [direct: primary] hogedb&gt; db.hoge.insert({fuga: \"FUGA\"})\r\nDeprecationWarning: Collection.insert() is deprecated. Use insertOne, insertMany, or bulkWrite.\r\n{\r\n  acknowledged: true,\r\n  insertedIds: { '0': ObjectId(\"6376142de6809436052f37ce\") }\r\n}\r\n<\/code><\/pre>\n<p>\u88ab\u65a5\u8d23\u4e86\u4f46\u4e0d\u5728\u610f\uff0c\u53ea\u662f\u786e\u8ba4\u4e00\u4e0b\u3002<\/p>\n<pre class=\"post-pre\"><code>staging_rs [direct: primary] hogedb&gt; show dbs\r\nadmin    80.00 KiB\r\nconfig  208.00 KiB\r\nhogedb   40.00 KiB\r\nlocal   444.00 KiB\r\nstaging_rs [direct: primary] hogedb&gt; db\r\nhogedb\r\n<\/code><\/pre>\n<pre class=\"post-pre\"><code>staging_rs [direct: primary] hogedb&gt; db.hoge.find()\r\n[ { _id: ObjectId(\"6376142de6809436052f37ce\"), fuga: 'FUGA' } ]\r\n<\/code><\/pre>\n<p>\u597d\u50cf\u6709\u6b63\u78ba\u8fdb\u5165 SECONDARY \u6570\u636e\u5e93\uff0c\u6240\u4ee5\u9700\u8981\u786e\u8ba4\u4e00\u4e0b\u3002<\/p>\n<pre class=\"post-pre\"><code>staging_rs [direct: secondary] test&gt; show dbs\r\nadmin    80.00 KiB\r\nconfig  248.00 KiB\r\nhogedb   40.00 KiB\r\nlocal   436.00 KiB\r\n<\/code><\/pre>\n<p>\u770b\u8d77\u6765\u5df2\u7ecf\u5f88\u597d\u5730\u540c\u6b65\u4e86\u3002<\/p>\n<p>\u5982\u679c\u65f6\u95f4\u5141\u8bb8\u7684\u8bdd\uff0c\u7531\u4e8e\u7bc7\u5e45\u6709\u4e9b\u957f\uff0c\u8bf7\u786e\u4fdd\u80fd\u591f\u8fde\u63a5\u5230\u5ba2\u6237\u7aef\u5e76\u80fd\u4ece\u526f\u672c\u4e2d\u8bfb\u53d6\u3002<\/p>\n<h1>\u8bf7\u539f\u751f\u4e2d\u6587\u4ee5\u4e00\u79cd\u65b9\u5f0f\u6539\u5199\u4ee5\u4e0b\u5185\u5bb9\uff0c\u53ea\u9700\u8981\u4e00\u79cd\u9009\u9879\uff1a<\/p>\n<p>\u516c\u5171\u5173\u7cfb<\/p>\n<p>\u5982\u679c\u60f3\u8981\u5728\u6700\u8fd1\u53d6\u5f97AS\u756a\u53f7\u7684\u682a\u5f0f\u4f1a\u793e\u732b\u8033\u8349\uff08AS 146981\uff09\u5de5\u4f5c\u7684\u4eba\uff0c\u8bf7\u70b9\u51fb\u8fd9\u91cc\uff1a<\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"qyaDzwcg5w\"><p><a href=\"https:\/\/recruit.nekojarashi.com\/\">\u63a1\u7528\u60c5\u5831<\/a><\/p><\/blockquote>\n<p><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;\u63a1\u7528\u60c5\u5831&#8221; &#8212; \u682a\u5f0f\u4f1a\u793e\u306d\u3053\u3058\u3083\u3089\u3057\u63a1\u7528\u30b5\u30a4\u30c8\" src=\"https:\/\/recruit.nekojarashi.com\/embed#?secret=DYPUfv0EsT#?secret=qyaDzwcg5w\" data-secret=\"qyaDzwcg5w\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u6765\u6211\u6253\u7b97\u4f7f\u7528MongoDB 5.0\uff08\u56e0\u4e3a\u6709\u5f88\u591a\u65e5\u8bed\u89e3\u91ca\u6587\u7ae0\uff09\uff0c\u4f46\u5f53\u6211\u5f00\u59cb\u6784\u5efa\u9636\u6bb5\u65f6\uff0c\u53d1\u73b0\u5df2\u7ecf\u53d1\u5e03\u4e866.0\u7248\u672c [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[227],"class_list":["post-29413","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-227"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5728Rocky Linux\u4e0a\u901a\u8fc7MongoDB 6.0\u8fdb\u884c\u590d\u5236 - Blog - Silicon Cloud<\/title>\n<meta name=\"description\" content=\"\u5173\u4e8e\u5728Rocky Linux\u4e0a\u901a\u8fc7MongoDB 6.0\u8fdb\u884c\u590d\u5236\u7684\u6280\u672f\u6587\u7ae0\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/\u5728rocky-linux\u4e0a\u901a\u8fc7mongodb-6-0\u8fdb\u884c\u590d\u5236\u3002\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5728Rocky Linux\u4e0a\u901a\u8fc7MongoDB 6.0\u8fdb\u884c\u590d\u5236\" \/>\n<meta property=\"og:description\" content=\"\u5173\u4e8e\u5728Rocky Linux\u4e0a\u901a\u8fc7MongoDB 6.0\u8fdb\u884c\u590d\u5236\u7684\u6280\u672f\u6587\u7ae0\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u5728rocky-linux\u4e0a\u901a\u8fc7mongodb-6-0\u8fdb\u884c\u590d\u5236\u3002\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2022-11-26T21:43:27+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-12T06:00:13+00:00\" \/>\n<meta name=\"author\" content=\"\u6e05, \u5b87\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u6e05, \u5b87\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8rocky-linux%e4%b8%8a%e9%80%9a%e8%bf%87mongodb-6-0%e8%bf%9b%e8%a1%8c%e5%a4%8d%e5%88%b6%e3%80%82\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8rocky-linux%e4%b8%8a%e9%80%9a%e8%bf%87mongodb-6-0%e8%bf%9b%e8%a1%8c%e5%a4%8d%e5%88%b6%e3%80%82\/\",\"name\":\"\u5728Rocky Linux\u4e0a\u901a\u8fc7MongoDB 6.0\u8fdb\u884c\u590d\u5236 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2022-11-26T21:43:27+00:00\",\"dateModified\":\"2025-08-12T06:00:13+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e\"},\"description\":\"\u5173\u4e8e\u5728Rocky Linux\u4e0a\u901a\u8fc7MongoDB 6.0\u8fdb\u884c\u590d\u5236\u7684\u6280\u672f\u6587\u7ae0\",\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8rocky-linux%e4%b8%8a%e9%80%9a%e8%bf%87mongodb-6-0%e8%bf%9b%e8%a1%8c%e5%a4%8d%e5%88%b6%e3%80%82\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8rocky-linux%e4%b8%8a%e9%80%9a%e8%bf%87mongodb-6-0%e8%bf%9b%e8%a1%8c%e5%a4%8d%e5%88%b6%e3%80%82\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8rocky-linux%e4%b8%8a%e9%80%9a%e8%bf%87mongodb-6-0%e8%bf%9b%e8%a1%8c%e5%a4%8d%e5%88%b6%e3%80%82\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5728Rocky Linux\u4e0a\u901a\u8fc7MongoDB 6.0\u8fdb\u884c\u590d\u5236\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e\",\"name\":\"\u6e05, \u5b87\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g\",\"caption\":\"\u6e05, \u5b87\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/qingyu\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8rocky-linux%e4%b8%8a%e9%80%9a%e8%bf%87mongodb-6-0%e8%bf%9b%e8%a1%8c%e5%a4%8d%e5%88%b6%e3%80%82\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u5728Rocky Linux\u4e0a\u901a\u8fc7MongoDB 6.0\u8fdb\u884c\u590d\u5236 - Blog - Silicon Cloud","description":"\u5173\u4e8e\u5728Rocky Linux\u4e0a\u901a\u8fc7MongoDB 6.0\u8fdb\u884c\u590d\u5236\u7684\u6280\u672f\u6587\u7ae0","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/\u5728rocky-linux\u4e0a\u901a\u8fc7mongodb-6-0\u8fdb\u884c\u590d\u5236\u3002\/","og_locale":"zh_CN","og_type":"article","og_title":"\u5728Rocky Linux\u4e0a\u901a\u8fc7MongoDB 6.0\u8fdb\u884c\u590d\u5236","og_description":"\u5173\u4e8e\u5728Rocky Linux\u4e0a\u901a\u8fc7MongoDB 6.0\u8fdb\u884c\u590d\u5236\u7684\u6280\u672f\u6587\u7ae0","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u5728rocky-linux\u4e0a\u901a\u8fc7mongodb-6-0\u8fdb\u884c\u590d\u5236\u3002\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2022-11-26T21:43:27+00:00","article_modified_time":"2025-08-12T06:00:13+00:00","author":"\u6e05, \u5b87","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u6e05, \u5b87","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8rocky-linux%e4%b8%8a%e9%80%9a%e8%bf%87mongodb-6-0%e8%bf%9b%e8%a1%8c%e5%a4%8d%e5%88%b6%e3%80%82\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8rocky-linux%e4%b8%8a%e9%80%9a%e8%bf%87mongodb-6-0%e8%bf%9b%e8%a1%8c%e5%a4%8d%e5%88%b6%e3%80%82\/","name":"\u5728Rocky Linux\u4e0a\u901a\u8fc7MongoDB 6.0\u8fdb\u884c\u590d\u5236 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2022-11-26T21:43:27+00:00","dateModified":"2025-08-12T06:00:13+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e"},"description":"\u5173\u4e8e\u5728Rocky Linux\u4e0a\u901a\u8fc7MongoDB 6.0\u8fdb\u884c\u590d\u5236\u7684\u6280\u672f\u6587\u7ae0","breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8rocky-linux%e4%b8%8a%e9%80%9a%e8%bf%87mongodb-6-0%e8%bf%9b%e8%a1%8c%e5%a4%8d%e5%88%b6%e3%80%82\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8rocky-linux%e4%b8%8a%e9%80%9a%e8%bf%87mongodb-6-0%e8%bf%9b%e8%a1%8c%e5%a4%8d%e5%88%b6%e3%80%82\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8rocky-linux%e4%b8%8a%e9%80%9a%e8%bf%87mongodb-6-0%e8%bf%9b%e8%a1%8c%e5%a4%8d%e5%88%b6%e3%80%82\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u5728Rocky Linux\u4e0a\u901a\u8fc7MongoDB 6.0\u8fdb\u884c\u590d\u5236"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e","name":"\u6e05, \u5b87","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g","caption":"\u6e05, \u5b87"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/qingyu\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8rocky-linux%e4%b8%8a%e9%80%9a%e8%bf%87mongodb-6-0%e8%bf%9b%e8%a1%8c%e5%a4%8d%e5%88%b6%e3%80%82\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/29413","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=29413"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/29413\/revisions"}],"predecessor-version":[{"id":111468,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/29413\/revisions\/111468"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=29413"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=29413"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=29413"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}