basic mongodb
basic mongodb
*/-->
pre {
background-color: #2f4f4f;line-height: 1.6;
FONT: 10.5pt Consola,"Bitstream Vera Sans", Courier New, helvetica;
color:wheat;
}
.h3 {
margin-left: 10pt;
}
basic mongodb
Components
mongod
mongod is the primary daemon process for the MongoDB system. It handles
data requests, manages data format, and performs background management
operations.
--dbpath <path>
Specify a directory for the mongod instance to store its data.
Typical locations include: /srv/mongodb, /var/lib/mongodb or
/opt/mongodb
Unless specified, mongod will look for data files in the default
/data/db directory. (Windows systems use the \data\db direc‐
tory.) If you installed using a package management system. Check
the /etc/mongodb.conf file provided by your packages to see the
configuration of the dbpath.
--directoryperdb
Alters the storage pattern of the data directory to store each
database's files in a distinct folder. This option will create
directories within the --dbpath named for each directory.
Use this option in conjunction with your file system and device
configuration so that MongoDB will store data on a number of
distinct disk devices to increase write throughput or disk
capacity.
mongo
http://docs.mongodb.org/manual/tutorial/getting-started/
mongo
By default, mongo looks for a database server listening on port 27017 on the
localhost interface. To connect to a server on a different port or interface,
use the --port and --host options.
Select a database
db show dbs use mydb
Create a Collection and Insert Documents
j = { name : "mongo" }
k = { x : 3 }
db.testData.insert( j )
db.testData.insert( k )
show collections
db.testData.find()
Post by: Jalen Wang (转载请注明出处)
basic mongodb的更多相关文章
- lbs basic mongodb
MongoDB地理位置索引常用的有两种. db.places.ensureIndex({'coordinate':'2d'}) db.places.ensureIndex({'coordinate': ...
- MongoDB - Introduction of the mongo Shell
Introduction The mongo shell is an interactive JavaScript interface to MongoDB. You can use the mong ...
- mongostat用法
mongostat是mongoDB自带的工具,用于检测mongodb的运行状态. mongostat用法 Test:Test/node-131 / # mongostat --help Usage: ...
- modSecurity规则学习(七)——防止SQL注入
1.数字型SQL注入 /opt/waf/owasp-modsecurity-crs/rules/REQUEST-942-APPLICATION-ATTACK-SQLI.conf"] [lin ...
- MongoDB - basic
mongoDB basic from:http://www.tutorialspoint.com/mongodb prject:https://github.com/chenxing12/l4mong ...
- DB Intro - MongoDB Basic
mongoDB basic from:http://www.tutorialspoint.com/mongodb prject:https://github.com/chenxing12/l4mong ...
- 【MongoDB】The basic operation of Index in MongoDB
In the past four blogs, we attached importance to the index, including description and comparison wi ...
- MySQL、MongoDB、Redis数据库Docker镜像制作
MySQL.MongoDB.Redis数据库Docker镜像制作 在多台主机上进行数据库部署时,如果使用传统的MySQL的交互式的安装方式将会重复很多遍.如果做成镜像,那么我们只需要make once ...
- 搭建高可用mongodb集群(三)—— 深入副本集内部机制
在上一篇文章<搭建高可用mongodb集群(二)—— 副本集> 介绍了副本集的配置,这篇文章深入研究一下副本集的内部机制.还是带着副本集的问题来看吧! 副本集故障转移,主节点是如何选举的? ...
随机推荐
- Python之实现一个简易计算器
自己动手写计算器 一.功能分析 用户输入一个类似这样 3*( 4+ 50 )-(( 100 + 40 )*5/2- 3*2* 2/4+9)*((( 3 + 4)-4)-4) 这样的表达式,假设表达式里 ...
- 【转】使用PHP创建基本的爬虫程序
Web Crawler, 也时也称scrapers,即网络爬虫,用于自动搜索internet并从中提取 想要的内容.互联网的发展离不开它们.爬虫是搜索引擎的核心,通过智能算法发现符合 你输入的关键字的 ...
- 认识linux权限
首先,我们来了解下linux系统的用户和用户组 场景:公司里有两个项目组:小组A和小组B:A.B.C是小组A的成员,甲.乙是小组B的成员.为了保密起见,小组内的进度.文档.程序都有小组内公开.比如小组 ...
- [开发环境] Ubuntu12.04 Telnet服务设置
Ubuntu12.04默认未启用Telnet服务,配置Telnet服务步骤如下: 1. 安装和配置 安装openbsd-inetd: #sudo apt-get install openbsd-ine ...
- SVG
目前SVG在国内的使用并不常见,并且关于svg的相关js库也不多,这里指出两款svg的库Snap.svg和svg.js,Snap.svg张鑫旭的博客上有关于他的使用APi http://www.zha ...
- 【转】EXT JS MVC开发模式
原文链接:EXT JS MVC开发模式 在app(亦即根目录)文件夹下面创建controller.model.store和view文件夹,从名称上就知道他们该放置什么代码了吧.然后创建Applicat ...
- wampserver修改默认根目录
1.打开wamp/scripts/config.inc.php ,修改$wwwDir = $c_installDir.’/www’; 2.打开wamp/bin/apache/apache2.4.9/c ...
- NET Portability Analyzer
NET Portability Analyzer 分析迁移dotnet core 大多数开发人员更喜欢一次性编写好业务逻辑代码,以后再重用这些代码.与构建不同的应用以面向多个平台相比,这种方法更加容易 ...
- 解决android模拟器太大,小屏幕无法完全显示的问题
http://hi.baidu.com/conanx/blog/item/05479befd6534d03fdfa3cbb.html 安装上Android模拟器之后,开启一个Android 2.2的模 ...
- vs2010 使用SignalR 提高B2C商城用户体验(三)
vs2010 使用SignalR 提高B2C商城用户体验(三) 上一章节,我们的web即时通讯已经可以实现跨域了,但针对我们的需求,还希望,一些客户端程序可以和我们的web用户,在线聊天,所以到Sig ...