Reference Guide

Figure 55. mongod.cfg le
4 Open the mongod.cfg le in a text editor, and add the following entries:
a SystemLog:destination: file
b path: c:\data\log\mongod.log
c Storage: dbpath: c:\data\db
5 Save the le.
6 Open command prompt.
7 Run the following command to start the MongoDB service:
a C:\MongoDB\bin>.\mongod.exe --config c:\Mongodb\mongod.cfg --install
b C:\MongoDB\bin>net start mongodb
The message MongoDB service is starting is displayed.
8 Change the working directory to \MongoDB\bin.
9 Run Mongo.exe at the command prompt to complete the MongoDB installation.
Create replica servers for MongoDB database
You must create replica servers to avoid any system failures. The replica servers should have the capacity to store multiple distributed read
operations.
For more information to create replica servers, see Deploy a Replica Server Set at docs.mongodb.com/manual.
Create database user
Create an user, for example, DBUser using the Wyse Management Suite to access MongoDB.
NOTE
: The database user and password are examples and can be created using a dierent name and password at your work
place.
Run the following command to create the DBUser:
db.createUser( {
user: "DBUser",
pwd: <db_password>,
roles: [ { role: "userAdminAnyDatabase", db: "admin" },
{ role: "dbAdminAnyDatabase", db: "admin" },
{ role: "readWriteAnyDatabase", db: "admin" },
{ role: "dbOwner", db: "DBUser" } ]
})
60
Achieve high availability on MongoDB