8

How can I install mongodb on a Linux server without root privileges? is this possible? What would the steps be? Is there a way to configure mongo to not use /data/db?

1 Answer 1

8

You may download the binaries from MongoDB website.

There are a lot of options for the command mongod to change the default behavior, one of these is:

--dbpath arg directory for datafiles

Based on comments:

But it is preferable to specify all configurations in a configuration file and just invoke mongod with:

--config filename

3
  • 2
    by default it listens on port 27017. Note: you can specify all these (and much more) in a configuration file and use --config filename Commented Aug 8, 2011 at 19:13
  • Would simply changing the dbpath allow for non root user? Having an issue where Webstorm IDE can't start it's MongoDB explorer due to permissions issue. I am assuming this is why.
    – abritez
    Commented Aug 27, 2014 at 23:29
  • the "how" wasn't answered properly.
    – whiletrue
    Commented Oct 6, 2020 at 14:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.