Win7 下面安装MongoDB
来源:互联网 发布:域名中.net是什么意思 编辑:程序博客网 时间:2024/06/07 05:26
1. MongoDB download
From website: https://www.mongodb.org/downloads
Download version: mongodb-win32-x86_64-2008plus-ssl-3.0.1.zip
2. Decompress MongoDB zip file
Decompress Path: C:\mongodb-win32-x86_64-2008plus-ssl-3.0.1
3. Before install MongoDB
Create data directory: mongod --dbpath C:\MongoDB\mongoadmin\data;
Create log file directory: C:\MongoDB\mongoadmin\log , C:\MongoDB\mongoadmin\log\log.txt;
4. Launch MongoDB
Enter directory: C:\mongodb-win32-x86_64-2008plus-ssl-3.0.1\bin, and execute Mongod.exe command like below:
mongod --logpath=C:\MongoDB\mongoadmin\log\log.txt --dbpath=C:\MongoDB\mongoadmin\data;
Launch MongoDB with configure file:
mongod --config /data/config/mongod.conf /*Mongo support YAML format in configuraion*/
5. Install as a service
Enter directory with Administrator: C:\mongodb-win32-x86_64-2008plus-ssl-3.0.1\bin, and exec below Mongod command:
mongod --install --logpath=C:\MongoDB\mongoadmin\log\log.txt --dbpath=C:\MongoDB\mongoadmin\data
Query to see if install successfully:
sc qc mongodb
6. Enter shell enviornment
Enter directory: C:\mongodb-win32-x86_64-2008plus-ssl-3.0.1\bin, type "mongo"
Type "mongod --help" can browse more detail help info.
7. Start and Stop MongoDB
Enter cmd with administrative privileges:
Start mongoDB service: net start mongodb
Test to see if mongoDB can be connected: mongo
Stop mongoDB service: net stop mongodb
/* Check file data\mongod.lock to see if is a clean shutdown,
* net start makes file size larger than 1 kB, net stop clean this file, make size as 0
*/
remove it from services if needed: mongod --remove
Shutdown from shell:
1) Enter cmd with administrative privileges:
2) Type "mongo" to enter shell environment:
3) Type "use admin"
4) Type "db.shutdownServer()"
5) Check mongod.lock to see if a clean shutdowm
Check MongoDB Status:
1) Type "db.serverStatus()"
8. Dirty Shutdown Recovery
Enter cmd with administrator privileges: mongod --port 4000 --dbpath C:\MongoDB\mongoadmin\data;
/* run mongodb with another non-standard port as 4000, will recover data first */
*******************************************************************************************************************************************
********* 常见问题
*******************************************************************************************************************************************
1. 由于目标计算机积极拒绝,无法连接
先打开mongoDB service, 才能进行连接 : 1)net start mongodb
2) mongo
2. In File::open(), CreateFileW for 'U:\mongorc.js'系统找不到指定路径
启动shell,会自动加载.mongorc.js,启动时加上mongo --norc就可以跳过此文件加载
- Win7 下面安装MongoDB
- mac 下面安装mongodb
- [MongoDB]win7安装mongodb
- WIN7下面安装VIM
- WIN7下面安装VIM
- win7下面安装xp
- win7下面安装pyquery
- mac 下面快速安装mongodb
- linux下面mongodb的安装
- WIN7下面如何安装RMySQL
- Win7下面安装SQL Server2005
- Win7 下安装MongoDB
- win7下安装MongoDB
- Win7 下安装MongoDB
- win7下安装mongodb
- MongoDB安装(Win7)
- Win7 下安装MongoDB
- MongoDB安装 Win7
- 《序列》游戏攻略【07~12】
- NSURLCache
- POJ---1159-Palindrome(01DP)
- HDU ACM 2011 多项式求和
- 解决adb无法识别
- Win7 下面安装MongoDB
- 深入理解SELinux SEAndroid(结局)
- The high strength modified poplar core film faced formwork plywood
- 星系模拟器开发日志(二) 各个组件
- Java - How Garbage Collection works in Java
- LC.exe -1
- poj-1458-Common Subsequence(LCS)
- 【NOI2015】【BZOJ4196】软件包管理器
- 通用css样式模板,