You can manually install 2.6.0 as a service on Windows from an Administrator cmd prompt.mongodb
Assuming you have installed MongoDB using the MSI installer, the default path will be C:\Program Files\MongoDB 2.6 Standard. If you have installed in an alternative directory you will need to adjust the paths as appropriate.shell
1) Open an Administrator command promptapp
2. Make directories for your database and log filesui
mkdir c:\data\db
mkdir c:\data\log
3. Create a configuration file. This file can include any of the configuration options for mongod, but at a minimum must include a valid setting for logpath:this
echo logpath=c:\data\log\mongod.log> "C:\Program Files\MongoDB 2.6 Standard\mongod.cfg" echo dbpath=c:\data\db>> "C:\Program Files\MongoDB 2.6 Standard\mongod.cfg"
4. Create the MongoDB servicespa
sc create MongoDB binPath= "\"C:\Program Files\MongoDB 2.6 Standard\bin\mongod.exe\" --service --config=\"C:\Program Files\MongoDB 2.6 Standard\mongod.cfg\"" DisplayName= "MongoDB 2.6 Standard" start= "auto"
Note that sc requires a space between "=" and the configuration values (eg "binPath= "), and a "\" to escape double quotes.orm
If this works you should see:get
[SC] CreateService SUCCESS
5. Start the MongoDB service:cmd
net start MongoDB
If successful you should be able to connect using the mongo shell. If the service did not start successfully, the log file should contain information to help you troubleshoot.io