ubuntu mongodb installation

ubuntu mongodb安装


tar zxvf mongodb-linux-x86_64-ubuntu1404-3.2.10.tgz

export PATH=/home/xing/mongodb-3.2.10/bin:$PATH

//mongo.conf内容
dbpath=/home/mongodb/mongodb-data
auth=true
logpath=/home/mongodb/mongodb-log/mongodb.log
logappend=true
fork=true
#httpinterface=true

db.createUser({user:"root",pwd:"123456",roles:[{role:"root", db: "admin"}]});
db.createUser({user:"test",pwd:"123456",roles:[{role:"dbOwner", db: "test"}]});



mongod -f mongo.conf //启动
kill -2 PID //停止

ps aux |grep mongo






Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326673487&siteId=291194637