Onlyruiwen 2016-05-30
mongodb 使用命令行启动
#bin/mongod
--dbpath arg directory for datafiles - defaults to /data/db
--logpath arg log file to send write to instead of stdout - has to be a file, not directory
--fork fork server process
--port arg specify port number - 27017 by default
也可以使用配置文件
-f [ --config ] arg configuration file specifying additional options
# vi /data/mongo/mongodb.cnf
dbpath=/data/mongo/
logpath=/data/mongo/mongo.log
logappend=true
fork=true
port=27017