Thursday, March 16, 2017
In the previous blog post we created a configuration file for our MongoDB database in this post we will install MongoDB as a Windows service so that we don't have to start the service in the command line every time we want to use it to save development time.
Here are the steps to install MongoDB:
1. Open the command prompt as an "Administrator"
2. Change the mongo-db-config.conf file to use absolute paths. You can get the instructions on how to create a MongoDB configuration file in this blog post
dbpath = C:\techjunkie\mongodb\db
logpath = C:\techjunkie\mongodb\mongo-db-server.log
verbose = vvvvv
if the folder dpath folder does not exists in Windows create the folder "db" inside the "mongodb" folder, else the service start will fail
3. Type the following command
mongod -f c:\techjunkie\mongodb\mongo-db-config.conf -install
If you have a log file it will be moved to another log file with time stamped.
4. The MongoDB service is now part of the Windows services
5. Double-click on the "MongoDB" and click on the "Start" button
6. If you receive the error "Windows could not start MongoDB service on Local Computer", then it means the previous shutdown of MongoDB was done improperly.
To resolve this issue do the following:
Here are the steps to install MongoDB:
1. Open the command prompt as an "Administrator"
2. Change the mongo-db-config.conf file to use absolute paths. You can get the instructions on how to create a MongoDB configuration file in this blog post
dbpath = C:\techjunkie\mongodb\db
logpath = C:\techjunkie\mongodb\mongo-db-server.log
verbose = vvvvv
if the folder dpath folder does not exists in Windows create the folder "db" inside the "mongodb" folder, else the service start will fail
3. Type the following command
mongod -f c:\techjunkie\mongodb\mongo-db-config.conf -install
If you have a log file it will be moved to another log file with time stamped.
4. The MongoDB service is now part of the Windows services
5. Double-click on the "MongoDB" and click on the "Start" button
6. If you receive the error "Windows could not start MongoDB service on Local Computer", then it means the previous shutdown of MongoDB was done improperly.
To resolve this issue do the following:
- Remove the file c:/techjunkie/mongodb/db/mongod.lock
- Repair mongodb with command mongod --repair
- Start the mongoDB service
Note: You can also start and stop the mongoDB service in the command line with the following commands
To Start Type: net start MongoDB
To Stop Type: net stop MongoDB
Similar Posts:
- AngularJS SPA : Installing MongoDB
- AngularJS SPA: Create a MongoDB Configuration File
- MongoDB In-Depth: Installing MongoDB on Linux
- AngularJS SPA: Install RoboMongo GUI for MongoDB
Subscribe to:
Post Comments (Atom)
Search This Blog
Tags
Web Development
Linux
Javascript
DATA
CentOS
ASPNET
SQL Server
Cloud Computing
ASP.NET Core
ASP.NET MVC
SQL
Virtualization
AWS
Database
ADO.NET
AngularJS
C#
CSS
EC2
Iaas
System Administrator
Azure
Computer Programming
JQuery
Coding
ASP.NET MVC 5
Entity Framework Core
Web Design
Infrastructure
Networking
Visual Studio
Errors
T-SQL
Ubuntu
Stored Procedures
ACME Bank
Bootstrap
Computer Networking
Entity Framework
Load Balancer
MongoDB
NoSQL
Node.js
Oracle
VirtualBox
Container
Docker
Fedora
Java
Source Control
git
ExpressJS
MySQL
NuGet
Blogger
Blogging
Bower.js
Data Science
JSON
JavaEE
Web Api
DBMS
DevOps
HTML5
MVC
SPA
Storage
github
AJAX
Big Data
Design Pattern
Eclipse IDE
Elastic IP
GIMP
Graphics Design
Heroku
Linux Mint
Postman
R
SSL
Security
Visual Studio Code
ASP.NET MVC 4
CLI
Linux Commands
Powershell
Python
Server
Software Development
Subnets
Telerik
VPC
Windows Server 2016
angular-seed
font-awesome
log4net
servlets
tomcat
AWS CloudWatch
Active Directory
Angular
Blockchain
Collections
Compatibility
Cryptocurrency
DIgital Life
DNS
Downloads
Google Blogger
Google Chrome
Google Fonts
Hadoop
IAM
KnockoutJS
LINQ
Linux Performance
Logging
Mobile-First
Open Source
Prototype
R Programming
Responsive
Route 53
S3
SELinux
Software
Unix
View
Web Forms
WildFly
XML
cshtml
githu
Mua vé máy bay tại Aivivu, tham khảo
ReplyDeletevé máy bay đi Mỹ hạng thương gia
chuyen bay tu my ve vietnam
vé máy bay từ canada về việt nam bao nhiêu tiền
vé máy bay từ tokyo vé hà nội
vé máy bay từ hàn về Việt Nam
Vé máy bay từ Đài Loan về Việt Nam
vé máy bay chuyên gia nước ngoài