公告:    欢迎来到王者★孤傲博客主页,若有问题敬请留言 !     没有大量的积累和感悟,是不会把事情做好的, 只有不停的进取,才能够不丢人! Copyright © 2016-2020 RaodiBlogs. All rights reserved.

基于windows的Redis后台服务安装卸载管理

首先,需要你进入你的Redis解压根目录,例如,类似于我下图的这样子:

      

   

  接着打开你的cmd,使用cd命令切换到该目录,或者直接在上图的地址栏输入“cmd”并回车。这里为什么让你先使用资源管理器找到你的Redis解压根目录呢?目的是为了让你快速打开该目录下的提示符。在cmd中输入如下代码,并按回车:

 

安装Redis服务

redis-server --service-install redis.windows.conf --loglevel verbose --service-name RedisServer6379

其中,RedisServer6379为你要安装成的服务名称。

        

  当返回,“[9760] 26 Sep 11:06:35.397 # Granting read/write access to 'NT AUTHORITY\NetworkService' on: "C:\Users\Raodi\Desktop\Redis3.2\Redis" "C:\Users\Raodi\Desktop\Redis3.2\Redis\" [9760] 26 Sep 11:06:35.400 # Redis successfully installed as a service.

表示服务安装成功! 可以打开服务控制面板查看,并可以启动它:

       

 

 

 

卸载Redis服务

在Redis解压目录根目录中,使用命令行输入如下语句:

redis-server --service-uninstall redis.windows.conf --loglevel verbose --service-name RedisServer6379

不过前提是,先在服务控制面板中关掉你的Redis后台服务,关掉“正在运行”!!

         

当返回,“[25460] 26 Sep 11:09:00.822 # Redis service successfully uninstalled.”表示该服务已经被卸载了,你也可以在安装的时候额外配置系统环境变量,这里我便省略!

        

 

posted @ 2019-09-26 11:11  王者★孤傲  阅读(4993)  评论(0编辑  收藏  举报
……