MongoDB2.6的配置文件详解
下面是一个MongoDB2.6的配置文件的一个实例:
#where to log
logpath=/var/log/mongodb/mongod.log
logappend=true
# fork and run in background
fork=true
#port=27017
dbpath=/data/mongoddata
# location of pidfile
pidfilepath=/var/run/mongodb/mongod.pid
# Listen to local interface only. Comment out to listen on all interfaces.
bind_ip=127.0.0.1
# Disables write-ahead journaling
# nojournal=true
# Enables periodic logging of CPU utilization and I/O wait
#cpu=true
# Turn on/off security. Off is currently the default
#noauth=true
#auth=true
# Verbose logging output.
#verbose=true
# Inspect all client data for validity on receipt (useful for
# developing drivers)
#objcheck=true
各个配置参数的解释如下:
说明:#在配置文件中代表注释符号,设置某个参数就去掉某个参数前面的#.
#where to log 日志保存位置或者说是目录
logpath=/var/log/mongodb/mongod.log
logappend=true #代表在原有日志文件基础上追加。
# fork and run in background
fork=true #启用后台模式
#port=27017 #Mongod端口号
dbpath=/data/mongoddata #数据库保存位置
# location of pidfile pidfile的本地保存位置
pidfilepath=/var/run/mongodb/mongod.pid
# Listen to local interface only. Comment out to listen on all interfaces.
bind_ip=127.0.0.1 #监听本地ip,可换成公网ip,这样从外网可以连接MongoDB.
# Disables write-ahead journaling 禁用预写日记
# nojournal=true
# Enables periodic logging of CPU utilization and I/O wait 启动CPU利用率的定期记录和
I / O等待
#cpu=true
# Turn on/off security. Off is currently the default 安全开关,默认为关闭
#noauth=true
#auth=true
# Verbose logging output. 详细的日志输出
#verbose=true
# Inspect all client data for validity on receipt (useful for
# developing drivers) 检查收到到所有的客户端数据的有效性(可用于各种开发)
#objcheck=true
近期文章
- python:object()函数
- mongodb数据备份用mongorestore恢复后没有数据
- mongodb roles
- windows2003远程桌面连接蓝屏,不显示桌面图标的解决办法。
- centos下apache gb2312页面中文乱码解决办法
- 设置mongodb做为windows服务自动运行
- windows2008中IIS7配置fastcgi+php
- 服务器连接远程桌面后无法看到桌面的解决办法
- iis日志导入sql server数据库
- 7-zip命令行参数详解
- iptables如何指定一个范围内的IP地址或端口
- mongod2.6服务无法启动,权限问题
- CentOS下编译安装mysql 5.1,支持中文(GBK)
- ERROR 1045 (28000): Access denied for user root@localhost(using password: YES)
- CentOs删除文件夹下所有文件及文件夹并保留该文件夹
- CentOS 6.4: Make Command not Found
- CentOS下安装成功mysql的提示信息
- mysql configure编译完成后的提示信息
- CentOS上安装gcc的方法
- MongoDB创建root角色用户(超级管理员)