Follow this tutorial to simply setup and run your first MongoDB as service on window 8. Also you can find full details on mongoDB official website .
- create custom mongod.conf fileHere is an example:#where data files will reside
#where the log file will be stored
#how verbose the server will be logging
- run install command
mongd -f "[your mongod.conf path]" --installThis command is used for installing the mongodb as a service on your local machine with the settings written in the mongod.conf
- run net commandnet start mongodbAfter this command, you will see a message as below"The MongoDB service was started successfully"
NOTE: to create a MongoDB as server, you will need to run the command as Administrator, otherwise you may get an deny error.