Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

MongoDB has instructed me to change its command-line arguments:

REST is not enabled.  use --rest to turn on.

but this is all I know how to do:

sudo service mongodb start

Where should I apply this configuration change?

share|improve this question
add comment

2 Answers 2

up vote 3 down vote accepted

The various parameters that you wish to enable or disable can be set in the

/etc/mongodb.conf

config file.

All the command-line parameters can be mentioned in that file, and setting the values to true or false.

In your case, add a line as follows, preferably somewhere after the dbpath is mentioned.

rest = true

After each change to the configuration file, you need to restart the server to take effect:

sudo service mongodb restart

For more options, take a look at the documentation.

share|improve this answer
    
I don't understand how this helps. Can you explain how to "use --rest" in this configuration file? –  ændrük May 26 '11 at 16:57
    
@aendruk I have added it to the answer. –  theTuxRacer May 26 '11 at 17:04
    
So how do I set the --config flag so it will actually use this file? –  phillips1012 Dec 18 '13 at 22:44
add comment

In order to turn on rest just type the following in your Terminal(Linux):

mongod --rest 

Thats it.

If you want to allow other clients to use your mongodb via browser just type

mongod --rest (for to activate) --ipv6 (to allow other users to access your server).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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