CentOS平台下为Python添加MongoDB支持PyMongo

 

  1. 下载PyMongo
    [root@leezhen ~]# wget https://pypi.python.org/packages/source/p/pymongo/pymongo-2.6.3.tar.gz
  2. 解压PyMongo

    [root@leezhen ~]# tar zxvf pymongo-2.6.3.tar.gz
  3. 进入PyMongo目录
    [root@leezhen ~]# cd pymongo-2.6.3
  4. 安装PyMongo
    [root@leezhen pymongo-2.6.3]# python setup.py install
  5. 测试PyMongo是否安装成功
    [root@leezhen pymongo-2.6.3]# python
    Python 2.7.6 (default, Mar 10 2014, 12:36:38)
    [GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import pymongo
    >>> exit()
    [root@leezhen pymongo-2.6.3]#

     

 

posted @ 2014-03-11 17:55  LeeZhen  阅读(1070)  评论(0编辑  收藏  举报