MongoDB server端的启动和添加到服务。
来源:互联网 发布:crf算法理解 编辑:程序博客网 时间:2024/06/16 09:22
https://fastdl.mongodb.org/win32/mongodb-win32-x86_64-2008plus-ssl-3.2.7-signed.msi将MongoDB服务器作为Windows服务运行请注意,你必须有管理权限才能运行下面的命令。执行以下命令将MongoDB服务器作为Windows服务运行:mongod.exe --bind_ip 127.0.0.1 --logpath "D:\mongodb_datas\log\mongodb.log" --logappend --dbpath "D:\mongodb_datas" --port 27017 --serviceName "MongoDB3.2" --serviceDisplayName "MongoDB3.2" --installmongod.exe --bind_ip 127.0.0.1 --logpath D:/mongodb_datas/log/mongodb.log --logappend --dbpath D:/mongodb_datas --port 27017 --directoryperdb --serviceName "MongoDB3.2" -install mongod.exe --bind_ip 127.0.0.1 --logpath "D:\mongodb_datas\log\mongodb.log" --logappend --dbpath "D:\mongodb_datas" --port 27017 --directoryperdb --serviceName "MongoDB3.2" --serviceDisplayName "MongoDB3.2" --install默认端口:27017??在命令行下启动mongodb:# 注:在启动命令后添加 参数 --install 则是添加到服务了。①、直接携带参数的形式启动:# 最简单的形式,只是指定 dbpathmongod.exe --dbpath D:\mongodb datas<strong><span style="color:#ff0000;"># 如果启动的时候添加directoryperdb参数:# 好像没启动起来,要求安装补丁:Hotfix KB2731284</span></strong>mongod.exe --dbpath D:\mongodb_datas --directoryperdbmongod.exe --dbpath D:\mongodb_datas --directoryperdb true# 比较完整的参数:mongod.exe --bind_ip 127.0.0.1 --port 27017 --dbpath D:\mongodb_datas --logpath=D:\mongodb_datas\log\mongodb.log --logappend②、通过加载配置文件加载配置信息的方式启动 mongodb:mongod --config D:\mongodb_datas\config\mongodb.cfg配置文件的内容如下:参照https://docs.mongodb.com/manual/tutorial/install-mongodb-on-windows/systemLog:destination: filepath: D:\mongodb_datas\log\mongodb.logstorage:dbPath: D:\mongodb_datas查询帮助:mongod.exe -h命令行下添加 MongoDB 服务:需要以管理员的权限启动cmd才行#添加服务的时候,好像强制要求必须得有logpathmongod.exe --dbpath D:\mongodb_datas --logpath=D:\mongodb_datas\log\mongodb.log --installmongod.exe --config C:\mongodb\mongod.cfg --dbpath D:\Mongodb --install sc create mongodb binPath= "D:\Program Files\MongoDB\Server\3.2\bin\mongod.exe --service --bind_ip 127.0.0.1 --port 27017 --dbpath D:\mongodb_datas --logpath=D:\mongodb_datas\log\mongodb.log --logappend --directoryperdb"sc.exe create MongoDB binPath= "D:\Program Files\MongoDB\Server\3.2\bin\mongod.exe --service --config=\"D:\mongodb_datas\config\mongodb.cfg\"" DisplayName= "MongoDB" start= "auto"移除服务:mongod --removesc delete MongoDB:通过该方式删除的话,服务中的 mongod仍会存在,注册表中不存在了,再重启之后服务的mongodb才会消失。启动MongoDB:net start MongoDB停止MongoDB:net stop MongoDB
0 0
- MongoDB server端的启动和添加到服务。
- MongoDB添加到WINDOWS服务自动启动
- MongoDB启动配置文件和添加windows服务
- MongoDB添加到服务中---启动报错,错误代码 100
- mongodb服务的正常启动和关闭
- mongodb服务的正常启动和关闭
- 【mongoDB】将mongodb添加到服务
- MongoDB服务的启动
- MongoDB服务的启动
- centos7安装mongodb并添加服务启动
- linux启动服务的添加和删除
- 将MongoDB添加到windows服务中
- 将mongodb添加到Windows服务
- mongodb 怎么添加到windows服务
- MongoDB(4)--MongoDB服务的启动
- MongoDB(4)--MongoDB服务的启动
- Apache自动启动及添加到Linux的服务
- mongodb 的服务启动和基本操作命令
- hibernate.cfg.xml 的写法
- Node.js CSV导入功能,上传并读取
- linux下centos虚拟机使用dns域名来访问外网
- 设计模式系列:设计原则一句话总结
- 有电源差通信电路
- MongoDB server端的启动和添加到服务。
- JS设计模式之原型模式
- shell中各种括号的作用()、(())、[]、[[]]、{}
- 设计模式系列:总结
- setprecision
- LeetCode:Subsets II
- 关于网页设计中购物车hover与table切换实现方法的一点点说明
- 农村土地确权之数据处理工具
- 状压Dp_______Sitting in Line( hdu 5691 2016百度之星初赛A )