1.下载MongoDB 2.安装MongoDB(安装到/usr/local下) .tgz mongodb cd mongodb mkdir db mkdir logs cd bin vi mongodb.conf 把下面的代码复制到mongodb.conf中,保存1 dbpath = /usr/local/mongodb/db logpath = /usr/local/mongodb/logs/mongodb.log port = fork = true nohttpinterface=true