首先以配置文件的形式保存配置
mongod.conf
port=27017
bind_ip=127.0.0.1
dbpath=/path/db
logpath=/path/mongod.log
pidfilepath=/path/mongod.pid
unixSocketPrefix=/path/mongodb
logappend=true
fork=true
进入mongodb安装文件夹的bin目录下
运行
./mongod -f /path/mongod.conf
首先以配置文件的形式保存配置
mongod.conf
port=27017
bind_ip=127.0.0.1
dbpath=/path/db
logpath=/path/mongod.log
pidfilepath=/path/mongod.pid
unixSocketPrefix=/path/mongodb
logappend=true
fork=true
进入mongodb安装文件夹的bin目录下
运行
./mongod -f /path/mongod.conf