简体   繁体   中英

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.

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

For example, just type:

cd \\mongodb\\bin

and then press enter .

您可能要使用这个可以下载mongodb并将其作为Windows服务安装的Powershell ... https://gist.github.com/serdarb/5102848

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM