码迷,mamicode.com
首页 > 数据库 > 详细

centos6.5安装mongodb

时间:2014-12-25 18:13:51      阅读:269      评论:0      收藏:0      [点我收藏+]

标签:

搜索正面五个文件,由于MongoDB的redhat国外镜像访问非常慢,下载安装suse版本并安装: 

mongodb-org-2.6.6-1.i686.rpm

mongodb-org-mongos-2.6.6-1.i686.rpm

mongodb-org-server-2.6.6-1.i686.rpm

mongodb-org-shell-2.6.6-1.i686.rpm

mongodb-org-tools-2.6.6-1.i686.rpm

验证环境变量是否生效: 

$ mongod -version 
db version v2.6.0 
2014-04-14T02:53:01.082+0000 git version: 1c1c76aeca21c5983dc178920f5052c298db616c 
运行MongoDB:
创建数据目录 
$ mkdir -p mongodb/data/db 
要确保mongod对数据目录有读写权限。 
运行MongoDB(指定建立的数据目录) 
$ mongod --dbpath /home/chuser/mongodb/data & 
6、验证MongoDB是否正常运行 

[root@admin cache]# mongo
MongoDB shell version: 2.6.6
connecting to: test
Server has startup warnings:
2014-12-25T16:46:16.374+0800 [initandlisten]
2014-12-25T16:46:16.374+0800 [initandlisten] ** NOTE: This is a 32 bit MongoDB binary.
2014-12-25T16:46:16.374+0800 [initandlisten] ** 32 bit builds are limited to less than 2GB of data (or less with --journal).
2014-12-25T16:46:16.374+0800 [initandlisten] ** Note that journaling defaults to off for 32 bit and is currently off.
2014-12-25T16:46:16.374+0800 [initandlisten] ** See http://dochub.mongodb.org/core/32bit
2014-12-25T16:46:16.374+0800 [initandlisten]

> show databases;show databases;
admin (empty)
local 0.078GB

 

centos6.5安装mongodb

标签:

原文地址:http://www.cnblogs.com/x113/p/4185066.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!