CMSV6Help Center
/
839 DOCS · 213 VIDEOS中文

Distributed Deployment MongoDB Server

Author 谢周轩Updated 2026-04-24 18:16:05Doc ID 2226310 words · 1 min readView original ↗

1. function description

  • Distributed deployment of MongoDB databases to achieve off- site hot standby.

2. operating instructions

  • The default port used by the MongoDB database is 3317.
  • If the master and slave servers are not in the same LAN, the 3317 port needs to be mapped to the external network so that the master server can access it.

2.1 MongoDB related operations on the database server

  • 1 . Modify the MongoDB configuration file [mongod.cfg]. Path: CMSServrv6/mongod
    'Modify bindIp:127.0.0.1 to bindIp:0.0.0.0'

2.2 (related actions on the master server)

  • 2 . Let the master server connect to the MongoDB database server.
    Edit the CMSServrv6\database.ini configuration file and manually add the following
[DATABASEMONGODB]
DBNAME=1010gps
DBIP=192.168.1.108
DBPORT=3317
DBUSR=
DBPWD=

"Note: Change the DBIP parameter to the corresponding IP address. The user name DBUSR and password DBPWD parameters are both empty and do not need to be filled in at present'

  • 3 . Edit the [GPSLoginSvr.ini] configuration file, manually add the following contents, and modify the read and write item configuration according to your own needs
[CONFIG]
; Whether to enable the MongoDB function, the default is 0 (not enabled)
MongoDB=1
; The following parameters are valid when the MongoDB is 1. By default, only one database is written. After configuration, two databases can be written, but one of them is read only.
;(GPS) Whether to write mysql and MongoDB databases at the same time, default 0
MongoDBBackupGPS=1
;(GPS) Whether to read data from mysql database, default 0 (read MongoDB), modified to 1 (read MySQL)
MongoDBReadBackupGPS=0
; Refer to GPS configuration
; alarm
MongoDBBackupAlarm=1
MongoDBReadBackupAlarm=0
; the media
MongoDBBackupMedia=1
MongoDBReadBackupMedia=0
; log (also contains tts_log)
MongoDBBackupLog=1
MongoDBReadBackupLog=0
; daily report, weekly report, monthly report
MongoDBBackupDaily=1
MongoDBReadBackupDaily=0

  • 4 . Connect the web server of the main server to the database of the MongoDB server (you can not configure it when you do not read the MongoDB)
Source help.cmsv7.com
839 documents · 213 videos · docs.alwaycare.com