1,下载mongodb-linux-x86_64-ubuntu1404-3.4.4.tgz
$ tar -xzvf mongodb-linux-x86_64-ubuntu1404-3.4.4.tgz
sudo mkdir /usr/local/mongodb
sudo mv mongodb-linux-x86_64-ubuntu1404-3.4.4 /usr/local/mongodb
#此处设置环境变量应该不是永久,若是出问题就参考: http://blog.chinaunix.net/uid-26916352-id-3208366.html
#即在.bashrc中添加后source
export PATH=/usr/local/mongodb/mongodb-linux-x86_64-ubuntu1404-3.4.4/bin/:$PATH
2,测试:
$ mongoMongoDB shell version v3.4.4
connecting to: mongodb://127.0.0.1:27017
MongoDB server version: 2.4.9
WARNING: shell and server versions do not match
>
#shell和server版本不匹配,暂时没找到怎么改,好像没影响
其他资料有log之类的配置http://www.linuxdiyf.com/linux/30097.html http://jingyan.baidu.com/article/363872ecef62466e4ba16f08.html http://blog.csdn.net/a_1515/article/details/51943519
这里介绍可以写个配置文件,将相关信息(db,log的路径,port之类)写进取
http://www.linuxdiyf.com/linux/19187.html
3,django中使用
安装驱动mongoengine
pip install mongoengine
教程
http://www.jb51.cc/article/p-oabftypz-es.html https://www.ibm.com/developerworks/cn/opensource/os-django-mongo/ http://www.cnblogs.com/fillim/p/4864448.html 原文链接:https://www.f2er.com/ubuntu/352278.html