我正在尝试在我的本地计算机上安装mongodb。我有Windows 7和64位。我遵循mongo网站上给出的这些说明:
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.
当我按照这些步骤操作时,我收到以下错误:
'C:\' is not recognized as an internal or external command, operable program or batch
file.
我不确定出现了什么问题我完全按照指示行事。我将c盘上的zip文件解压缩为mongodb。然后我在我的c盘上创建了文件夹数据,在数据文件夹中创建了文件夹db。我启动windows cmd行并按照他们的建议行事,我得到了上述错误。任何人都可以帮忙。谢谢。
答案 0 :(得分:5)
请勿键入C:\>
,这是命令提示符。
例如,只需输入:
cd \mongodb\bin
然后按输入。
答案 1 :(得分:0)
您可能想要使用下载mongodb并将其安装为Windows服务的powershell ... https://gist.github.com/serdarb/5102848