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集群(二)—— 副本集> 介绍了副本集的配置,这篇文章深入研究一下副本集的内部机制.还是带着副本集的问题来看吧! 副本集故障转移,主节点是如何选举的? ...
随机推荐
- ASP.NET全局文件与防盗链
添加Web→全局应用程序类,注 文件名不要改 Global.asax 全局文件是对Web应用声明周期的一个事件响应的地方,将Web应用启动时初始化的一些代码写到 Application_Start中, ...
- mini2440移植uboot-2008.10 (二) DM9000网卡驱动移植
还是利用 mini2440移植uboot-2008.10 (一) 修改好的代码 通过观察可以发现,mini2400使用的网卡芯片是DM9000,在uboot-2008.10源码中已经支持该芯片的驱动 ...
- 记录创建企业Wiki的几个开源项目
很多著名的企业Wiki都是开源产品,如Foswiki(基于Perl),TWiki(基于Perl)等,另外有Mindtouch(基于PHP, C#),Confluence(基于Java)等.维基道的Wi ...
- 【PHP】解决html网页乱码问题
在自己制作一个网页时,时常会遇到网页乱码的问题. 其实导致网页乱码主要有几个原因,以下给出解决方法. 1.HTML的字符编码问题 该问题较常见,也是最明显和最容易解决的. 在网页<head> ...
- Python3 字符编码
编码 字符串是一种数据类型,但是,字符串比较特殊的是还有一个编码问题. 因为计算机只能处理数字,如果要处理文本,就必须先把文本转换为数字才能处理.最早的计算机在设计时采用8个比特(bit)作为一个字节 ...
- centos 软件安装 删除
centos的软件安装大致可以分为两种类型: [centos]rpm文件安装,使用rpm指令 类似[ubuntu]deb文件安装,使用dpkg指令 [centos]yum安装 类似[ubuntu ...
- 数组-去重、排序方法、json排序
1.数组去重 /*方法一: 1,'1' 会被认为是相同的; 所有hash对象,如:{x;1},{y:1}会被认为是相同的 //10ms */ Array.prototype.unique=functi ...
- python入门 第二天笔记
程序主文件标志if __name__=="__main__": 在程序执行python 1.py 时候 程序1.py __name__ 为 main调用其他文件是,__name__ ...
- gcc向待编译源文件传入参数的方法
gcc有两种方法向待编译源文件传入参数 第一种 利用–Dmacro=name 编译选项,详见gcc -D选项 第二种 利用链接脚本(*.lds)传入参数,类似于ADS的编译器参数可以被待编译源文件调用 ...
- mvc4 membership, [Win32Exception (0x80004005): The system cannot find the file specified]
public class UsersContext : DbContext { public UsersContext() : base("conn1") //change the ...