• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

MongoDB环境搭建

mysql 搞代码 4年前 (2022-01-09) 18次浏览 已收录 0个评论

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

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

一直以来用的是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 h本文来源[email protected]搞@^&代*@码网(ere 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位调试环境。
下一篇着手矢量要素入库与效率分析。见


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:MongoDB环境搭建
喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址