M
M
Michael2016-08-06 09:31:18
MongoDB
Michael, 2016-08-06 09:31:18

Windows 10 Linux Subsystem. How to install MongoDB?

Recently a new Windows 10 Anniversary Update has been released that includes a Linux Subsystem built on Ubuntu 14.04 and now I want to migrate my working environment to this Linux Subsystem. The problem is only with MongoDB installation.
I install it according to this instruction from the official site https://docs.mongodb.com/manual/tutorial/install-m...

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list
sudo apt-get update
sudo apt-get install -y mongodb-org

After the installation is complete, I start MongoDB with the following command
sudo service mongod start
But I get an error
[email protected]:/mnt/c/Users/User$ sudo service mongod start
mongod: unrecognized service

How to install the latest version of MongoDB, get it in Ubuntu 14.04, no error?
The file /etc/init.d/mongodafter installation according to that instruction is missing.
If you install sudo apt-get install mongodbthe service starts, the file is there, everything is fine. But version 2.xx is installed
Updated
Solution found https://github.com/Microsoft/BashOnWindows/issues/...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lindon_cano, 2016-08-06
@Lindon_cano

> The /etc/init.d/mongod file is missing after installation according to that instruction.
And rightly so, because Ubuntu 14.04 uses upstart as its init system.
ls -l /etc/init/mongo* will show you what?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question