monggoDB添加到windows服务

----------------mongoDB安装-------------------------------

1.下载mongoDB安装包安装完毕后,配置环境变量 D:\Program Files\MongoDB\Server\3.2\bin

2.配置文件mongod.cfg

systemLog:
    destination: file
    path: e:\data\log\mongod.log
storage:
    dbPath: e:\data\db

 

3.安装mongoDB服务(以管理员权限执行以下命,否者安装会失败)

    mongod --config "D:\Program Files\MongoDB\Server\3.2\mycfg\mongod.cfg" --install

4.cmd输入services.mscmongoDB服务是否安装到windows服务中(服务名MongoDB),如果没有检查安装日志,查看安装失败原因

5.启动暂停服务 net start/stop MongoDB

扩展:

    1.移除mongoDB服务命令  mongod --remove

    2.更多细节请参考 http://www.runoob.com/mongodb/mongodb-tutorial.html

 

 

----------------redis安装---------------------------------

1.下载地址:https://github.com/MSOpenTech/redis/releases

Redis 支持 32 位和 64 位。这个需要根据你系统平台的实际情况选择,这里我们下载 Redis-x64-xxx.zip压缩包到 C 盘,解压后,将文件夹重新命名为 redis

2.安装redis服务( 进入解压目录后执行)

     redis-server --service-install redis.windows.conf

3.卸载redis服务( 进入解压目录后执行)

    redis-server.exe --service-uninstall

详细教程参考:http://www.runoob.com/redis/redis-install.html

posted @ 2018-08-31 15:16  zincredible  阅读(656)  评论(0编辑  收藏  举报