MongoDB Python开发环境搭建

1. Dowload MangoDB
     http://www.mongodb.org/downloads download Mac OSX 64-bit
 
2. unpack(use Command or double click)
    tar -xvf mongodb-osx-x86_64-2.6.0 .tgz
 
3. Create db file
    sudo mkdir -p /data/db/
    sudo chown `id -u`  /data/db/
 
4. configure mongo env to .bash_profile
    MONGO_HOME=~/mongodb-osx-x86_64-2.6.0
    source .bash_profile
 
5. setup mongodb
    mongod
 
6. client
    mongo 
 
 
7. Python setuptool
     https://pypi.python.org/pypi/setuptools#unix-including-mac-os-x-curl
 
    run at cmd
    sudo  curl  https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py  -o - | python
 
    it will throw error, but don’t worry, you can find the installer package setup tools-3.4.4
    enter the package 
    sudo python setup.py install
 
 8. download pymongo
      https://pypi.python.org/pypi/pymongo/#downloads
 
      sudo easy_install pymongo-2.7-py2.7-macosx-10.8-intel.egg 
 
9. open  command->python try the API
    http://api.mongodb.org/python/current/tutorial.html
 
10. mongo: http://blog.nosqlfan.com/html/2989.html
   
 
    

你可能感兴趣的:(mongoDB)