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集群(二)—— 副本集> 介绍了副本集的配置,这篇文章深入研究一下副本集的内部机制.还是带着副本集的问题来看吧! 副本集故障转移,主节点是如何选举的? ...
随机推荐
- OpenJudge 2749 分解因数
1.链接地址: http://bailian.openjudge.cn/practice/2749/ 2.题目: 总时间限制: 1000ms 内存限制: 65536kB 描述 给出一个正整数a,要求分 ...
- ASP.NET获取上传图片的大小
1.采用客户端javascript可以取得图片大小 <input id="FileUpload" type="file" size="30&qu ...
- windows下使用xampp一键安装apache+php运行环境
感谢浏览,欢迎交流=.= 想为我老爸开发一套库存管理系统,借此机会打算使用下ext+php+apache+linux环境尝尝鲜. 为了在windows搭建本地开发测试环境,官网下载xampp,一键安装 ...
- dom例子
//凡是html标签中的属性和值是一样的,那么在js中用true或者false 1,阅读协议倒计时 <input type="button" name="name& ...
- JS将搜索的关键字高亮显示实现代码
这篇文章介绍了JS将搜索的关键字高亮显示实现代码,有需要的朋友可以参考一下 用JS让文章内容指定的关键字加亮 是这样的.. 现在有这些关键字:美容,生活,购物 当在文章里头出现这些关键字,就把它加亮显 ...
- validate插件的使用
方法如下: 插件: jquery.validate.js jquery.validate.custom.js bootstrap html代码: <form id="form_name ...
- Python httpsqs封装类
''' httpsqs队列封装 @author xp_go@qq.com a = HttpsqsClient('192.168.0.218','1218','httpsqsmmall.com') pr ...
- 在Django中使用Mako模板
用了一个月后,终于忍受不了Django的模板了.主要原因是模板内不能运行原生的python语句,所以用起来总感觉被人绑住手脚,遍历个字典都要搞半天. 所以决定用第三方的模板.查了一下,django用的 ...
- hdu 5612 Baby Ming and Matrix games
Baby Ming and Matrix games 题意: 给一个矩形,两个0~9的数字之间隔一个数学运算符(‘+’,’-‘,’*’,’/’),其中’/’表示分数除,再给一个目标的值,问是否存在从一 ...
- STM32库函数开发使用总结
一.外设常具备的几类寄存器 控制寄存器xxx_CR (Control/Configuration Register): 用来配置.控制响应外设的工作方式,如GPIOx_CRL.AFIO_EXTICR1 ...