Make sure to edit the version number with the appropriate latest version and save the file.
Issue the command sudo apt-key adv -keyserver hkp://:80 -recv EA312927.If you're on Ubuntu 16.04 and face the unrecognized service error, these instructions will fix it for you:. ( Switch to SystemD) and run systemctl start mongod.(Continue on SysV) Write sysV init script manually as mentioned above.usr/share/doc/mongodb-org-server/MPL-2.gzīut my system was running on SysV init: # stat /proc/1/exe usr/share/doc/mongodb-org-server/THIRD-PARTY-NOTICES.gz usr/share/doc/mongodb-org-server/GNU-AGPL-3.0.gz usr/share/doc/mongodb-org-server/changelog.gz usr/share/doc/mongodb-org-server/LICENSE-Community.txt usr/share/lintian/overrides/mongodb-org-server It didn't started after recommended command sudo service mongod restart with the same error - mongodb: unrecognized service.Īfter looking into installed package contents, I noticed that it contains only Systemd service unit, but no SystemV init script: # dpkg -L mongodb-org-server
Install mongodb in ubuntu 12.04 manual#
I installed mongo server on Debian Jessie using manual from official site. From what I've read, i should be using sudo service mongodb start mongodĪny ideas on why I can't start it using the service command would be appreciated. Upstart job, you may also use the start(8) utility, e.g. Since the script you are attempting to invoke has been converted to an Rather than invoking init scripts through /etc/init.d, use the service(8) Journal local.0 local.ns sudo service mongodb startīut I can start it using /etc/init.d as you can see below: sudo /etc/init.d/mongod start
I deleted the lock file and then retried my command but it still fails as you can see below: sudo rm ls
Which made a comment about remove the mongo lock file. I found another post here: can't start mongodb as sudo Mongodb: unrecognized is what I have in my /var/log/mongodb/mongod.log. I get the following error message: sudo service mongodb restart So I decided to try to restart the service but that's failing too. I tried to start the shell but I'm getting a connection refused error. I just installed mongoDB on ubuntu 14.0.4.