Notes on installing MongoDB using yum in CentOS 6.5
Recently, I want to try Intel's WebRTC-based collaborative communication development kit. CS_WebRTC_Conference_Server_MCU depends on MongoDB.
What is MongoDB?
MongoDB is a distributed file storage-based database. Written in C ++. It is designed to provide scalable, high-performance data storage solutions for WEB applications.
MongoDB is a product between relational databases and non-relational databases. It has the most abundant functions and features like relational databases.
Install MongoDB
Reference: https://docs.mongodb.org/getting-started/shell/tutorial/install-mongodb-on-red-hat/
Https://docs.mongodb.org/getting-started/shell/tutorial/install-on-linux/
1. Create a repo
Vi/etc/yum. repos. d/mongodb-org-3.2.repo
Mongodb-org-3.2
Name = MongoDB Repository
Baseurl = https://repo.mongodb.org/yum/redhat/?releasever/mongodb-org/3.2/x86_64/
Gpgcheck = 0
Enabled = 1
2. Install MongoDB and related tools
Sudo yum install-y mongodb-org
3. Start MongoDB
Sudo service mongod start4. Verify that MongoDB is successfully started.
Cat/var/log/mongodb/mongod. log
Check whether there is a sentence: [initandlisten] waiting for connections on port <port>
<Port> is configured in/etc/mongod. conf. The default value is port 27017.
5. Enable Automatic MongoDB startup
Sudo chkconfig mongod on
6. Stop MongoDB
Sudo service producer D stop
7. Restart MongoDB
Sudo service producer D restart
Server Configuration:/etc/mongod. conf
# Mongo. conf
# Where to log
Logpath =/var/log/mongo/mongod. log
Logappend = true # Write logs by append
# Fork and run in background
Fork = true
# Port = 27017 # port
Dbpath =/var/lib/mongo # database file storage location
Directoryperdb = true
# Enables periodic logging of CPU utilization and I/O wait
# Enable periodic recording of CPU utilization and I/O wait
# Cpu = true
# Turn on/off security. Off is currently the default
# Whether to run in Security Authentication mode. The default mode is non-security mode.
# Noauth = true
# Auth = true
# Verbose logging output.
# Detailed record output
# Verbose = true
# Inspect all client data for validity on receept (useful
# Developing drivers) is used to check the validity of data received by the client during driver development.
# Objcheck = true
# Enable db quota management to Enable database quota management. By default, each database can have 8 files, which can be set using the quotaFiles parameter.
# Quota = true
# Set the oplog record level
# Set oplogging level where n is
#0 = off (default)
#1 = W
#2 = R
#3 = both
#7 = W + some reads
# Oplog = 0
# Diagnostic/debugging option dynamic debugging item
# Nocursors = true
# Ignore query hints Ignore query prompt
# Nohints = true
# Disable the http interface. The default value is localhost: 28017.
# Disable the HTTP interface (Defaults to localhost: 27018). This port number is written incorrectly.
# Nohttpinterface = true
# Disable the server script, which greatly limits the function.
# Turns off server-side scripting. This will result in greatly limited
# Functionality
# Noscripting = true
# Close the scan table. Any query will fail.
# Turns off table scans. Any query that wocould do a table scan fails.
# Notablescan = true
# Disable data file pre-allocation
# Disable data file preallocation.
# Noprealloc = true
# Specify the size of the. ns file for the new database. Unit: MB
# Specify. ns file size for new databases.
# Nssize = <size>
# Accout token for Mongo monitoring server.
# Mms-token = <token>
# Mongo monitoring server name
# Server name for Mongo monitoring server.
# Mms-name = <server-name>
# Ping interval of the mongo Monitoring Server
# Ping interval for Mongo monitoring server.
# Mms-interval = <seconds>
# Replication Options
# In replicated mongo databases, specify here whether this is a slave or master in replication, specifying that the current is a slave
# Slave = true
# Source = master.example.com
# Slave only: specify a single database to replicate
# Only = master.example.com
# Or
# Master = true
# Source = slave.example.com
Summary
Installing yum is very simple and convenient,
There is no need to tangle with dependencies.
For more information, see the official documentation.
For more MongoDB tutorials, see the following:
CentOS compilation and installation of php extensions for MongoDB and mongoDB
CentOS 6 install MongoDB and server configuration using yum
Install MongoDB2.4.3 in Ubuntu 13.04
MongoDB beginners must read (both concepts and practices)
MongoDB Installation Guide for Ubunu 14.04
MongoDB authoritative Guide (The Definitive Guide) in English [PDF]
Nagios monitoring MongoDB sharded cluster service practice
Build MongoDB Service Based on CentOS 6.5 Operating System
MongoDB details: click here
MongoDB: click here
This article permanently updates the link address: