mongodb环境搭建

之前搭建过mongodb开发环境,操作系统都是在32位系统下。昨天找了张64位win7系统,在虚拟机上安装了,32位系统跑64位虚拟机,没问题。开发环境还是在32位系统下,数据服务部署在了64win7下。

一直以来用的是C/C++,mongodb的C++driver还得自己编译,不过也方便。首先备齐软件,如下(引用):

Get the MongoDB Source Code
Download the source code from Downloads.

Or install Git. Then:

git clone git://github.com/mongodb/mongo.git (more info)
git tag -l to see tagged version numbers
Switch to a stable branch (unless doing development) -- an even second number indicates "stable".  (Although with sharding you will want the latest if the latest is less than 1.6.0.) For example:
git checkout r1.4.1
Get Boost Libraries
Click here for a prebuilt boost library for Visual Studio.  7zip format. This file has what you need to build MongoDB, but not some other boost libs, so it's partial. Uncompress this to the c:\boost directory. Your actual files are in c:\boost\boost
See the Boost and Windows page for other options. Use v1.42 or higher with VS2010.
Get SpiderMonkey

Download prebuilt libraries and headers here for VS2010. Place these files in ../js/ relative to your mongo project directory.
Or (more work) build SpiderMonkey js.lib yourself – details here.

 值得注意的是:

1、SCons安装:首先安装python,之后安装exe版的scons,然后将python的脚本路径添加到path下,如"C:\Python26\Scripts”。

2、在执行scons mongoclient.lib 时,可能会调用首先找到的VS环境,从而导致之后的test会调用多个版本的boost库,因此首先屏蔽掉vs2010以外的库(临时改名的方式)

测试通过后,基本环境就是64位数据服务,32位调试环境。
下一篇着手矢量要素入库与效率分析。

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值