CentOS 6.5 x64系统中安装MongoDB 2.6.0二进制发行版教程


当前第2页 返回上一页

创建数据目录

代码如下:

$ mkdir -p mongodb/data/db

要确保mongod对数据目录有读写权限。
运行MongoDB(指定建立的数据目录)
代码如下:

$ mongod --dbpath /home/chuser/mongodb/data &

6、验证MongoDB是否正常运行

代码如下:

$ mongo
MongoDB shell version: 2.6.0
connecting to: test
2014-04-14T03:40:59.560+0000 [initandlisten] connection accepted from 127.0.0.1:39014 #1 (1 connection now open)
Welcome to the MongoDB shell.
For interactive help, type "help".
For more comprehensive documentation, see
http://docs.mongodb.org/
Questions? Try the support group
http://groups.google.com/group/mongodb-user
> show databases;
admin  (empty)
local  0.078GB


打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...