安装配置
首先到官网 https://www.mongodb.org/downloads 选择合适的安装包,下载后解压缩:
wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-rhel62-3.0.7.tgz tar -zxvf mongodb-linux-x86_64-rhel62-3.0.7.tgz #重命名并移动到/opt目录 mv mongodb-linux-x86_64-rhel62-3.0.7 mongodb mv mongodb /opt #创建数据库文件目录及日志文件 mkdir /opt/mongodb/data mkdir /opt/mongodb/logs touch /opt/mongodb/logs/log #开机自启动服务 echo "/opt/mongodb/bin/mongod --dbpath=/opt/mongodb/data --logpath=/opt/mongodb/logs/log --logappend --port=27017" >> /etc/rc.local #共享客户端登录 cp /opt/mongodb/bin/mongo /usr/bin reboot mongo MongoDB shell version: 3.0.7 connecting to: test >
mongostat监控
cd /opt/mongodb/bin/ ./mongostat
inserts
The number of objects inserted into the database per second. If followed by an asterisk (e.g. *), the datum refers to a replicated operation.
query
The number of query operations per second.
update
The number of update operations per second.
delete
The number of delete operations per second.
getmore
The number of get more (i.e. cursor batch) operations per second.
command
The number of commands per second. On slave and secondary systems, mongostat presents two values separated by a pipe character (e.g. |), in the form of local|replicated commands.
flushes
The number of fsync operations per second.
mapped
The total amount of data mapped in megabytes. This is the total data size at the time of the last mongostat call.
size
The amount of virtual memory in megabytes used by the process at the time of the last mongostat call.
non-mapped
The total amount of virtual memory excluding all mapped memory at the time of the last mongostat call.
res
The amount of resident memory in megabytes used by the process at the time of the last mongostat call.
faults
Changed in version 2.1.
The number of page faults per second.
Before version 2.1 this value was only provided for MongoDB instances running on Linux hosts.
locked
The percent of time in a global write lock.
Changed in version 2.2: The locked db field replaces the locked % field to more appropriate data regarding the database specific locks in version 2.2.
locked db
New in version 2.2.
The percent of time in the per-database context-specific lock. mongostat will report the database that has spent the most time since the last mongostat call with a write lock.
This value represents the amount of time that the listed database spent in a locked state combined with the time that the mongod spent in the global lock. Because of this, and the sampling method, you may see some values greater than 100%.
idx miss
The percent of index access attempts that required a page fault to load a btree node. This is a sampled value.
qr
The length of the queue of clients waiting to read data from the MongoDB instance.
qw
The length of the queue of clients waiting to write data from the MongoDB instance.
ar
The number of active clients performing read operations.
aw
The number of active clients performing write operations.
netIn
The amount of network traffic, in bytes, received by the MongoDB instance.
This includes traffic from mongostat itself.
netOut
The amount of network traffic, in bytes, sent by the MongoDB instance.
This includes traffic from mongostat itself.
conn
The total number of open connections.
参考资料
https://docs.mongodb.org/manual
相关推荐
在本文中,我们将深入探讨MongoDB的安装配置、DOS命令行操作以及如何使用可视化工具MongoDB Compass进行数据库管理。 1. **MongoDB安装配置启动** MongoDB的安装通常包括下载最新稳定版的安装包,根据操作系统(如...
### MongoDB安装配置详解 #### 一、MongoDB简介 MongoDB是一种非常流行的开源NoSQL数据库系统,使用C++语言编写而成。它支持分布式文件存储,能够处理大量的数据,并且易于扩展。MongoDB的一个显著特点在于它能够...
Windows下mongodb安装配置
在这个主题中,我们将深入探讨MongoDB的安装配置以及如何使用Java进行操作。 首先,让我们看看《Mongodb安装.doc》。这份文档应该详细介绍了在各种操作系统(如Windows、Linux或macOS)上安装MongoDB的步骤。安装...
### MongoDB 安装与配置详解及使用MongoVUE进行连接 #### 一、MongoDB简介与安装 **MongoDB** 是一种开源文档型数据库,它使用JSON格式的文档存储数据,具有高性能、高可用性和易扩展性等特点。适用于大数据量、高...
mongodb在Linux下安装配置,集群搭建,分片持久化等,MongoDB安装和配置_for_Linux.doc
在本文中,我们将深入探讨 MongoDB 的安装配置过程,主从复制机制,以及备份与恢复策略。 ### 安装配置 安装 MongoDB 的步骤如下: 1. **下载 MongoDB**:首先,你需要从 MongoDB 官方网站或者通过 `wget` 命令...
2. **解压与配置**:解压缩下载的文件,创建相应的目录结构,如`C:\Program Files\mongodb\bin`、`C:\Program Files\mongodb\data\db`和`C:\Program Files\mongodb\data\log`。 3. **创建日志文件**:在`log`目录下...
Mongodb安装https配置文档
MongoDB在windows和linux安装配置具体步骤和方法
MongoDB 配置文件标准化与三种通常的启动方式介绍 MongoDB 的配置文件标准化是指在 MongoDB 中配置文件的标准化设置,以便更好地管理和维护 MongoDB 数据库。配置文件是 MongoDB 的核心组件之一,它定义了 MongoDB ...
#### 二、MongoDB安装配置 ##### 2.1 安装依赖包 首先确保系统已安装必要的依赖包。可以通过以下命令来安装: ```bash yum install -y git gcc gcc-c++ make automake autoconf libtool pcre pcre-devel zlib zlib...
MongoDB 安装与配置主从关系 MongoDB 是一个基于分布式文件存储的开源文档数据库,允许用户灵活地存储、处理和分析数据。以下是 MongoDB 安装与配置主从关系的详细步骤和相关知识点。 安装 MongoDB 在 RedHat:...
### MongoDB集群配置详解 #### 一、MongoDB集群与分片概述 MongoDB是一种非常流行的非关系型数据库系统,以其灵活的数据模型、高性能和可扩展性而受到广泛欢迎。随着数据量的增长,单一MongoDB实例可能无法满足高...
1.2、-MongoDB安装配置.mp4 1.3、-MongoDB?shell详.mp4 1.4、-MongoDB文档、集合、数据库的概念.mp4 1.5、-MongoDB数据类型.mp4 123.txt 2.1、_MongoDB增、删、改文档】.mp4 2.2、-MongoDB查询语法1.mp4 2.3...
关于mongoDB环境的配置,包括windows、liunx和苹果系统。
**二、MongoDB配置文件** MongoDB的配置文件通常名为`mongod.conf`,位于安装目录下的`bin`或`data`子目录。这个文件控制MongoDB实例的行为,包括数据存储位置、端口设置、日志记录等。 1. **基本配置选项**: - `...
在生产环境中,通常会将MongoDB配置为Windows服务,以便在系统启动时自动运行。可以使用`--install`参数安装服务,例如:`mongod.exe --dbpath E:\mongodb\data --install`。然后使用`net start MongoDB`启动服务,...