mongodb 配置文件
更新:HHH   时间:2023-1-7


# mongod.conf
# 追加模式写入log
logpath=/var/log/mongodb/mongod.log
logappend=true

# 后台运行
fork=true

# 服务端口号
port=27013

# 数据库文件存放目录
dbpath=/var/lib/mongo
directoryperdb=true

# 进程id文件的存放路径
pidfilepath=/var/run/mongodb/mongod.pid

# 监听IP地址
bind_ip=0.0.0.0

# Disables write-ahead journaling
# nojournal=true

# 启用定时记录CPU的利用率和I/O等待
#cpu=true

# Turn on/off security.  Off is currently the default
#noauth=true
#auth=true

# 详细记录输出
#verbose=true

# 用于开发驱动程序时的检查客户端接收数据的有效性
#objcheck=true

# 启用数据库配额管理,默认每个db可以有8个文件,可以用quotaFiles参数设置
#quota=true

#   设置oplog记录等级
#   0=off (default)
#   1=W
#   2=R
#   3=both
#   7=W+some reads
#diaglog=0

# 忽略查询提示
#nohints=true

# Enable the HTTP interface (Defaults to port 28017).
#httpinterface=true

# 关闭服务器端脚本,这将极大的限制功能  
#noscripting=true

# 关闭扫描表,任何查询将会是扫描失败
#notablescan=true

# 关闭数据文件预分配
#noprealloc=true

# 为新数据库指定.ns文件的大小,单位:MB
# nssize=<size>
# Replication Options
# in replicated mongo databases, specify the replica set name here
#replSet=setname
# maximum size in megabytes for replication operation log
#oplogSize=1024
# path to a key file storing authentication info for connections
# between replica set members
#keyFile=/path/to/keyfile

返回MongoDB数据库教程...