MongoDB 系列 - 安装(1)

2020-12-16  本文已影响0人  嗚嗚雲

基本介绍

MongoDB是一个基于分布式文件存储的数据库。由C++语言编写。旨在为WEB应用提供可扩展的高性能数据存储解决方案。MongoDB是一个介于关系数据库和非关系数据库(nosql)之间的产品,是非关系数据库当中功能最丰富,最像关系数据库的。

**对我来讲最大的优势 : 增加字段不用改表结构,学习成本极低 **

适用场景

应用特征 Yes / No
需求会变,数据模型无法确定,想快速迭代开发
需要2000-3000以上的读写QPS(更高也可以)
需要TB甚至 PB 级别数据存储
发展迅速,需要能快速水平扩展
要求存储的数据不丢失
需要99.999%高可用
不需要事务及复杂 join 支持

如果上述有1个 Yes,可以考虑 MongoDB,2个及以上的 Yes,选择MongoDB绝不会后悔。

image.png image.png

-安装命令

rpm -ivh mongodb-org-mongos-4.4.2-1.el7.x86_64.rpm mongodb-org-server-4.4.2-1.el7.x86_64.rpm mongodb-org-shell-4.4.2-1.el7.x86_64.rpm
# mongod.conf

# for documentation of all options, see:
#   http://docs.mongodb.org/manual/reference/configuration-options/

# where to write logging data.
systemLog:
  destination: file
  logAppend: true
  path: /data/mongo/logs/mongod.log

# Where and how to store data.
storage:
  dbPath: /data/mongo/data
  journal:
    enabled: true
#  engine:
#  wiredTiger:

# how the process runs
processManagement:
  fork: true  # fork and run in background
  pidFilePath: /var/run/mongodb/mongod.pid  # location of pidfile
  timeZoneInfo: /usr/share/zoneinfo

# network interfaces
net:
  port: 27017
  bindIp: 0.0.0.0 # Enter 0.0.0.0,:: to bind to all IPv4 and IPv6 addresses or, alternatively, use the net.bindIpAll setting.
  #bindIp: 127.0.0.1  # Enter 0.0.0.0,:: to bind to all IPv4 and IPv6 addresses or, alternatively, use the net.bindIpAll setting.


#security:

#operationProfiling:

#replication:

#sharding:

## Enterprise-Only Options

#auditLog:

#snmp:
上一篇 下一篇

猜你喜欢

热点阅读