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