Comments on How to Install and Configure MongoDB on Ubuntu 16.04 LTS
MongoDB is a NoSQL database that offers a high performance, high availability, and automatic scaling enterprise database. Data is stored in a "document" structure in JSON format (in MongoDB called BSON). MongoDB was first introduced in 2009 and is currently developed by the company MongoDB Inc. This tutorial shows the installation and configuration of MongoDB on Ubuntu 16.04 LTS.
35 Comment(s)
Comments
Seems to be interesting for the researching tasks of our institute! What about the stability of this release?
Thank you for the instructions, worked like a charm - note in step-4 to reload it should be "systemctl daemon-reload" rather than "systemd daemon-reload"
Thank you!
best guide!
I ran through the install but I am expernecing an issue at step #3. I run the createUser command but I receive the following error:
Error: couldn't add user: not authorized on admin to execute command
I am connected to the admin database but cannot execute the command. I do not see the --auth flag in the mongod.service file so I don't think I'm connecting with auth enabled.
If anyone has problems getting systemd daemon-reload to work, you can probably use systemctl daemon-reload. Worked for me, anyway.
Could you also make a HowToForge on how to compile the c++ driver easily? Today this is a mess and a pain. Thanks
Thank You for Instructions This is work for me.
thanks for this tutorial.
Thanks,
I am getting Excess arguments as output just before step 5.
I continued and it seems to work, but I do not know what is the affect of this error and how to solve it, any ideas?
Guy
Chapter 'Configure MongoDB username and password', 'Step 4 - Enable mongodb authentication':
Reload the systemd service says 'systemd daemon-reload', but should instead be 'systemctl daemon-reload'
thanks!
another method if error in : mongo -u admin -p admin123 --authenticationDatabase admin
with : mongo -u "admin" -p "admin123" --authenticationDatabase admin
works to me on linux MINT 18 (sarah)
This is work for me. thank you.
Thank for share!
In step 4 I had to use systemctl daemon-reload vice systemd daemon-reload.
Thank You very much for your support through this tutorial(manual),
Awsome implementation and installation without any error, great and great job.
May Allah give you more knowledge to help us like this.
Thank You
sudo apt-get install -y mongodb-org did not work for me I had to do sudo apt-get install -y mongodb
instead of 'systemd daemon-reload'
please use:
systemctl daemon-reload
db.createUser({user:"admin", pwd:"admin123", roles:[{role:"root", db:"admin"}]})
should be :db.createUser(user:"admin", pwd:"admin123", role:"root", db:"admin")
Great Job... had problems before with installing mongo but this worked well.
hi
tanks for this tutorial
good luck
At step 4 you should replace systemd daemon-reload with : systemctl daemon-reload
The rest is great
Thanks by the way you saved me a lot of time :)
Its a great help to me. Thanks a lot for providing such polish steps.
Yes, I was confused for a bit, and I'm sure others will be too. This needs to be fixed.
Thank you so much...
Thank you so much for this fantastic tutorial! I have spent the better part of today trying to remove single files because of another tutorial by Digital Ocean - which was not correct and only made swiss cheese of my root permissions. This guide actually worked for me!! I am now finally nested deep in instances running mongo, so I thank you!
The systemctl commands should be preceded with sudo.
Thank you..
Brilliant and clear
I followed this and it made my admin user have no rights. I'd recommend just following the docs
Excellent article, I've managed to get mongo running by following the steps. One wierd thing is that the mongod.service couldn't start and was inactive (dead) unless I set Type=forking under [Service] in /lib/systemd/system/mongod.service
hi
tanks for this tutorial
good luck
There is a an error in the manual.
Step 4:
systemd daemon-reload
should be
systemctl daemon-reload
Otherwise great step by step guide. Thanks. May the force be with you!
Hi, Thank you for this usefull tutorial :)
bests for you