Mongodb Windows Install Fail - windows

I am trying to install mongodb on my local computer. I have windows 7 and 64 bit. I am following these instructions which are given on mongo's website:
64-bit binaries:
Download and extract the 64-bit .zip.
Unzip the downloaded binary package to the location of your choice. You may want to
rename mongo-xxxxxxx to just "mongo" for convenience.
Create a data directory:
By default MongoDB will store data in \data\db, but it won't
automatically create that folder, so we do so here:
C:\> mkdir \data
C:\> mkdir \data\db
Or you can do this from the Windows Explorer, of course.
If you prefer to place datafiles elsewhere, use the --dbpath command line parameter
when starting mongod.exe. Run and connect to the server
The important binaries for a first run are:
mongod.exe - the database server. Try mongod --help to see startup options.
mongo.exe - the administrative shell
To run the database, click mongod.exe in Explorer, or run it from a CMD window.
C:\> cd \mongodb\bin
C:\mongodb\bin> mongod
Note: It is also possible to run the server as a Windows Service. But we can do that
later.
When i follow these steps i get the following error:
'C:\' is not recognized as an internal or external command, operable program or batch
file.
I am not sure what is going wrong i have followed the direction exactly. I extracted the zip file on my c drive as mongodb. I then created the folder data on my c drive and the folder db inside the data folder. I start the windows cmd line and do as they suggest and i get the above error. Can anyone help please. Thank you.

Don't type the C:\>, that's the command prompt.
For example, just type:
cd \mongodb\bin
and then press enter.

you may want to use this powershell that dowloads mongodb and installs it as windows service...
https://gist.github.com/serdarb/5102848

Related

how to use redis in windows 10 from .msi installer

I have questioon about how to run redis in windows 10. what i have do is :
I have install redis use .msi and my redis are run in services, but when i want run redis-cli in cmd, i got error like this :
C:\WINDOWS\system32>redis-cli
'redis-cli' is not recognized as an internal or external command,
operable program or batch file.
how to fix this problem ? and how to run redis in windows locally ? it is need to add my redis to environtment or something like that ?
Do the first option only if you have not shutdown your computer and not closed you terminal after installation
Close your terminal open again and try running redis-cli, if that doesn't works then do below,
Uninstall and Reinstall again, while reinstalling make sure that you check "Add the redis installation folder to the PATH environment variable"

'mongoimport' is not recognized as an internal or external command, operable program or batch file

I'm running Windows 10 and calling !mongoimport -d osm -c bham --file bham.json using Python 3.85 in Jupyter Notebook, from a conda environment.
I get 'mongoimport' is not recognized as an internal or external command, operable program or batch file. and the file is not imported.
I have added the MongoDB tools bin folder and the server bin folder to PATH:
I have also tried:
Copying mongoimport.exe to the server bin folder.
Putting .\ before mongoimport in the command.
Calling the file directly !<full file path>.
Removing the \ after bin in PATH.
This is the only MongoDB installation I have, and I can see that the database service is running, as is Compass.
It worked on this computer before I did a clean install.
Thanks!
Edit: change tags
Turns out restarting my computer did the trick. Restarting the kernel after setting the PATH variable was not it. So, it might just have been restarting the command prompt from which Jupyter Notebook was launched after setting the PATH variable that did it.

Mongo shell "this app can't run on your pc, to find a version for your pc, check with the software publisher."

today I tried to run mongo shell command and it throws me an error: "this app can't run on your pc, to find a version for your pc, check with the software publisher."
I also use clients for Mongodb like Compass and it works fine. Have you any idea what is wrong with the shell? I am on 64bit Win 10 and the Mongo server version is 4. THX
As I found here https://superuser.com/a/926213/613454 the problem is in mongo.exe file which has 0 bytes. Yesterday it worked properly and today it has 0 bytes. Miracle.
I was getting this issue, when attempting to start the "mongod" service. For me this was being caused due to ambiguity around multiple mongod.exe binaries, even though the PATH environment variable is set in Windows.
To resolve this all I did is, in terminal/cmd-prompt, changed directory (CD) into the folder where mongod.exe resides, e.g.:
cd \Program Files\MongoDB\Server\3.0\bin
After which, tried to start the mongod service and voila :)
C:\Program Files\MongoDB\Server\3.0\bin>mongod --config E:\\Mongo\\mongo.config --serviceName "MongoDB" --serviceDisplayName "MongoDB-Fin-Server" --serviceDescription "MongoDB primarily for xxx process."
This resolved the issue for me, hope this helps others.

Cannot use cd command to change directory in Drush (win7)

I just installed Drush 6.0 on a Win7 machine. With cd command I can move around inside of C:\ but can't change to P:.
Cheers
I ran into the same issue you did a day or two ago. I realized that the drush command prompt uses most of the same commands that the Windows command line does so I did a quick search along those lines and was able to find the answer.
You need to either type the drive you want to change to (with no other commands and no slash) or you can navigate to the directory but include '/D'. Here are some examples.
P:
cd /D P:\wamp\www
Here is the website if you want more info: http://www.windows-commandline.com/windows-7-command-line-switch-drives/
Hope this helps!
install git bash and use this for your work on windows machine
or even better install linux as a virtual machine, as a developer you will love it after a few days
here is the link: https://code.google.com/p/msysgit/downloads/list?q=label:Featured

NSClient++ not getting installed in windows

I have installed Nagios monitoring tool in linux whose service is running successfully as expected.
Now as per NSClient documentation, the windows part is not getting installed.
The required steps are:
(a) Copy pNSClient.exe, pdh.dll, psapi.dll and counters.defs in any directory on the machine you want to monitor. ie. (c:\nsclient).
(b) Open a dos prompt in the installation directory
(c) Run the following command : >pNSClient.exe /install
(d) Type 'net start nsclient' on the command line or start the service 'Nagios Agent' in the services applet of the control panel.
The installation will create an entry for the service in the registry and create a new key to store parameters. The created key is the following:
HKEY_LOCAL_MACHINE\SOFTWARE\NSClient
The issue is with the installation as per the first step, and the 'net start nsclient' command is not executing on command prompt, its showing service name invalid
Any help regarding this ? M installing this on windows 7.
Only the windows installation part of NSClient is remaining yet the linux part is properly installed along with the 'check_nt' plugin.
Thanks in advance !!
NSClient is antiquated and deprecated. You should be using NSClient++ (AKA nscp), which has an actual installer, along with excellent documentation.
Alternatively, if you are dealing with more than a few dozen Windows hosts, and are using Active Directory, you might want to consider Nagios-WSC. Whether or not it will suit your needs depends on what sort of checks you are hoping to do, though.
That documentation might be out of date. Try using the following doc to install NSClient++. The doc is for Nagios XI, but the agent instructions should be the same.
http://assets.nagios.com/downloads/nagiosxi/docs/Installing_The_XI_Windows_Agent.pdf
Otherwise, you could also try:
net start nsclient++
just an advice - forget about manual installs )
install choco
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
restart powershell session and
install nsclient++
choco install nscp

Resources