MongoDB 3.2 for RHEL6.4 installation

本文涉及的产品
云数据库 MongoDB,独享型 2核8GB
推荐场景:
构建全方位客户视图
简介:   从来不认为任何一门技术简单,尤其对于初次接触者;也许是因为开源,MongoDB不像Oracle数据库那么规范化,都有对应的详细的操作文档,按照文档来,就能达到目的,我觉得MongoDB在这方面差很多。
  从来不认为任何一门技术简单,尤其对于初次接触者;也许是因为开源,MongoDB不像Oracle数据库那么规范化,都有对应的详细的操作文档,按照文档来,就能达到目的,我觉得MongoDB在这方面差很多。下面,我以Oracle的安装思路总结下MongoDB的安装过程。
  1、创建mongodb的管理用户
 注意:有必要强调的是,LINUX版本最好是6.4以上,在REDHAT5.5上,我尝试安装,最后要求GLIBC版本最低是2.10,要升级GLIBC,风险很大。

[root@mongo ~]# uname -a

Linux mongo 2.6.32-358.el6.x86_64 #1 SMP Tue Jan 29 11:47:41 EST 2013 x86_64 x86_64 x86_64 GNU/Linux

[root@mongo ~]#

[root@mongo ~]#useradd -u 500 mongo

[root@mongo ~]#passwd mongo
 2、创建mongodb的安装目录
[root@mongo ~]# cd /opt/mongo/

[root@mongo ~]#chown -R mongo:mongo /opt/mongo

[root@mongo ~]#chmod -R 775 /opt/mongo

[mongo@mongo mongo]$ ls

soft

[mongo@mongo mongo]$ mkdir data

[mongo@mongo mongo]$ ls

data  soft

[mongo@mongo mongo]$ mkdir logs

[mongo@mongo mongo]$ ls

data  logs  soft

[mongo@mongo mongo]$ ls -l

total 12

drwxrwxr-x. 2 mongo mongo 4096 Jun 11 01:08 data  #MongoDB的数据文件存放目录

drwxrwxr-x. 2 mongo mongo 4096 Jun 11 01:08 logs  #MongoDB的日志文件存放目录,类似ORACLE的ALERT日志文件

drwxrwxr-x. 2 mongo mongo 4096 Jun 11 01:08 soft #MongoDB的软件安装目录
 3、mongodb管理用户登录服务器,上传安装介质并解压
 注意:这里需要强调,MongoDB的安装版本必须对应特定的操作系统平台及版本,这里我用 mongodb-linux-x86_64-rhel62-3.2.7.tgz

[mongo@mongo ~]$ cd /opt/mongo/

[mongo@mongo mongo]$ ls

mongodb-linux-x86_64-rhel62-3.2.7.tgz

[mongo@mongo mongo]$ tar -xvf mongodb-linux-x86_64-rhel62-3.2.7.tgz

mongodb-linux-x86_64-rhel62-3.2.7/README

mongodb-linux-x86_64-rhel62-3.2.7/THIRD-PARTY-NOTICES

mongodb-linux-x86_64-rhel62-3.2.7/MPL-2

mongodb-linux-x86_64-rhel62-3.2.7/GNU-AGPL-3.0

mongodb-linux-x86_64-rhel62-3.2.7/bin/mongodump

mongodb-linux-x86_64-rhel62-3.2.7/bin/mongorestore

mongodb-linux-x86_64-rhel62-3.2.7/bin/mongoexport

mongodb-linux-x86_64-rhel62-3.2.7/bin/mongoimport

mongodb-linux-x86_64-rhel62-3.2.7/bin/mongostat

mongodb-linux-x86_64-rhel62-3.2.7/bin/mongotop

mongodb-linux-x86_64-rhel62-3.2.7/bin/bsondump

mongodb-linux-x86_64-rhel62-3.2.7/bin/mongofiles

mongodb-linux-x86_64-rhel62-3.2.7/bin/mongooplog

mongodb-linux-x86_64-rhel62-3.2.7/bin/mongoperf

mongodb-linux-x86_64-rhel62-3.2.7/bin/mongod

mongodb-linux-x86_64-rhel62-3.2.7/bin/mongos

mongodb-linux-x86_64-rhel62-3.2.7/bin/mongo

[mongo@mongo ~]$mv mongodb-linux-x86_64-rhel62-3.2.7 soft
 4、修改管理用户下的环境变量
[mongo@mongo ~]$ cat .bash_profile

# .bash_profile

# Get the aliases and functions

if [ -f ~/.bashrc ]; then

         . ~/.bashrc

fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH

export PATH=$PATH:/opt/mongo/soft/bin

export MONGO_BASE=/opt/mongo

export MONGO_DATA=/opt/mongo/data

export MONGO_LOGS=/opt/mongo/logs
  5、检查mongo对glibc的要求
 注意:这里要求GLIBC版本号必须大于等于2.10

[root@mongo ~]# rpm -qi glibc

Name        : glibc                        Relocations: (not relocatable)

Version     : 2.12                              Vendor: Red Hat, Inc.

Release     : 1.107.el6                     Build Date: Tue 20 Nov 2012 08:22:45 PM PST

Install Date: Sat 11 Jun 2016 08:41:30 AM PDT      Build Host: x86-023.build.eng.bos.redhat.com

Group       : System Environment/Libraries   Source RPM: glibc-2.12-1.107.el6.src.rpm

Size        : 12947270                         License: LGPLv2+ and LGPLv2+ with exceptions and GPLv2+

Signature   : RSA/8, Tue 29 Jan 2013 07:00:11 AM PST, Key ID 199e2f91fd431d51

Packager    : Red Hat, Inc.

URL         : http://sources.redhat.com/glibc/

Summary     : The GNU libc libraries

Description :

The glibc package contains standard libraries which are used by

multiple programs on the system. In order to save disk space and

memory, as well as to make upgrading easier, common system code is

kept in one place and shared between programs. This particular package

contains the most important sets of shared libraries: the standard C

library and the standard math library. Without these two libraries, a

Linux system will not function.
  6、解决libssl.so.10问题
 通过mongod的可用性发现 libssl.so.10问题,此问题不解决,MongoDB无法启动
[mongo@mongo ~]$ mongod --help
mongod: error while loading shared libraries: libssl.so.10: cannot open shared object file: No such file or director
  解决 libssl.so.10 问题,使用 root 建立软链接即可

[root@mongo lib]# pwd

/usr/lib

[root@mongo lib]# ls -l libss*

-rwxr-xr-x 1 root root 205052 Jul 20  2009 libssl3.so

-rw-r--r-- 1 root root 448536 Sep  4  2009 libssl.a

lrwxrwxrwx 1 root root     26 Feb 18  2014 libssl.so -> ../../lib/libssl.so.0.9.8e

[root@mongo lib64]# pwd

/lib64

[root@mongo lib64]# ln -s /lib64/libssl.so.0.9.8e /usr/lib/libssl.so.10

[root@mongo lib]# ls -l libss*

-rwxr-xr-x 1 root root 205052 Jul 20  2009 libssl3.so

-rw-r--r-- 1 root root 448536 Sep  4  2009 libssl.a

lrwxrwxrwx 1 root root     26 Feb 18  2014 libssl.so -> ../../lib/libssl.so.0.9.8e

lrwxrwxrwx 1 root root     23 Jun 11 11:36 libssl.so.10 -> /lib64/libssl.so.0.9.8e
 7、解决libcrypto.so.10问题
  通过 mongod的可用性发现 libcrypto.so.10问题,此问题不解决,MongoDB无法启动
 
解决 libcrypto.so.10 问题,使用 root 建立软链接即可

[root@mongo lib]# pwd

/usr/lib

[root@mongo lib]# ls -l libcryp*

-rw-r--r-- 1 root root   47750 Sep  4  2009 libcrypt.a

-rw-r--r-- 1 root root 2416230 Sep  4  2009 libcrypto.a

lrwxrwxrwx 1 root root      29 Feb 18  2014 libcrypto.so -> ../../lib/libcrypto.so.0.9.8e

lrwxrwxrwx 1 root root      22 Feb 18  2014 libcryptsetup.so.0 -> libcryptsetup.so.0.0.0

-rwxr-xr-x 1 root root   51276 Jul  2  2009 libcryptsetup.so.0.0.0

lrwxrwxrwx 1 root root      23 Feb 18  2014 libcrypt.so -> ../../lib/libcrypt.so.1

[root@mongo lib64]# pwd

/lib64

[root@mongo lib64]# ln -s /lib64/libcrypto.so.0.9.8e /usr/lib/libcrypto.so.10

[root@mongo lib]# ls -l libcryp*

-rw-r--r-- 1 root root   47750 Sep  4  2009 libcrypt.a

-rw-r--r-- 1 root root 2416230 Sep  4  2009 libcrypto.a

lrwxrwxrwx 1 root root      29 Feb 18  2014 libcrypto.so -> ../../lib/libcrypto.so.0.9.8e

lrwxrwxrwx 1 root root      26 Jun 11 11:43 libcrypto.so.10 -> /lib64/libcrypto.so.0.9.8e

lrwxrwxrwx 1 root root      22 Feb 18  2014 libcryptsetup.so.0 -> libcryptsetup.so.0.0.0

-rwxr-xr-x 1 root root   51276 Jul  2  2009 libcryptsetup.so.0.0.0

lrwxrwxrwx 1 root root      23 Feb 18  2014 libcrypt.so -> ../../lib/libcrypt.so.1
 8、测通MongoDB的mongod可用性
[mongo@mongo ~]$ mongod --help

Options:

General options:

  -h [ --help ]                         show this usage information

  --version                             show version information

  -f [ --config ] arg                   configuration file specifying

                                        additional options

  -v [ --verbose ] [=arg(=v)]           be more verbose (include multiple times

                                        for more verbosity e.g. -vvvvv)

  --quiet                               quieter output

  --port arg                            specify port number - 27017 by default

  --bind_ip arg                         comma separated list of ip addresses to

                                        listen on - all local ips by default

  --ipv6                                enable IPv6 support (disabled by

                                        default)

  --maxConns arg                        max number of simultaneous connections

                                        - 1000000 by default

  --logpath arg                         log file to send write to instead of

                                        stdout - has to be a file, not

                                        directory

  --syslog                              log to system's syslog facility instead

                                        of file or stdout

  --syslogFacility arg                  syslog facility used for mongodb syslog

                                        message

  --logappend                           append to logpath instead of

                                        over-writing

  --logRotate arg                       set the log rotation behavior

                                        (rename|reopen)

  --timeStampFormat arg                 Desired format for timestamps in log

                                        messages. One of ctime, iso8601-utc or

                                        iso8601-local

  --pidfilepath arg                     full path to pidfile (if not set, no

                                        pidfile is created)

  --keyFile arg                         private key for cluster authentication

  --noauth                              run without security

  --setParameter arg                    Set a configurable parameter

  --httpinterface                       enable http interface

  --clusterAuthMode arg                 Authentication mode used for cluster

                                        authentication. Alternatives are

                                        (keyFile|sendKeyFile|sendX509|x509)

  --nounixsocket                        disable listening on unix sockets

  --unixSocketPrefix arg                alternative directory for UNIX domain

                                        sockets (defaults to /tmp)

  --filePermissions arg                 permissions to set on UNIX domain

                                        socket file - 0700 by default

  --fork                                fork server process

  --auth                                run with security

  --jsonp                               allow JSONP access via http (has

                                        security implications)

  --rest                                turn on simple rest api

  --slowms arg (=100)                   value of slow for profile and console

                                        log

  --profile arg                         0=off 1=slow, 2=all

  --cpu                                 periodically show cpu and iowait

                                        utilization

  --sysinfo                             print some diagnostic system

                                        information

  --noIndexBuildRetry                   don't retry any index builds that were

                                        interrupted by shutdown

  --noscripting                         disable scripting engine

  --notablescan                         do not allow table scans

  --shutdown                            kill a running server (for init

                                        scripts)

Replication options:

  --oplogSize arg                       size to use (in MB) for replication op

                                        log. default is 5% of disk space (i.e.

                                        large is good)

Master/slave options (old; use replica sets instead):

  --master                              master mode

  --slave                               slave mode

  --source arg                          when slave: specify master as

                                       

  --only arg                            when slave: specify a single database

                                        to replicate

  --slavedelay arg                      specify delay (in seconds) to be used

                                        when applying master ops to slave

  --autoresync                          automatically resync if slave data is

                                        stale

Replica set options:

  --replSet arg                         arg is [/<optionalseedhostlist </optionalseedhostlist<>

                                        >]

  --replIndexPrefetch arg               specify index prefetching behavior (if

                                        secondary) [none|_id_only|all]

  --enableMajorityReadConcern           enables majority readConcern

Sharding options:

  --configsvr                           declare this is a config db of a

                                        cluster; default port 27019; default

                                        dir /data/configdb

  --configsvrMode arg                   Controls what config server protocol is

                                        in use. When set to "sccc" keeps server

                                        in legacy SyncClusterConnection mode

                                        even when the service is running as a

                                        replSet

  --shardsvr                            declare this is a shard db of a

                                        cluster; default port 27018

Storage options:

  --storageEngine arg                   what storage engine to use - defaults

                                        to wiredTiger if no data files present

  --dbpath arg                          directory for datafiles - defaults to

                                        /data/db

  --directoryperdb                      each database will be stored in a

                                        separate directory

  --noprealloc                          disable data file preallocation - will

                                        often hurt performance

  --nssize arg (=16)                    .ns file size (in MB) for new databases

  --quota                               limits each database to a certain

                                        number of files (8 default)

  --quotaFiles arg                      number of files allowed per db, implies

                                        --quota

  --smallfiles                          use a smaller default file size

  --syncdelay arg (=60)                 seconds between disk syncs (0=never,

                                        but not recommended)

  --upgrade                             upgrade db if needed

  --repair                              run repair on all dbs

  --repairpath arg                      root directory for repair files -

                                        defaults to dbpath

  --journal                             enable journaling

  --nojournal                           disable journaling (journaling is on by

                                        default for 64 bit)

  --journalOptions arg                  journal diagnostic options

  --journalCommitInterval arg           how often to group/batch commit (ms)

WiredTiger options:

  --wiredTigerCacheSizeGB arg           maximum amount of memory to allocate

                                        for cache; defaults to 1/2 of physical

                                        RAM

  --wiredTigerStatisticsLogDelaySecs arg (=0)

                                        seconds to wait between each write to a

                                        statistics file in the dbpath; 0 means

                                        do not log statistics

  --wiredTigerJournalCompressor arg (=snappy)

                                        use a compressor for log records

                                        [none|snappy|zlib]

  --wiredTigerDirectoryForIndexes       Put indexes and data in different

                                        directories

  --wiredTigerCollectionBlockCompressor arg (=snappy)

                                        block compression algorithm for

                                        collection data [none|snappy|zlib]

  --wiredTigerIndexPrefixCompression arg (=1)

                                        use prefix compression on row-store

                                        leaf pages
 9、启动mongodb数据库
[mongo@mongo ~]$ mongod --dbpath=$MONGO_DATA --logpath=$MONGO_LOGS/mongodb.log --logappend&

[1] 3028

[mongo@mongo ~]$
 10、检查mongodb的运行状态
[root@mongo mongo]# ps -ef|grep mongo

mongo     3028     1  1 01:31 pts/0    00:00:00 mongod --dbpath=/opt/mongo/data --logpath=/opt/mongo/logs/mongodb.log --logappend

root      3059  2443  0 01:32 pts/0    00:00:00 grep mongo
[root@mongo mongo]# cd /opt/mongo/logs

[root@mongo logs]# cat mongodb.log

2016-06-11T01:31:19.106-0700 I CONTROL  [initandlisten] MongoDB starting : pid=3028 port=27017 dbpath=/opt/mongo/data 64-bit host=mongo

2016-06-11T01:31:19.107-0700 I CONTROL  [initandlisten] db version v3.2.7

2016-06-11T01:31:19.107-0700 I CONTROL  [initandlisten] git version: 4249c1d2b5999ebbf1fdf3bc0e0e3b3ff5c0aaf2

2016-06-11T01:31:19.107-0700 I CONTROL  [initandlisten] allocator: tcmalloc

2016-06-11T01:31:19.107-0700 I CONTROL  [initandlisten] modules: none

2016-06-11T01:31:19.107-0700 I CONTROL  [initandlisten] build environment:

2016-06-11T01:31:19.107-0700 I CONTROL  [initandlisten]     distarch: x86_64

2016-06-11T01:31:19.107-0700 I CONTROL  [initandlisten]     target_arch: x86_64

2016-06-11T01:31:19.107-0700 I CONTROL  [initandlisten] options: { storage: { dbPath: "/opt/mongo/data" }, systemLog: { destination: "file", logAppend: true, path: "/opt/mongo/logs/mongodb.log" } }

2016-06-11T01:31:19.139-0700 I STORAGE  [initandlisten] wiredtiger_open config: create,cache_size=1G,session_max=20000,eviction=(threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0),

2016-06-11T01:31:19.186-0700 I CONTROL  [initandlisten]

2016-06-11T01:31:19.186-0700 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.

2016-06-11T01:31:19.186-0700 I CONTROL  [initandlisten] **        We suggest setting it to 'never'

2016-06-11T01:31:19.186-0700 I CONTROL  [initandlisten]

2016-06-11T01:31:19.186-0700 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.

2016-06-11T01:31:19.186-0700 I CONTROL  [initandlisten] **        We suggest setting it to 'never'

2016-06-11T01:31:19.186-0700 I CONTROL  [initandlisten]

2016-06-11T01:31:19.187-0700 I FTDC     [initandlisten] Initializing full-time diagnostic data capture with directory '/opt/mongo/data/diagnostic.data'

2016-06-11T01:31:19.187-0700 I NETWORK  [HostnameCanonicalizationWorker] Starting hostname canonicalization worker

2016-06-11T01:31:19.194-0700 I NETWORK  [initandlisten] waiting for connections on port 27017
[root@mongo ~]# netstat -lanp  | grep 27017

tcp        0      0 0.0.0.0:27017               0.0.0.0:*                   LISTEN      3028/mongod        

tcp        0      0 127.0.0.1:39769             127.0.0.1:27017             ESTABLISHED 3099/mongo         

tcp        0      0 127.0.0.1:27017             127.0.0.1:39769             ESTABLISHED 3028/mongod        

unix  2      [ ACC ]     STREAM     LISTENING     23441  3028/mongod         /tmp/mongodb-27017.sock

 11、登录MongoDB数据库
[mongo@mongo ~]$ mongo

MongoDB shell version: 3.2.7

connecting to: test

Welcome to the MongoDB shell.

For interactive help, type "help".

For more comprehensive documentation, see

         http://docs.mongodb.org/

Questions? Try the support group

         http://groups.google.com/group/mongodb-user

Server has startup warnings:

2016-06-11T01:31:19.186-0700 I CONTROL  [initandlisten]

2016-06-11T01:31:19.186-0700 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.

2016-06-11T01:31:19.186-0700 I CONTROL  [initandlisten] **        We suggest setting it to 'never'

2016-06-11T01:31:19.186-0700 I CONTROL  [initandlisten]

2016-06-11T01:31:19.186-0700 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.

2016-06-11T01:31:19.186-0700 I CONTROL  [initandlisten] **        We suggest setting it to 'never'

2016-06-11T01:31:19.186-0700 I CONTROL  [initandlisten]


 登录后,MongoDB要求关闭操作系统的 transparent_hugepage特性(这里可以放在MongoDB安装前,系统调整时执行),需要以root身份执行以下命令:
echo never > /sys/kernel/mm/transparent_hugepage/enabled
echo never > /sys/kernel/mm/transparent_hugepage/defrag
[root@mongo transparent_hugepage]# echo never > /sys/kernel/mm/transparent_hugepage/enabled
[root@mongo transparent_hugepage]# echo never > /sys/kernel/mm/transparent_hugepage/defrag
 12、重启MongoDB数据库并测试数据库可用性
[mongo@mongo ~]$ mongo
MongoDB shell version: 3.2.7
connecting to: test
Server has startup warnings: 
2016-06-13T18:58:21.838-0700 I CONTROL  [initandlisten] 
2016-06-13T18:58:21.839-0700 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
2016-06-13T18:58:21.839-0700 I CONTROL  [initandlisten] **        We suggest setting it to 'never'
2016-06-13T18:58:21.839-0700 I CONTROL  [initandlisten] 
2016-06-13T18:58:21.839-0700 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
2016-06-13T18:58:21.839-0700 I CONTROL  [initandlisten] **        We suggest setting it to 'never'
2016-06-13T18:58:21.839-0700 I CONTROL  [initandlisten] 
> use admin
switched to db admin
> db.shutdownServer();
server should be down...
2016-06-13T19:04:21.290-0700 I NETWORK  [thread1] trying reconnect to 127.0.0.1:27017 (127.0.0.1) failed
2016-06-13T19:04:21.291-0700 W NETWORK  [thread1] Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused
2016-06-13T19:04:21.291-0700 I NETWORK  [thread1] reconnect 127.0.0.1:27017 (127.0.0.1) failed failed 
> exit
bye
[1]+  Done                    mongod --dbpath=$MONGO_DATA --logpath=$MONGO_LOGS/mongodb.log --logappend
[mongo@mongo ~]$ mongod --dbpath=$MONGO_DATA --logpath=$MONGO_LOGS/mongodb.log --logappend&
[1] 40476
[mongo@mongo ~]$ mongo
MongoDB shell version: 3.2.7
connecting to: test

> show db

local  0.000GB

> use zhul

switched to db zhul

> show dbs

local  0.000GB

> db.createCollection("test")

{ "ok" : 1 }

> show dbs

local  0.000GB

zhul   0.000GB
 安装成功!
相关实践学习
MongoDB数据库入门
MongoDB数据库入门实验。
快速掌握 MongoDB 数据库
本课程主要讲解MongoDB数据库的基本知识,包括MongoDB数据库的安装、配置、服务的启动、数据的CRUD操作函数使用、MongoDB索引的使用(唯一索引、地理索引、过期索引、全文索引等)、MapReduce操作实现、用户管理、Java对MongoDB的操作支持(基于2.x驱动与3.x驱动的完全讲解)。 通过学习此课程,读者将具备MongoDB数据库的开发能力,并且能够使用MongoDB进行项目开发。 &nbsp; 相关的阿里云产品:云数据库 MongoDB版 云数据库MongoDB版支持ReplicaSet和Sharding两种部署架构,具备安全审计,时间点备份等多项企业能力。在互联网、物联网、游戏、金融等领域被广泛采用。 云数据库MongoDB版(ApsaraDB for MongoDB)完全兼容MongoDB协议,基于飞天分布式系统和高可靠存储引擎,提供多节点高可用架构、弹性扩容、容灾、备份回滚、性能优化等解决方案。 产品详情: https://www.aliyun.com/product/mongodb
目录
相关文章
|
NoSQL Windows
mongodb 3.2.10 for windows server 2008 R2 installation
一、操作系统信息 二、集群网络环境测试 224心跳节点 253分片节点 227分片节点 三、集群环境NTP时钟检查 可以看到3个节点的时钟并不同步,接下来进行NTP时钟同步 点击windows界面右下角时间点击更改日期和时间设置 点击Internet时间 点击更改设置服务器输入:NTP服务器所在机器的IP地址,本集群选取10.
1501 0
|
2月前
|
存储 关系型数据库 MySQL
一个项目用5款数据库?MySQL、PostgreSQL、ClickHouse、MongoDB区别,适用场景
一个项目用5款数据库?MySQL、PostgreSQL、ClickHouse、MongoDB——特点、性能、扩展性、安全性、适用场景比较
|
3月前
|
存储 NoSQL 关系型数据库
非关系型数据库-MongoDB技术(二)
非关系型数据库-MongoDB技术(二)
|
3月前
|
NoSQL 关系型数据库 MongoDB
非关系型数据库-MongoDB技术(一)
非关系型数据库-MongoDB技术(一)
|
6天前
|
存储 JSON NoSQL
学习 MongoDB:打开强大的数据库技术大门
MongoDB 是一个基于分布式文件存储的文档数据库,由 C++ 编写,旨在为 Web 应用提供可扩展的高性能数据存储解决方案。它与 MySQL 类似,但使用文档结构而非表结构。核心概念包括:数据库(Database)、集合(Collection)、文档(Document)和字段(Field)。MongoDB 使用 BSON 格式存储数据,支持多种数据类型,如字符串、整数、数组等,并通过二进制编码实现高效存储和传输。BSON 文档结构类似 JSON,但更紧凑,适合网络传输。
32 15
|
14天前
|
存储 NoSQL 关系型数据库
阿里云数据库MongoDB版助力信也科技 打造互联网金融企业样板
我们的风控系统引入阿里云数据库MongoDB版后,解决了特征类字段灵活加减的问题,大大提高了开发效率,极大的提升了业务用户体验,获得了非常好的效果
阿里云数据库MongoDB版助力信也科技 打造互联网金融企业样板
|
1月前
|
NoSQL Cloud Native atlas
探索云原生数据库:MongoDB Atlas 的实践与思考
【10月更文挑战第21天】本文探讨了MongoDB Atlas的核心特性、实践应用及对云原生数据库未来的思考。MongoDB Atlas作为MongoDB的云原生版本,提供全球分布式、完全托管、弹性伸缩和安全合规等优势,支持快速部署、数据全球化、自动化运维和灵活定价。文章还讨论了云原生数据库的未来趋势,如架构灵活性、智能化运维和混合云支持,并分享了实施MongoDB Atlas的最佳实践。
|
2月前
|
NoSQL Cloud Native atlas
探索云原生数据库:MongoDB Atlas 的实践与思考
【10月更文挑战第20天】本文探讨了MongoDB Atlas的核心特性、实践应用及对未来云原生数据库的思考。MongoDB Atlas作为云原生数据库服务,具备全球分布、完全托管、弹性伸缩和安全合规等优势,支持快速部署、数据全球化、自动化运维和灵活定价。文章还讨论了实施MongoDB Atlas的最佳实践和职业心得,展望了云原生数据库的发展趋势。
|
2月前
|
存储 NoSQL MongoDB
MongoDB 数据库引用
10月更文挑战第20天
24 1
|
2月前
|
存储 NoSQL Shell
MongoDB 创建数据库
10月更文挑战第12天
90 4