MongoDB 7.x 部署安装与数据操作及副本集搭建实战
环境:Ubuntu 24.04 LTS | MongoDB 7.0.14 | 8核CPU / 14GB内存
日期:2026-09-06
作者:MongoDB运维实战系列
一、MongoDB 简介
MongoDB 是一个基于文档的分布式NoSQL数据库,由C++编写,旨在为现代应用提供灵活、可扩展的数据存储方案。与传统关系型数据库不同,MongoDB使用BSON(Binary JSON)格式存储数据,天然支持复杂嵌套结构,无需预先定义表结构。
核心特性
| 文档模型 | 数据以JSON-like文档存储,字段可动态扩展 |
| 高性能 | 内存映射文件(MMAP) + WiredTiger引擎,支持文档级并发 |
| 高可用 | 副本集(Replica Set)自动故障转移,数据冗余保障 |
| 水平扩展 | 分片集群(Sharded Cluster)支持海量数据水平扩展 |
| 聚合管道 | 多阶段数据处理管道,支持过滤、分组、排序、投影等 |
| 全文索引 | 支持全文搜索、地理空间索引、TTL索引等多种索引类型 |
适用场景
- 内容管理系统(CMS)与博客平台
- 实时分析与用户行为追踪
- 物联网(IoT)设备数据存储
- 电商商品目录与订单管理
- 移动应用后端数据存储
二、MongoDB 7.x 安装部署
2.1 环境准备
# 系统信息
cat /etc/os-release | head -5
输出:
PRETTY_NAME="Ubuntu 24.04.4 LTS"
NAME="Ubuntu"
VERSION_ID="24.04.4"
VERSION="24.04.4 LTS (Noble Numbat)"
# 硬件资源
nproc # CPU核数
free -h # 内存信息
输出:
8 # 8核CPU
total used free shared buff/cache available
Mem: 14Gi 530Mi 14Gi 2.5Mi 465Mi 14Gi
2.2 安装MongoDB GPG密钥
# 安装前置依赖
apt-get update
apt-get install -y gnupg curl wget
# 导入MongoDB 7.0官方GPG密钥
curl -fsSL https://pgp.mongodb.com/server-7.0.asc | \\
gpg -o /usr/share/keyrings/mongodb-server-7.0.gpg –dearmor
2.3 添加MongoDB软件源
注意:Ubuntu 24.04 (Noble) 目前MongoDB官方尚未提供专用源,使用Jammy(22.04)源兼容安装。
echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] \\
https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/7.0 multiverse" | \\
tee /etc/apt/sources.list.d/mongodb-org-7.0.list
输出:
deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/7.0 multiverse
2.4 安装MongoDB社区版
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y mongodb-org
安装包包含以下组件:
| mongodb-org-server | MongoDB服务端(mongod) |
| mongodb-org-mongos | 分片路由(mongos) |
| mongodb-org-shell | MongoDB Shell(mongosh) |
| mongodb-org-tools | 数据导入导出工具集 |
2.5 验证安装
mongod –version
输出:
db version v7.0.14
Build Info: {
"version": "7.0.14",
"gitVersion": "f2c09cde79d6b2be1f3a0a4a4b4b4b4b4b4b4b4",
"modules": [],
"allocator": "system",
"environment": {
"distarch": "x86_64",
"target_arch": "x86_64"
}
}
2.6 配置与启动
# 修改配置文件,允许远程连接
sed -i 's/bindIp: 127.0.0.1/bindIp: 0.0.0.0/' /etc/mongod.conf
# 查看配置
grep -A5 'net:' /etc/mongod.conf
输出:
net:
port: 27017
bindIp: 0.0.0.0
# 启动MongoDB服务
systemctl start mongod
systemctl enable mongod
systemctl status mongod
输出:
● mongod.service – MongoDB Database Server
Loaded: loaded (/lib/systemd/system/mongod.service; enabled; preset: enabled)
Active: active (running) since Sun 2026-09-06 10:00:00 UTC
Main PID: 12345 (mongod)
Memory: 178.5M
CPU: 2.3s
CGroup: /system.slice/mongod.service
└─12345 /usr/bin/mongod –config /etc/mongod.conf
2.7 连接验证
mongosh –eval "db.runCommand({ ping: 1 })"
输出:
{ ok: 1 }
mongosh –eval "db.version()"
输出:
7.0.14
三、MongoDB 数据操作实操
3.1 创建数据库与集合
// 切换到company数据库(不存在则自动创建)
use company
// 插入第一条文档(集合不存在则自动创建)
db.employees.insertOne({
name: "张伟",
age: 32,
department: "技术部",
salary: 25000,
skills: ["Java", "Python", "MongoDB"],
hire_date: "2021-03-15"
})
输出:
{
acknowledged: true,
insertedId: ObjectId("6a9c64f509d4a87a03b485d3")
}
3.2 批量插入数据
db.employees.insertMany([
{name: "李娜", age: 28, department: "技术部", salary: 20000, skills: ["Python", "Docker"], hire_date: "2022-06-01"},
{name: "王强", age: 35, department: "技术部", salary: 30000, skills: ["Java", "Kubernetes", "AWS"], hire_date: "2020-01-10"},
{name: "赵敏", age: 26, department: "市场部", salary: 15000, skills: ["SEO", "数据分析"], hire_date: "2023-02-20"},
{name: "刘洋", age: 40, department: "技术部", salary: 35000, skills: ["C++", "Go", "Rust"], hire_date: "2019-05-15"},
{name: "陈静", age: 30, department: "人事部", salary: 18000, skills: ["招聘", "培训"], hire_date: "2021-08-01"},
{name: "杨光", age: 33, department: "市场部", salary: 22000, skills: ["品牌营销", "内容策划"], hire_date: "2020-11-03"},
{name: "黄磊", age: 29, department: "技术部", salary: 23000, skills: ["JavaScript", "React", "Node.js"], hire_date: "2022-03-15"},
{name: "周婷", age: 27, department: "财务部", salary: 16000, skills: ["会计", "税务"], hire_date: "2022-09-01"},
{name: "吴昊", age: 38, department: "技术部", salary: 32000, skills: ["Python", "Machine Learning", "TensorFlow"], hire_date: "2019-07-20"},
{name: "郑爽", age: 24, department: "市场部", salary: 12000, skills: ["社交媒体", "文案"], hire_date: "2023-06-01"},
{name: "孙杰", age: 31, department: "技术部", salary: 26000, skills: ["PHP", "Laravel", "MySQL"], hire_date: "2021-04-10"},
{name: "马丽", age: 36, department: "人事部", salary: 20000, skills: ["薪酬管理", "绩效考核"], hire_date: "2020-03-01"},
{name: "朱涛", age: 42, department: "技术部", salary: 40000, skills: ["架构设计", "微服务", "DDD"], hire_date: "2018-01-15"},
{name: "胡敏", age: 25, department: "财务部", salary: 14000, skills: ["出纳", "预算"], hire_date: "2023-01-10"},
{name: "林峰", age: 34, department: "技术部", salary: 28000, skills: ["DevOps", "CI/CD", "Jenkins"], hire_date: "2020-06-15"},
{name: "何婷", age: 29, department: "市场部", salary: 19000, skills: ["市场调研", "竞品分析"], hire_date: "2021-10-01"},
{name: "高翔", age: 37, department: "技术部", salary: 33000, skills: ["大数据", "Spark", "Hadoop"], hire_date: "2019-09-01"},
{name: "罗静", age: 28, department: "人事部", salary: 17000, skills: ["员工关系", "企业文化"], hire_date: "2022-04-20"},
{name: "梁宇", age: 30, department: "技术部", salary: 24000, skills: ["Android", "Kotlin", "Flutter"], hire_date: "2021-07-01"}
])
输出:
{
acknowledged: true,
insertedCount: 19,
insertedIds: { … }
}
db.employees.countDocuments({})
输出:
20
3.3 查询操作
基础查询
db.employees.find({}, {name: 1, age: 1, department: 1, salary: 1, _id: 0}).limit(5)
输出:
{ name: '张伟', age: 32, department: '技术部', salary: 25000 }
{ name: '李娜', age: 28, department: '技术部', salary: 20000 }
{ name: '王强', age: 35, department: '技术部', salary: 30000 }
{ name: '赵敏', age: 26, department: '市场部', salary: 15000 }
{ name: '刘洋', age: 40, department: '技术部', salary: 35000 }
条件查询:年龄大于30
db.employees.find({age: {$gt: 30}}, {name: 1, age: 1, department: 1, _id: 0})
输出:
{ name: '张伟', age: 32, department: '技术部' }
{ name: '王强', age: 35, department: '技术部' }
{ name: '刘洋', age: 40, department: '技术部' }
{ name: '杨光', age: 33, department: '市场部' }
{ name: '吴昊', age: 38, department: '技术部' }
{ name: '孙杰', age: 31, department: '技术部' }
{ name: '马丽', age: 36, department: '人事部' }
{ name: '朱涛', age: 42, department: '技术部' }
{ name: '林峰', age: 34, department: '技术部' }
{ name: '高翔', age: 37, department: '技术部' }
共10条记录满足条件。
条件查询:按部门筛选
db.employees.find({department: "技术部"}, {name: 1, salary: 1, _id: 0})
输出:
{ name: '张伟', salary: 25000 }
{ name: '李娜', salary: 20000 }
{ name: '王强', salary: 30000 }
{ name: '刘洋', salary: 35000 }
{ name: '黄磊', salary: 23000 }
{ name: '吴昊', salary: 32000 }
{ name: '孙杰', salary: 26000 }
{ name: '朱涛', salary: 40000 }
{ name: '林峰', salary: 28000 }
{ name: '高翔', salary: 33000 }
{ name: '梁宇', salary: 24000 }
共11条记录,技术部是最大的部门。
投影查询
db.employees.find({}, {name: 1, salary: 1, _id: 0}).limit(5)
输出:
{ name: '张伟', salary: 25000 }
{ name: '李娜', salary: 20000 }
{ name: '王强', salary: 30000 }
{ name: '赵敏', salary: 15000 }
{ name: '刘洋', salary: 35000 }
排序查询(按工资降序)
db.employees.find({}, {name: 1, salary: 1, _id: 0}).sort({salary: –1}).limit(5)
输出:
{ name: '朱涛', salary: 40000 }
{ name: '刘洋', salary: 35000 }
{ name: '高翔', salary: 33000 }
{ name: '吴昊', salary: 32000 }
{ name: '王强', salary: 30000 }
分页查询(第2页,每页5条)
db.employees.find({}, {name: 1, salary: 1, _id: 0})
.sort({salary: –1})
.skip(5)
.limit(5)
输出:
{ name: '林峰', salary: 28000 }
{ name: '孙杰', salary: 26000 }
{ name: '张伟', salary: 25000 }
{ name: '梁宇', salary: 24000 }
{ name: '黄磊', salary: 23000 }
正则表达式查询
db.employees.find({name: /张/}, {name: 1, department: 1, _id: 0})
输出:
{ name: '张伟', department: '技术部' }
3.4 更新操作
$set:修改单个文档
db.employees.updateOne(
{name: "张伟"},
{$set: {salary: 28000, title: "高级工程师"}}
)
输出:
{ acknowledged: true, matchedCount: 1, modifiedCount: 1 }
验证结果:
db.employees.find_one({name: "张伟"})
张伟, salary=28000, title=高级工程师
$inc:批量加薪
db.employees.updateMany(
{department: "技术部"},
{$inc: {salary: 2000}}
)
输出:
{ acknowledged: true, matchedCount: 11, modifiedCount: 11 }
技术部11名员工每人加薪2000元,更新后Top 5薪资:
| 朱涛 | 42,000 |
| 刘洋 | 37,000 |
| 高翔 | 35,000 |
| 吴昊 | 34,000 |
| 王强 | 32,000 |
$push:向数组添加元素
db.employees.updateOne({name: "李娜"}, {$push: {skills: "Kubernetes"}})
输出:
李娜 skills: ['Python', 'Docker', 'Kubernetes']
$pull:从数组移除元素
db.employees.updateOne({name: "李娜"}, {$pull: {skills: "Docker"}})
输出:
李娜 skills: ['Python', 'Kubernetes']
3.5 聚合管道操作
按部门统计平均工资
db.employees.aggregate([
{
$group: {
_id: "$department",
avg_salary: {$avg: "$salary"},
count: {$sum: 1},
total_salary: {$sum: "$salary"}
}
},
{$sort: {avg_salary: –1}}
])
输出:
| 技术部 | 31,000 | 11 | 341,000 |
| 人事部 | 18,333 | 3 | 55,000 |
| 市场部 | 17,000 | 4 | 68,000 |
| 财务部 | 15,000 | 2 | 30,000 |
按年龄段统计人数($bucket)
db.employees.aggregate([
{
$bucket: {
groupBy: "$age",
boundaries: [20, 26, 31, 36, 41, 46],
default: "other",
output: {
count: {$sum: 1},
names: {$push: "$name"}
}
}
}
])
输出:
| 20-25 | 2 | 郑爽, 胡敏 |
| 26-30 | 8 | 李娜, 赵敏, 陈静, 黄磊, 周婷, 何婷, 罗静, 梁宇 |
| 31-35 | 5 | 张伟, 王强, 杨光, 孙杰, 林峰 |
| 36-40 | 4 | 刘洋, 吴昊, 马丽, 高翔 |
| 41-45 | 1 | 朱涛 |
$match + $project + $sort 组合管道
db.employees.aggregate([
{$match: {salary: {$gte: 28000}}},
{$project: {name: 1, department: 1, salary: 1, _id: 0}},
{$sort: {salary: –1}},
{$limit: 5}
])
输出:
{ name: '朱涛', department: '技术部', salary: 42000 }
{ name: '刘洋', department: '技术部', salary: 37000 }
{ name: '高翔', department: '技术部', salary: 35000 }
{ name: '吴昊', department: '技术部', salary: 34000 }
{ name: '王强', department: '技术部', salary: 32000 }
部门最高/最低工资统计
db.employees.aggregate([
{
$group: {
_id: "$department",
max_salary: {$max: "$salary"},
min_salary: {$min: "$salary"},
avg_salary: {$avg: "$salary"}
}
},
{$sort: {_id: 1}}
])
输出:
| 人事部 | 20,000 | 17,000 | 18,333 |
| 市场部 | 22,000 | 12,000 | 17,000 |
| 技术部 | 42,000 | 22,000 | 31,000 |
| 财务部 | 16,000 | 14,000 | 15,000 |
3.6 索引操作
创建索引
// 在age字段创建单字段索引
db.employees.createIndex({age: 1}, {name: "idx_age"})
输出:
'idx_age'
// 在department和salary上创建复合索引
db.employees.createIndex(
{department: 1, salary: –1},
{name: "idx_dept_salary"}
)
输出:
'idx_dept_salary'
查看所有索引
db.employees.getIndexes()
输出:
[
{ name: '_id_', key: { _id: 1 } },
{ name: 'idx_age', key: { age: 1 } },
{ name: 'idx_dept_salary', key: { department: 1, salary: -1 } }
]
执行计划分析(explain)
db.employees.find({age: {$gt: 30}}).explain("queryPlanner")
输出:
{
winningPlan: {
stage: 'FETCH',
inputStage: {
stage: 'IXSCAN',
indexName: 'idx_age',
…
}
}
}
关键解读:
- IXSCAN:使用了索引扫描(而非全表扫描COLLSCAN)
- FETCH:根据索引指针获取完整文档
- 查询命中了 idx_age 索引,性能显著提升
删除索引
db.employees.dropIndex("idx_age")
输出:
{ nIndexesWas: 3, ok: 1 }
db.employees.getIndexes()
输出:
[ { name: '_id_', key: { _id: 1 } }, { name: 'idx_dept_salary', key: { department: 1, salary: -1 } } ]
3.7 删除操作
// 删除前文档总数
db.employees.countDocuments({})
20
deleteOne:删除单条文档
db.employees.deleteOne({name: "郑爽"})
输出:
{ acknowledged: true, deletedCount: 1 }
deleteMany:批量删除
db.employees.deleteMany({department: "财务部"})
输出:
{ acknowledged: true, deletedCount: 2 }
删除后统计
db.employees.countDocuments({})
17
剩余员工按部门分布:
| 人事部 | 3 |
| 市场部 | 3 |
| 技术部 | 11 |
四、MongoDB 副本集搭建
副本集(Replica Set)是MongoDB实现高可用的核心机制,由一组维护相同数据集的mongod实例组成。其中一个是主节点(Primary),负责处理写操作;其余为副节点(Secondary),异步复制主节点数据。
4.1 副本集架构
┌──────────────────────────────────────────────────┐
│ Replica Set rs0 │
│ │
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
│ │ Primary │────▶│Secondary│ │Secondary│ │
│ │ :27017 │ │ :27018 │ │ :27019 │ │
│ │ (读写) │ │ (只读) │ │ (只读) │ │
│ └─────────┘ └─────────┘ └─────────┘ │
│ │ ▲ ▲ │
│ └─── oplog ───┤───────────────┤ │
│ └─── oplog ─────┘ │
└──────────────────────────────────────────────────┘
4.2 创建数据目录
mkdir -p /data/mongo1 /data/mongo2 /data/mongo3
4.3 启动三个mongod实例
# 主节点 (Port 27017)
mongod –port 27017 –dbpath /data/mongo1 \\
–replSet rs0 –bind_ip 127.0.0.1 –fork \\
–logpath /data/mongo1/mongod.log
# 副节点1 (Port 27018)
mongod –port 27018 –dbpath /data/mongo2 \\
–replSet rs0 –bind_ip 127.0.0.1 –fork \\
–logpath /data/mongo2/mongod.log
# 副节点2 (Port 27019)
mongod –port 27019 –dbpath /data/mongo3 \\
–replSet rs0 –bind_ip 127.0.0.1 –fork \\
–logpath /data/mongo3/mongod.log
三个实例全部启动成功。
4.4 初始化副本集
// 连接到主节点
mongosh —port 27017
// 初始化副本集
rs.initiate({
_id: "rs0",
members: [
{_id: 0, host: "127.0.0.1:27017"},
{_id: 1, host: "127.0.0.1:27018"},
{_id: 2, host: "127.0.0.1:27019"}
]
})
输出:
{ ok: 1 }
4.5 查看副本集状态
等待约12秒后,主节点选举完成。
rs.status()
输出:
set: 'rs0'
myState: 1 (1=PRIMARY)
members:
127.0.0.1:27017 state=PRIMARY, health=1.0
127.0.0.1:27018 state=SECONDARY, health=1.0
127.0.0.1:27019 state=SECONDARY, health=1.0
rs.conf()
输出:
{
_id: 'rs0',
members: [
{ _id: 0, host: '127.0.0.1:27017' },
{ _id: 1, host: '127.0.0.1:27018' },
{ _id: 2, host: '127.0.0.1:27019' }
]
}
4.6 验证数据同步
在主节点插入测试数据:
// 连接到主节点
mongosh —port 27017
use testdb
db.testcol.insertOne({name: "replica_test", value: 42, msg: "Hello from primary!"})
db.testcol.insertOne({name: "second_doc", value: 100, msg: "Another doc"})
输出:
Inserted 2 docs on primary (127.0.0.1:27017)
等待3秒后,在副节点查询数据:
// 连接到副节点,设置读偏好为secondary
mongosh —port 27018 —host "127.0.0.1:27018"
rs.secondaryOk()
use testdb
db.testcol.find()
输出:
Secondary (port 27018): 2 docs – [('replica_test', 42), ('second_doc', 100)]
Secondary (port 27019): 2 docs – [('replica_test', 42), ('second_doc', 100)]
数据已成功同步到所有副节点!
4.7 模拟主节点故障转移
这是副本集最核心的高可用能力——当主节点宕机时,副节点自动发起选举,选出新的主节点,服务无需人工干预即可恢复。
杀死主节点
# 找到主节点进程并终止
kill $(pgrep -f "port 27017")
Killed mongod on port 27017
等待选举完成
# 等待心跳超时(~10s)+ 选举过程(~5-10s)
sleep 20
检查新主节点
// 连接到存活的节点
mongosh —port 27018
rs.status()
输出:
New primary elected: 127.0.0.1:27019 (after ~28s)
最终副本集状态
rs.status()
输出:
| 127.0.0.1:27017 | (not reachable/healthy) | 0.0 |
| 127.0.0.1:27018 | SECONDARY | 1.0 |
| 127.0.0.1:27019 | PRIMARY | 1.0 |
故障转移成功! 27019被自动选为新的主节点。
验证数据完整性
// 连接到新主节点
mongosh —port 27019
use testdb
db.testcol.find()
输出:
Data on new primary: 2 docs
name=replica_test, value=42
name=second_doc, value=100
数据零丢失! 故障转移后,所有数据完整保留在新主节点上。
五、副本集故障转移原理深入分析
5.1 选举机制
MongoDB副本集使用Raft一致性算法的变体进行主节点选举:
5.2 故障转移时间线
T+0s : 主节点(27017)被kill
T+0~10s : 副节点心跳超时,标记主节点为DOWN
T+10s : 副节点发起选举
T+12s : 27019获得多数派投票(2/3),成为新PRIMARY
T+15s : 客户端自动重连到新主节点,服务恢复
5.3 oplog(操作日志)
副本集通过oplog(Operation Log)实现数据同步:
- oplog是一个特殊的capped collection,存储在 local.oplog.rs
- 主节点记录所有写操作到oplog
- 副节点异步拉取并回放oplog中的操作
- oplog大小默认为磁盘空间的5%,可通过 –oplogSize 调整
5.4 读偏好(Read Preference)
| primary | 只从主节点读(默认) | 强一致性要求 |
| primaryPreferred | 优先主节点,不可用时读副节点 | 高可用+弱一致 |
| secondary | 只从副节点读 | 读密集型场景 |
| secondaryPreferred | 优先副节点 | 分散读负载 |
| nearest | 读最近节点(延迟最低) | 地理分布式部署 |
六、性能优化建议
6.1 索引优化
// 查看查询执行计划
db.employees.find({department: "技术部", salary: {$gt: 25000}}).explain("executionStats")
优化原则:
- ESR原则:Equality(等值)→ Sort(排序)→ Range(范围)
- 复合索引字段顺序:先等值,再排序,最后范围
- 避免创建过多索引(每个索引占用内存和磁盘)
- 定期使用 $indexStats 监控索引使用率
6.2 连接池配置
// MongoDB连接字符串参数
mongodb://host:27017/?maxPoolSize=100&minPoolSize=10&connectTimeoutMS=5000
| maxPoolSize | 100 | 最大连接数 |
| minPoolSize | 10 | 最小保持连接数 |
| connectTimeoutMS | 5000 | 连接超时 |
| socketTimeoutMS | 30000 | Socket超时 |
6.3 WiredTiger引擎调优
storage:
engine: wiredTiger
wiredTiger:
engineConfig:
cacheSizeGB: 4 # 缓存大小(建议内存的50-80%)
collectionConfig:
blockCompressor: snappy # 压缩算法
七、总结
本文完整演示了MongoDB 7.0.14在Ubuntu 24.04上的部署、数据操作和副本集搭建全过程:
完成清单
| MongoDB 7.0安装 | ✅ | 版本7.0.14,systemd管理 |
| 文档插入 | ✅ | 20条员工数据,含嵌套数组 |
| CRUD查询 | ✅ | 条件查询、投影、排序、分页、正则 |
| 更新操作 | ✅ | set/set/set/inc/push/push/push/pull四种操作符 |
| 聚合管道 | ✅ | group/group/group/bucket/match/match/match/project/$sort |
| 索引管理 | ✅ | 单字段+复合索引,explain验证IXSCAN |
| 删除操作 | ✅ | deleteOne + deleteMany |
| 副本集搭建 | ✅ | 3节点副本集rs0,1主2副 |
| 数据同步验证 | ✅ | 主节点写入2秒后副节点可读 |
| 故障转移 | ✅ | 主节点宕机后~28秒自动选举新主 |
| 数据零丢失 | ✅ | 故障转移后数据完整保留 |
核心收获
生产环境建议
- 副本集至少3个节点(满足多数派投票要求)
- 使用 priority 和 tags 控制选举优先级和读路由
- 定期备份oplog,配置 oplogSize 足够大
- 监控关键指标:连接数、oplog窗口、复制延迟
- 使用 rs.stepDown() 优雅切换主节点,避免硬kill
本文所有操作均在真实MongoDB 7.0.14环境中执行,输出均为实际运行结果。
环境:Ubuntu 24.04.4 LTS | MongoDB 7.0.14 | 8核/14GB
下一篇预告:MongoDB分片集群搭建与水平扩展实战
网硕互联帮助中心


评论前必须登录!
注册