MongoDB C Driver and APIinstances linux MongoDB安装配置

<一,linux平台MongoDB安装配置>在这我们使用的Centos6 yum部署的,你想搞编译,自个干!

无auth,启动mongodb

创建账户

重新开启认证登陆

再此用上次的dbpath启动报如下错误,附上错误解决方法

Ok,搞定

命令行关闭数据库

基于yum部署的mongoDB启动控制脚本保存在/etc/init.d/  只针对RHEL内核系统衍生版本,请自行定位,(其实编译和yum,维护工具孰好孰坏?尺度不同,结果各异)

编译的哥们请用如下控制脚本

<二,主要目标在这,搞定MongoDB C driver API>

1,following guide will step you through the process of downloading, building, and installing the current release of the MongoDB C Driver

 MongoDB C driver下载

wget https://github.com/mongodb/mongo-c-driver/releases/download/0.98.0/mongo-c-driver-0.98.0.tar.gz

Minimal dependencies are needed to build the MongoDB C driver. Optionally,
if you want Kerberos (GSSAPI) or SSL support, you need to install libsasl2 and OpenSSL libraries and development headers respectively



sudo make install or su -c "make install";

<三,MongoDB C API>

offical Doc借鉴瞻仰!

http://api.mongodb.org/c/current/?_ga=1.106192963.110691070.1411522327

http://docs.mongodb.org/manual/reference/connection-string/

Connection String URI Format,Standard Connection String Format,standard URI connection scheme:

mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[database][?options]]

Example:

MongoDB replic set

mongodb://Ruiy1.cc:27017,Ruiy2.cc:7788/?replicaSet=byRuiy
Connection String Options Crrrent pass

Start live Battle
为了保证大家能愉快的在这一块玩耍,请确保你的MongoDB C driver已经正确安装,Ruiy Tip("Action:Behavior",{"be a light sleeper!",,,,,}),见图吧,说多了就是废话了!

1,Example01
emoving a document from a collection

Total Cost Of Ownership

Exec Command

未完待续!

另一警醒篇

http://www.cnblogs.com/ruiy/p/mongoDbStatementBasic.html

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值