mongodb安装

 

linux版安装:

如果机器能联网,可采用官网安装步骤进行安装;

如果不能联网,则采用离线安装

Centos6.5离线安装:

官网下载:https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-rhel62-3.0.5.tgz

解压:tar -zxvf mongodb-linux-x86_64-rhel62-3.0.5.tgz

cd mongodb-linux-x86_64-rhel62-3.0.5/bin

单机运行:

启动mongodb server:./mongod -journal -maxConns=2400 -rest

 

客户端登录服务器

bin/mongo

执行db.foo.save({1 : “Hello world”})
然后查找db.foo.find();
看到{ "_id" : ObjectId("4e4b395986738efa2d0718b9"), "1" : "hello world" }
执行到这里恭喜你,成功安装好了mongodb

 

集群安装:

官网参考:https://docs.mongodb.org/manual/tutorial/deploy-shard-cluster/

案例参考:http://www.2cto.com/database/201307/230419.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值