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集群(二)—— 副本集> 介绍了副本集的配置,这篇文章深入研究一下副本集的内部机制.还是带着副本集的问题来看吧! 副本集故障转移,主节点是如何选举的? ...
随机推荐
- 解决UIScrollView 的点击事件
目前有两种方法 第一种 通过 Category 扩展 UIScrollView 对象,添加触摸事件,(不建议,后续扩展不方便)代码如下 @implementation UIScrollView (Ex ...
- mysql 5.7安装脚本
[root@HE2 ~]# cat mysql_auto_install.sh ###### 二进制自动安装数据库脚本root密码MANAGER将脚本和安装包放在/root目录即可########## ...
- C#基础(一)——C#中反斜杠/n与/r的区别
最近在公司实习的过程中,遇到了字符串换行的问题,百度了一下,发现字符串换行的问题还挺多,总结一下最基本的点,以防忘记. \n—>换行符(New Line),作用为换行符后面的字符串显示到“下一行 ...
- MySQL事务隔离级别初探
MySQL有四种隔离级别,分别是: READ UNCOMMITTED(未提交读) READ COMMITTED(提交读) REPEATABLE READ (可重复读) SERIALIZABLE(可串行 ...
- Leetcode 解题 Add Two Numbers Python
原题: You are given two linked lists representing two non-negative numbers. The digits are stored in r ...
- SQL 多条件查询
网上有不少人提出过类似的问题:“看到有人写了WHERE 1=1这样的SQL,到底是什么意思?”.其实使用这种用法的开发人员一般都是在使用动态组装的SQL.让我们想像如下的场景:用户要求提供一个灵活的查 ...
- 【转载】db blocks gets & consistent gets
LOGIC IO(逻辑读次数)= db block gets + consistent gets consistent get : 在一致读模式下所读的快数,包括从回滚段读的快数. db block ...
- Spring和Hibernate相遇
Spring是一个很贪婪的家伙,看到他的长长的jar包列表就知道了,其实对于hibernate的所有配置都是可以放在Spring中来进行得,但是我还是坚持各自分明,Spring只是负责自动探测声明类( ...
- web design tools
https://www.google.com/webdesigner/ http://html.adobe.com/edge/inspect/ http://www.creativebloq.com/ ...
- 一篇文章让你读懂 OpenStack 的起源、架构和应用
OpenStack 是一个面向 IaaS 层的开源项目,用于实现公有云和私有云的部署及管理.拥有众多大公司的行业背书和数以千计的社区成员, OpenStack 被看作是云计算的未来.目前 OS 基金会 ...