mkdir ~/mongodb # use --fork to run mongodb server as daemon mongod --dbpath ~/mongodb/ --fork --logpath ~/mongo/mongodb.log