I have debian os installed on my computer.
Distributor ID: Debian
Description: Debian GNU/Linux 8.1 (jessie)
Release: 8.1
Codename: jessie
I have followed this toturial to Install MongoDB on Debian install mongo db on my computer.
Mongodb version:
mongo --version
MongoDB shell version: 2.6.9
Now when I run mongo
command to terminal, It says
mongo
MongoDB shell version: 2.6.9
connecting to: test
2015-08-08T06:29:50.480-0500 warning: Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused
2015-08-08T06:29:50.481-0500 Error: couldn't connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt failed at src/mongo/shell/mongo.js:146
exception: connect failed
And running this command show below error
sudo service mongodb restart
Failed to restart mongodb.service: Unit mongodb.service failed to load: No such file or directory.
Any ideas on why this is happening and how to fix it?