You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Installation

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)

curl http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.2.3.tgz -o mongodb-linux-x86_64-2.2.3.tgz
tar xvf mongodb-linux-x86_64-2.2.3.tgz
mv mongodb-linux-x86_64-2.2.3 /usr/local/
cd /usr/local/
ln -s mongodb-linux-x86_64-2.2.3 mongodb
ln -s mongodb/bin/mongo bin/mongo 

 

Opmantek Setup for MongoDB

Check that the location in the provided init script is where you want the database to run (the default is mongodbpath=/var/mongodb): 

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

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

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

After you have the location you prefer, the next set of commands will put a start-up script in the correct location, register the script and then start mongo (before doing this make sure to consider how much data you plan to store.  Each application has different needs and how you plan to use the application will have an enormous impact on the space required by the database).  The last command here starts MongoDB, the first time it runs it can take some time to do its pre-allocation of database and journal files.  This will depend on the performance of your storage.

# as root
cp /usr/local/opmantek/install/mongod.init.d /etc/init.d/mongod
chkconfig mongod on
service mongod start  
  • No labels