mac上安装mongodb数据库教程
1.官网下载压缩包,并解压到当地任一目录。(我的是Documents/develop/mongodb)
2.在mongodb下新建data文件夹,在data下新建db文件夹。(bin和data文件夹在一级)
3.进入bin文件夹,并设置数据库数据存放的地址变量
cd Documents/develop/mongodb/bin
./mongod --dbpath /Users/wangming/Documents/develop/mongodb/data/db
出现以下提示
2014-09-24T09:26:11.776+0800 [initandlisten] MongoDB starting : pid=1229 port=27017 dbpath=/Users/wangming/Documents/develop/mongodb/data/db 64-bit host=wangmingdeMacBook-Pro.local
2014-09-24T09:26:11.776+0800 [initandlisten]
2014-09-24T09:26:11.776+0800 [initandlisten] ** WARNING: soft rlimits too low. Number of files is 256, should be at least 1000
2014-09-24T09:26:11.776+0800 [initandlisten] db version v2.6.4
2014-09-24T09:26:11.776+0800 [initandlisten] git version: 3a830be0eb92d772aa855ebb711ac91d658ee910
2014-09-24T09:26:11.777+0800 [initandlisten] build info: Darwin bs-osx108-4 12.5.0 Darwin Kernel Version 12.5.0: Sun Sep 29 13:33:47 PDT 2013; root:xnu-2050.48.12~1/RELEASE_X86_64 x86_64 BOOST_LIB_VERSION=1_49
2014-09-24T09:26:11.777+0800 [initandlisten] allocator: system
2014-09-24T09:26:11.777+0800 [initandlisten] options: { storage: { dbPath: "/Users/wangming/Documents/develop/mongodb/data/db" } }
2014-09-24T09:26:11.785+0800 [initandlisten] journal dir=/Users/wangming/Documents/develop/mongodb/data/db/journal
2014-09-24T09:26:11.785+0800 [initandlisten] recover : no journal files present, no recovery needed
2014-09-24T09:26:11.800+0800 [FileAllocator] allocating new datafile /Users/wangming/Documents/develop/mongodb/data/db/local.ns, filling with zeroes...
2014-09-24T09:26:11.800+0800 [FileAllocator] creating directory /Users/wangming/Documents/develop/mongodb/data/db/_tmp
2014-09-24T09:26:11.829+0800 [FileAllocator] done allocating datafile /Users/wangming/Documents/develop/mongodb/data/db/local.ns, size: 16MB, took 0.029 secs
2014-09-24T09:26:11.899+0800 [FileAllocator] allocating new datafile /Users/wangming/Documents/develop/mongodb/data/db/local.0, filling with zeroes...
2014-09-24T09:26:12.075+0800 [FileAllocator] done allocating datafile /Users/wangming/Documents/develop/mongodb/data/db/local.0, size: 64MB, took 0.176 secs
2014-09-24T09:26:12.193+0800 [initandlisten] build index on: local.startup_log properties: { v: 1, key: { _id: 1 }, name: "_id_", ns: "local.startup_log" }
2014-09-24T09:26:12.194+0800 [initandlisten] added index to empty collection
2014-09-24T09:26:12.194+0800 [initandlisten] command local.$cmd command: create { create: "startup_log", size: 10485760, capped: true } ntoreturn:1 keyUpdates:0 numYields:0 reslen:37 394ms
2014-09-24T09:26:12.194+0800 [initandlisten] waiting for connections on port 27017
2014-09-24T09:26:23.841+0800 [initandlisten] connection accepted from 127.0.0.1:50778 #1 (1 connection now open)
2014-09-24T09:26:23.841+0800 [conn1] end connection 127.0.0.1:50778 (0 connections now open)
2014-09-24T09:26:23.994+0800 [initandlisten] connection accepted from 127.0.0.1:50780 #2 (1 connection now open)
2014-09-24T09:26:23.994+0800 [conn2] end connection 127.0.0.1:50780 (0 connections now open)
2014-09-24T09:27:11.814+0800 [clientcursormon] mem (MB) res:33 virt:2653
2014-09-24T09:27:11.814+0800 [clientcursormon] mapped (incl journal view):160
2014-09-24T09:27:11.814+0800 [clientcursormon] connections:0
2014-09-24T09:28:13.996+0800 [initandlisten] connection accepted from 127.0.0.1:50789 #3 (1 connection now open)
2014-09-24T09:32:11.887+0800 [clientcursormon] mem (MB) res:33 virt:2653
2014-09-24T09:32:11.887+0800 [clientcursormon] mapped (incl journal view):160
2014-09-24T09:32:11.887+0800 [clientcursormon] connections:1
2014-09-24T09:37:11.960+0800 [clientcursormon] mem (MB) res:33 virt:2653
2014-09-24T09:37:11.960+0800 [clientcursormon] mapped (incl journal view):160
2014-09-24T09:37:11.960+0800 [clientcursormon] connections:1
4.command+T新建一个终端窗口,在bin文件下输入./mongo指令
MongoDB shell version: 2.6.4
connecting to: test
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
Server has startup warnings:
2014-09-24T09:26:11.776+0800 [initandlisten]
2014-09-24T09:26:11.776+0800 [initandlisten] ** WARNING: soft rlimits too low. Number of files is 256, should be at least 1000
至此,ok了。
mac上安装mongodb数据库教程的更多相关文章
- mac下安装mongodb数据库教程
前言 由于最近在学习node+express,学习到持久化存储章节需要连接mongodb数据库,然后之前也有试过安装mongodb但是失败了,这次就找了很多资料,终于安装完成了,故此记录下来安装步骤, ...
- mac上安装mongoDb以及简单使用
年初粗略学习了下node,这好几个月没玩,突然发现已经忘完了,还是简单记录下基本知识,方便再次使用时资料查找. 一.mongoDb安装 在mac上安装了brew的情况下,可以直接执行命令 brew i ...
- 在Mac上安装MongoDB,配置全局路径
1.访问MongoDB官方下载地址 http://www.mongodb.org/downloads 2.点击“DOWNLOAD(tgz)”按钮: 3.将下载的文件压缩包解压后剪切到你的Mac中某个位 ...
- 在Mac上安装MongoDB
1.访问MongoDB官方下载地址 http://www.mongodb.org/downloads 2.点击“DOWNLOAD(tgz)”按钮: 3.将下载的文件压缩包解压后剪切到你的Mac中某个位 ...
- Mac上安装MongoDB
1.访问MongoDB官方下载地址 http://www.mongodb.org/downloads 2.点击“DOWNLOAD(tgz)”按钮: 3.将下载的文件压缩包解压后剪切到你的Mac中某个位 ...
- 【mongodb】如何在mac上安装mongoDB
1.登入MongoDB的官网 选择发布的版本 网址:https://www.mongodb.com/download-center/community 2.下载tgz的包,解压缩 3.打开终端,配置环 ...
- mac 下 安装 mongodb 数据库
1.在网上下载mongodb 安装包,官方网站 mongodb.org/downloads 2.将下载的安装文件放在指定目录下,例 User/电脑名/文件夹名... 3.解压安装包,如需改名,新建文件 ...
- 在Mac上安装mysql数据库
安装 登录MySQL网站 用dmg的方式安装.Download MySQL Community Server 或者常规方式,打开官网 : http://www.mysql.com/downloads/ ...
- mac上安装Nginx详细教程
1. 安装(可以用 brew 安装) sudo brew install nginx 2. 查看 nginx 版本 nginx -v 3. 启动 nginx sudo nginx 1也可以使用下面的命 ...
随机推荐
- IIS 5.x与ASP.NET
转自:http://www.cnblogs.com/artech/archive/2009/06/20/1507165.html 我们先来看看IIS 5.x是如何处理基于ASP.NET资源(比如.as ...
- 随笔:JavaScript函数中的对象----arguments
关于arguments 调用函数时,如果需要传参,其实参数就是一个数组,在函数体的内置对象arguments可以访问这个数组,如: arguments[0]:第一个参数 arguments[1]:第二 ...
- 小白的Python之路 day2 文件操作
文件操作 对文件操作流程 打开文件,得到文件句柄并赋值给一个变量 通过句柄对文件进行操作 关闭文件 现有文件如下 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 ...
- 【java设计模式】责任链模式
可以随时添加过滤器,并在主方法中添加删除: Main package com.tn.filter; public class Main { public static void main(String ...
- ES6之Class
ES6中的Class和JS的比起来无疑是让对象原型的写法更加清晰,更像面向对象编程的语法而已,注意一个问题ES6里面的Class的内部定义的所有方法都是不可枚举的,而且在ES6中Class不存在变量提 ...
- xml生成方式二(Xml序列化器XmlSerializer)
一.andoirdAPI提供了xml生成和解析的API: XmlSerializer xs = Xml.newSerializer();和XmlPullParser xmlPullParser = X ...
- KD树小结
很久之前我就想过怎么快速在二维平面上查找一个区域的信息,思考许久无果,只能想到几种优秀一点的暴力. Kd树就是干上面那件事的. 别的不多说,赶紧把自己的理解写下来,免得凉了. KD树的组成 以维护k维 ...
- JavaScript构造函数、继承的理解
前两天稍微深入一点点理解了原型和原型链,然后就开始有挺多疑问的: function dog() { this.name = "huahua"; } var cat = new do ...
- html统计
<!doctype html><html lang="en"> <head> <meta charset="UTF-8&quo ...
- Golang 网络爬虫框架gocolly/colly 一
Golang 网络爬虫框架gocolly/colly 一 gocolly是用go实现的网络爬虫框架,目前在github上具有3400+星,名列go版爬虫程序榜首.gocolly快速优雅,在单核上每秒可 ...