(Click to open topic with navigation)
Moab connects to a MongoDB database to store information for use by MWS. This feature allows MWS and Viewpoint to do very fast queries on various Moab objects without querying Moab directly.
The following instructions assume that the MongoDB server is on the same machine as Moab.
To connect Moab to MongoDB
RHEL, CentOS, and Scientific Linux:
Create a file called /etc/yum.repos.d/10gen.repo and add the following lines.
[10gen]
name=10gen Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64
gpgcheck=0
enabled=1
Install mongo20-10gen and mongo20-10gen-server.
[root]# yum install mongo20-10gen mongo20-10gen-server
SLES:
[root]# zypper ar http://download.opensuse.org/repositories/server:/database/SLE_11_SP2 OpenSuseDatabase
[root]# zypper install mongodb
RHEL, CentOS, and Scientific Linux:
[root]# chkconfig mongod on
[root]# service mongod start
SLES:
[root]# chkconfig mongodb on
[root]# service mongodb start
[root]# mongo
> use admin;
> db.addUser("admin_user", "secret1");
> db.auth("admin_user", "secret1");
> use moab;
> db.addUser("moab_user", "secret2");
> db.addUser("mws_user", "secret3", true);
> use mws;
> db.addUser("mws_user", "secret3");
Because the admin_user has read and write rights to the admin database, it also has read and write rights to all other databases. See Control Access to MongoDB Instances with Authentication for more information.
The passwords used above (secret1, secret2, and secret3) are examples. Choose your own passwords for these users.
RHEL, CentOS, and Scientific Linux:
[root]# vi /etc/mongod.conf
...
auth = true
...
[root]# service mongod restart
SLES:
MongoDB authentication is enabled by default in SLES. To verify, check the value of auth as shown below.
[root]# nano /etc/mongodb.conf
...
auth = true
...
[root]# service mongodb restart
MONGOSERVER <host>[:<port>]
You only need to specify a port if you have changed it from the default. When a port is not specified, Moab assumes the default Mongo port.
MONGOUSER moab_user
MONGOPASSWORD secret2
[root]# service moab restart
[root]# mdiag -S
...
Mongo connection (localhost) is up (credentials are set)
...