mkdir /data/mongo/mongodb.cnf、
配置 后台启动
# vi /data/mongo/mongodb.cnf
dbpath=/data/mongo/
logpath=/data/mongo/mongo.log
logappend=true
fork=true
port=27017
后台启动命令
mongod -f /usr/local/mongodb/mongodb-linux-x86_64-3.0.6/bin/data/mongo/mongodb.cnf
查询mongo 进程
ps -ef|grep mongo
kill -9 608 进程id
参数启动
./mongod --dbpath=/usr/local/mongodb/data --logpath=/usr/local/mongodb/logs.log --logappend --port=6699 --fork