user982853
user982853

Reputation: 2488

Mongodb Windows Install Fail

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.

Upvotes: 1

Views: 5436

Answers (2)

Serdar
Serdar

Reputation: 1516

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

Upvotes: 0

Mike Christensen
Mike Christensen

Reputation: 91724

Don't type the C:\>, that's the command prompt.

For example, just type:

cd \mongodb\bin

and then press enter.

Upvotes: 5

Related Questions