Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: added instructions for debian and derivatives

Installation

Debian or Ubuntu:

All recent versions of Debian-derived distributions come with suitable MongoDB packages. Use sudo or su to become the root user, then run the following command:

Code Block
themeEmacs
apt-get install mongodb-clients mongodb-server

Installing the mongodb-server package will result in a working, automatically started MongoDB with no authentication.

Other Systems:

Download MongoDB from the Website at http://www.mongodb.org/downloads (version 2.2.3 was latest at the time of writing this so the examples are using the 64-bit version of this release)

...

Opmantek Setup for MongoDB

For Debian-derived distributions the default configuration is fine, but you might still want to adjust the database storage area. The configuration file is /etc/mongodb.conf, and the init script is in /etc/init.d/mongodb.

For other systems, check Check that the location in the provided init script is where you want the database to run store its files (the default is mongodbpath=/var/mongodb for the original version): 

Code Block
vi /usr/local/opmantek/install/mongod.init.d

### you will see 
### two suggestions provided

mongodbpath=/var/mongodb
## mongodbpath=/data/mongodb   

...

Code Block
themeEmacs
# as root
cp /usr/local/opmantek/install/mongod.init.d /etc/init.d/mongod
chkconfig mongod on
service mongod start  start

If this is a Debian-derived system and you made config changes, then your mongod will already be running and you need to restart it like this:

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

 

Configure MongoDB Authentication

...