Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: updated with info about the mongodb setup helper

Table of Contents

Installation

We recommend using MongoDB 2.4. MongoDB 2.6 is currently not covered by our installation and configuration guides as it has a somewhat different authorization infrastructure. The setup instructions below may fail with late versions of MongoDB 2.6.

...

Code Block
#use su or sudo to become root
service mongodb restart
# or /etc/init.d/mongodb restart
# or invoke-rc.d mongodb restart

 

...

Configuring MongoDB Authentication with setup_mongodb.pl

Since opEvents versions 1.2.3 and opConfig 2.1.0 the relevant applications ship with a configuration tool for MongoDB, named bin/setup_mongodb.pl. It's recommended that you use this tool for setting up MongoDB authentication, as it can deal with separate per-product MongoDB instances and simplifies the procedure substantially. The relevant product installers already offer to run the tool during installation and upgrades.

To use the tool manually, simply run it as root and follow the prompts (if any):

Code Block
$ sudo /usr/local/omk/bin/setup_mongodb.pl
setup_mongodb.pl version 1.0.3

Reading configuration file /usr/local/omk/conf/opCommon.nmis...
Checking authentication status for db_server localhost...
MongoDB on localhost:27017 is running in non-authenticated mode.
INFO: adding user opUserRW to database admin
INFO: adding user opUserRW to database nmis
INFO: adding user opUserRW to database optrend
...

If required the tool will prompt you for database credentials and advise on remote-vs-local operation, as well as authenticated-vs-nonauthenticated modes. The MongoDB setup helper can be run repeatedly with no adverse effects.

Manual MongoDB Authentication Configuration

Should using the setup_mongodb.pl helper not be an option for you, then you can still prime the database(s) manually for Opmantek use.

Load the mongo CLI, create the user for the admin DB, authenticate, then do the same for the NMIS db (change the username and password to your liking):

...