官网:[url=https://www.mongodb.org/]https://www.mongodb.org/[/url]
国内网站:[url=http://mongoing.com/]http://mongoing.com/[/url]
github :[url=https://github.com/mongodb]https://github.com/mongodb[/url]
google groups :[url=https://groups.google.com/forum/#!forum/mongodb-user]mongodb谷歌交流社区[/url] (能否访问,自求多福。)
一、安装
1、下载相应的文件,解压到相应的地方 (我放在了D:\Server文件夹里。名称改短点,mongodb-2.6.7)
[img]http://dl2.iteye.com/upload/attachment/0105/7476/e05c12d0-4062-3373-b8fc-79034cb41d04.png[/img]
2、conf 文件夹下面 新建mongodb 服务的配置文件:mongod.conf
3、新建启动mongod 服务的批处理文件,mongod_start.bat 内容如下:
4、新建连接mongod 服务的客户端批处理文件,mongo_cli_start.bat 内容如下:
5、先启动mongod 服务,再启动一个客户端,进行操作。
[img]http://dl2.iteye.com/upload/attachment/0105/7481/7e3dbec0-7596-3cdc-86b6-3373bbe03f82.png[/img]
[img]http://dl2.iteye.com/upload/attachment/0105/7483/8fadb841-80c4-3da6-bfb7-1526fd7f952e.png[/img]
国内网站:[url=http://mongoing.com/]http://mongoing.com/[/url]
github :[url=https://github.com/mongodb]https://github.com/mongodb[/url]
google groups :[url=https://groups.google.com/forum/#!forum/mongodb-user]mongodb谷歌交流社区[/url] (能否访问,自求多福。)
一、安装
1、下载相应的文件,解压到相应的地方 (我放在了D:\Server文件夹里。名称改短点,mongodb-2.6.7)
[img]http://dl2.iteye.com/upload/attachment/0105/7476/e05c12d0-4062-3373-b8fc-79034cb41d04.png[/img]
2、conf 文件夹下面 新建mongodb 服务的配置文件:mongod.conf
#服务监听的端口
port = 12345
#数据存放的目录
dbpath = data
#日志文件
logpath = log/mongod.log
#window 7 下面不能用,linux 下可用。
#fork = true
3、新建启动mongod 服务的批处理文件,mongod_start.bat 内容如下:
::关掉命令回显,表示之后的命令本身不会显示。
@echo off
set "dir_1=D:\Server\mongodb-2.6.7"
::进行入到指定目录
cd /d %dir_1%
::执行命令
%dir_1%\bin\mongod -f %dir_1%\conf\mongod.conf
::暂停
::pause
4、新建连接mongod 服务的客户端批处理文件,mongo_cli_start.bat 内容如下:
@echo off
set "dir_1=D:\Server\mongodb-2.6.7"
::进行入到指定目录
cd /d %dir_1%
::执行命令
%dir_1%\bin\mongo 127.0.0.1:12345
::暂停
::pause
5、先启动mongod 服务,再启动一个客户端,进行操作。
[img]http://dl2.iteye.com/upload/attachment/0105/7481/7e3dbec0-7596-3cdc-86b6-3373bbe03f82.png[/img]
[img]http://dl2.iteye.com/upload/attachment/0105/7483/8fadb841-80c4-3da6-bfb7-1526fd7f952e.png[/img]