How To Uninstall Mongodb In Windows
Today we will learn how to install MongoDB on Windows. Most of united states use Windows for our personal use. That's why I am writing this tutorial to help you install MongoDB on Windows. Nosotros will besides larn how to start and uninstall MongoDB on Windows.
MongoDB for Windows
Starting from MongoDB version 2.2, MongoDB doesn't support Windows XP. And then if you are on Windows XP, either upgrade it or use the lower versions of MongoDB. This tutorial is intended to help you in installing MongoDB on Windows latest versions i.e Windows 7 and Windows 8, 8.1 etc.
Install MongoDB on Windows
Follow below steps to perform the installation of MongoDB into your windows system.
- Consider specific MongoDB build type which you need really
Iii build types of MongoDB for Windows are bachelor.
- MongoDB for Windows Server 2008 R2 serial: This build type runs just on 2008R2, Windows 7 64-bit, Windows eight, and latest versions of Windows.
- MongoDB for Windows 64-flake: This build type of MongoDB runs on any 64-flake version of Windows latest than Windows XP, involve Windows Server 2008 R2 and Windows 7 64-bit.
- MongoDB for Windows 32-flake: MongoDB runs on any 32-bit version of Windows latest than Windows XP, 32-flake version of MongoDB are only designed for older organization and utilize for testing and developing systems. Windows 32-bit versions of MongoDB support only database smaller than 2GB.
If you want to know that which specific version of windows yous are running at your system, then simply use following command on command prompt.
Microsoft Windows [Version 6.3.9600] (c) 2013 Microsoft Corporation. All rights reserved. C:\Users\Pankaj>wmic os get osarchitecture OSArchitecture 64-bit C:\Users\Pankaj> - Download MongoDB for Windows
Download the latest version release from the MongoDB Download page. Brand sure you download the latest version of MongoDB for your Windows. Annotation that 64-bit versions of MongoDB practice non run with 32-bit Windows.
- MongoDB Installation Options
In Windows Explorer, but locate downloaded MongoDB msi file, and so Double-click the msi file. A series of screens volition guide you through the installation procedure. In that location are multiple options such as Typical, Custom and Complete installation. MongoDB default installation goes into Programme Files, so if you want to change it then go for Custom installation.
- MongoDB installation folder move to another location (Optional)
Sometimes we want to movement the installation to another directory, nosotros can use move command for this. This command needs to be run every bit administrator. For instance, to move the folder to C:\MongoDB follow the steps shown in below images.
MongoDB does non depend at whatever other arrangement because it is self contained. You tin can execute MongoDB from the folder of your selection and tin install it in any binder (for, case D:\test\mongodb)
Running MongoDB Server
We demand to create a directory where MongoDB server will store all information technology'due south data. The MongoDB default information directory path is \data\db. Brand this folder using the following commands from Control Prompt. Note that if the directory doesn't exists, MongoDB volition effort to create it. Merely information technology's proficient to create information technology before mitt.
Microsoft Windows [Version vi.3.9600] (c) 2013 Microsoft Corporation. All rights reserved. C:\Users\Pankaj>cd \ C:\>md \data\db C:\> To offset MongoDB server, nosotros demand to run mongod.exe. For example, from the Command Prompt;
C:\>C:\MongoDB\bin\mongod.exe This MongoDB starts the main databases process. The waiting for connection message in the panel results determines that the mongod.exe process is complete.
Microsoft Windows [Version half-dozen.3.9600] (c) 2013 Microsoft Corporation. All rights reserved. C:\Users\Pankaj>cd \ C:\>MongoDB\bin\mongod.exe MongoDB\bin\mongod.exe --help for assist and startup options 2014-11-11T13:36:19.016+0530 [initandlisten] MongoDB starting : pid=5292 port=27 017 dbpath=\data\db\ 64-chip host=Meghna 2014-11-11T13:36:19.017+0530 [initandlisten] targetMinOS: Windows seven/Windows Serv er 2008 R2 2014-11-11T13:36:19.017+0530 [initandlisten] db version v2.6.5 2014-eleven-11T13:36:19.017+0530 [initandlisten] git version: e99d4fcb4279c0279796f2 37aa92fe3b64560bf6 2014-11-11T13:36:nineteen.017+0530 [initandlisten] build info: windows sys.getwindowsv ersion(major=6, minor=ane, build=7601, platform=2, service_pack='Service Pack i') BOOST_LIB_VERSION=1_49 2014-11-11T13:36:19.017+0530 [initandlisten] allocator: system 2014-eleven-11T13:36:xix.017+0530 [initandlisten] options: {} 2014-11-11T13:36:19.092+0530 [initandlisten] journal dir=\information\db\journal 2014-11-11T13:36:19.094+0530 [initandlisten] recover : no journal files present, no recovery needed 2014-eleven-11T13:36:nineteen.186+0530 [initandlisten] allocating new ns file \data\db\loc al.ns, filling with zeroes... 2014-11-11T13:36:20.002+0530 [FileAllocator] allocating new datafile \information\db\lo cal.0, filling with zeroes... 2014-xi-11T13:36:20.003+0530 [FileAllocator] creating directory \data\db\_tmp 2014-11-11T13:36:20.031+0530 [FileAllocator] washed allocating datafile \information\db\l ocal.0, size: 64MB, took 0.018 secs 2014-11-11T13:36:twenty.035+0530 [initandlisten] build alphabetize on: local.startup_log p roperties: { v: 1, cardinal: { _id: ane }, name: "_id_", ns: "local.startup_log" } 2014-eleven-11T13:36:20.036+0530 [initandlisten] added index to empty drove 2014-11-11T13:36:xx.037+0530 [initandlisten] command local.$cmd command: create { create: "startup_log", size: 10485760, capped: true } ntoreturn:1 keyUpdates:0 numYields:0 reslen:37 851ms 2014-11-11T13:36:20.038+0530 [initandlisten] waiting for connections on port 270 17 You can use a unlike path for data files using the –dbpath pick to mongod.exe, for example:
C:\>C:\MongoDB\bin\mongod.exe --dbpath D:\exam\mongodb\data If your path contains white spaces, and then you demand to employ double quotes as shown beneath.
C:\>C:\MongoDB\bin\mongod.exe --dbpath "D:\test\mongo db information" The security level depends on your organization configurations, Windows provide pop upwards a Security Alert dialog box virtually blocking few features of C:\Binder Proper noun\MongoDB\bin\mongod.exe from communication on networks.
All the clients should cull Private Networks. For example, my home or work network and click Allow access. For more than information on security and MongoDB, please look into the Security Documentation.
Connecting to MongoDB server through Command Prompt
We tin can connect to MongoDB server through mongo.exe client application, just open some other command prompt and execute it.
Microsoft Windows [Version 6.3.9600] (c) 2013 Microsoft Corporation. All rights reserved. C:\Users\Pankaj>C:\MongoDB\bin\mongo.exe MongoDB shell version: 2.6.5 connecting to: test Welcome to the MongoDB shell. For interactive help, type "help". For more comprehensive documentation, see https://docs.mongodb.org/ Questions? Endeavour the support group https://groups.google.com/group/mongodb-user > That's information technology, once connected we can issue any MongoDB shell commands. To shut the client connectedness, simply fire "exit" command or but shut the command prompt.
MongoDB every bit Windows Service
The trouble with above installation is that we demand to start MongoDB server manually then proceed the command prompt open. The solution is to configure it as Windows service, then that it tin start as soon as system is up and running. Since information technology volition exist running in background, there is no need to go along command prompt open.
Before we configure our MongoDB installation as Windows service, let'south create a configuration file for the MongoDB logs.
Microsoft Windows [Version 6.3.9600] (c) 2013 Microsoft Corporation. All rights reserved. C:\Users\Pankaj>cd \ C:\>md MongoDB-logs At present using repeat command we tin create a configuration file. If y'all get any permission issues, then run the command prompt every bit administrator.
C:\WINDOWS\system32>echo logpath=C:\MongoDB-logs\mongo.log > C:\MongoDB\mongod.conf Now run beneath command every bit administrator to setup MongoDB as service.
C:\>C:\MongoDB\bin\mongod.exe --config C:\MongoDB\mongod.conf --install C:\> If you want to change MongoDB server port or whatever other configurations, and then you tin can provide them in the in a higher place configuration file.
If you lot want to install services for multiple example of mongod.exe, install every service with a unique –serviceName and –serviceDisplayName. Employ the multiple examples simply when sufficient system resource exist and your design requires it.
Uninstall MongoDB Windows
If you want to remove the MongoDB service, then run beneath command as administrator.
C:\>C:\MongoDB\bin\mongod.exe --config C:\MongoDB\mongod.conf --remove C:\> That'south all for installing MongoDB on Windows and running it every bit Windows service. We will look into different MongoDB commands in coming posts.
Source: https://www.journaldev.com/6128/install-mongodb-windows-start-uninstall
Posted by: chmielewskinothead1991.blogspot.com

0 Response to "How To Uninstall Mongodb In Windows"
Post a Comment