Manually running MongoDB in Kubuntu


When I am developing against MongoDB I don’t want the server to run all the time and use up my memory. Instead, what I do is manually start/stop the server and specify config files so that it can run on various data directories.

To set it up, I downloaded MongoDB to ~/Downloads, and then extracted to a directory where I keep various apps: ~/Apps/mongodb-linux-x86_64-2.0.1.

Inside the MongoDB directory is a bin directory. I create a symbolic link to everything there from my home bin directory (~/bin).

When I log in, the ~/.bashrc file in Kubuntu adds everything in ~/bin to the $PATH. This way I can easily run mongod from the bash manually and specify a config file for mongod to use (so I can switch between database directories easily for different projects).

Advertisements

About Bogdan Varlamov

A .NET Software Engineer that strongly believes technology should simplify and improve the quality of our lives instead of making them more complicated. View all posts by Bogdan Varlamov

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: