Redis在Windows运维下的配置
诗诗 2018-03-15 来源 :网络 阅读 1589 评论 0

摘要:本文将讲解Redis在Windows运维下的配置,希望这篇文章可以帮助到你。

本文将讲解Redis在Windows运维下的配置,希望这篇文章可以帮助到你。


下面是windows32的配置

下载地址//files.cnblogs.com/files/cuiwenyuan/Redis-3.2.100-Windows-32.zip

假设安装目录为E:\wrcold520\Redis-3.2.100-Windows-32\Redis

1、启动没有参数配置的Redis:

  (1)双击redis-server.exe

  (2)在cmd命令窗口下运行redis-server或者redis-server.exe

    

      # 示例:

      Microsoft Windows [版本 6.1.7601]

      版权所有 (c) 2009 Microsoft Corporation。保留所有权利。


      E:\wrcold520\Redis-3.2.100-Windows-32\Redis>redis-server

      [6788] 10 Feb 13:47:38.750 # Warning: no config file specified, using the defaul

      t config. In order to specify a config file use redis-server /path/to/redis.conf


      [6788] 10 Feb 13:47:38.753 # Warning: 32 bit instance detected but no memory lim

      it set. Setting 3 GB maxmemory limit with 'noeviction' policy now.

                      _._

                 _.-``__ ''-._

            _.-``    `.  `_.  ''-._           Redis 3.0.504 (00000000/0) 32 bit

        .-`` .-```.  ```\/    _.,_ ''-._

       (    '      ,       .-`  | `,    )     Running in standalone mode

       |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379

       |    `-._   `._    /     _.-'    |     PID: 6788

        `-._    `-._  `-./  _.-'    _.-'

       |`-._`-._    `-.__.-'    _.-'_.-'|

       |    `-._`-._        _.-'_.-'    |           //redis.io

        `-._    `-._`-.__.-'_.-'    _.-'       |`-._`-._    `-.__.-'    _.-'_.-'|

       |    `-._`-._        _.-'_.-'    |

        `-._    `-._`-.__.-'_.-'    _.-'            `-._    `-.__.-'    _.-'

                `-._        _.-'                    `-.__.-'

      [6788] 10 Feb 13:47:38.755 # Server started, Redis version 3.0.504

      [6788] 10 Feb 13:47:38.755 * DB loaded from disk: 0.000 seconds

      [6788] 10 Feb 13:47:38.756 * The server is now ready to accept connections on po

      rt 6379


2、带配置文件启动Redis

  

    在cmd命令窗口下运行:redis-server redis.windows.conf或者redis-server.exe redis.windows.conf

      

      # 示例:

      Microsoft Windows [版本 6.1.7601]

      版权所有 (c) 2009 Microsoft Corporation。保留所有权利。


      E:\wrcold520\Redis-3.2.100-Windows-32\Redis>redis-server redis.windows.conf

      [7540] 10 Feb 13:43:07.046 # Warning: 32 bit instance detected but no memory lim

      it set. Setting 3 GB maxmemory limit with 'noeviction' policy now.

                      _._

                 _.-``__ ''-._

            _.-``    `.  `_.  ''-._           Redis 3.0.504 (00000000/0) 32 bit

        .-`` .-```.  ```\/    _.,_ ''-._

       (    '      ,       .-`  | `,    )     Running in standalone mode

       |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379

       |    `-._   `._    /     _.-'    |     PID: 7540

        `-._    `-._  `-./  _.-'    _.-'

       |`-._`-._    `-.__.-'    _.-'_.-'|

       |    `-._`-._        _.-'_.-'    |           //redis.io

        `-._    `-._`-.__.-'_.-'    _.-'       |`-._`-._    `-.__.-'    _.-'_.-'|

       |    `-._`-._        _.-'_.-'    |

        `-._    `-._`-.__.-'_.-'    _.-'            `-._    `-.__.-'    _.-'

                `-._        _.-'                    `-.__.-'

      [7540] 10 Feb 13:43:07.047 # Server started, Redis version 3.0.504

      [7540] 10 Feb 13:43:07.048 * DB loaded from disk: 0.000 seconds

      [7540] 10 Feb 13:43:07.048 * The server is now ready to accept connections on po

      rt 6379


3、将redis加入windows服务

  (1)在cmd命令窗口下运行:redis-server.exe --service-install redis.windows.conf --loglevel verbose


    ### 示例:

    Microsoft Windows [版本 6.1.7601]

    版权所有 (c) 2009 Microsoft Corporation。保留所有权利。


    E:\wrcold520\Redis-3.2.100-Windows-32\Redis>redis-server.exe --service-install redis.windows.conf --loglevel verbose

    [7776] 10 Feb 13:56:21.950 # Granting read/write access to 'NT AUTHORITY\Network

    Service' on: "E:\wrcold520\Redis-3.2.100-Windows-32\Redis" "E:\wrcold520\Redis-3

    .2.100-Windows-32\Redis\"    [7776] 10 Feb 13:56:21.950 # Redis successfully installed as a service.


  (2)启动redis服务

    在cmd命令窗口下运行:redis-server --service-start


      ### 示例:

      E:\wrcold520\Redis-3.2.100-Windows-32\Redis>redis-server --service-start

      [6780] 10 Feb 14:05:18.046 # Redis service successfully started.


  (3)关闭redis服务

    在cmd命令窗口下运行:redis-server --service-stop


      ### 示例:

      E:\wrcold520\Redis-3.2.100-Windows-32\Redis>redis-server --service-stop

      [1660] 10 Feb 14:05:28.098 # Redis service successfully stopped.


4、移除redis的windows服务

  在cmd命令窗口下运行:redis-server --service-uninstall 


    ### 示例:

    E:\wrcold520\Redis-3.2.100-Windows-32\Redis>redis-server --service-uninstall

    [4744] 10 Feb 13:59:18.735 # Redis service successfully uninstalled.


希望这篇文章可以帮助到你。总之,同学们,你想要的职坐标IT频道都能找到!


本文由 @诗诗 发布于职坐标。未经许可,禁止转载。
喜欢 | 0 不喜欢 | 0
看完这篇文章有何感觉?已经有0人表态,0%的人喜欢 快给朋友分享吧~
评论(0)
后参与评论

您输入的评论内容中包含违禁敏感词

我知道了

助您圆梦职场 匹配合适岗位
验证码手机号,获得海同独家IT培训资料
选择就业方向:
人工智能物联网
大数据开发/分析
人工智能Python
Java全栈开发
WEB前端+H5

请输入正确的手机号码

请输入正确的验证码

获取验证码

您今天的短信下发次数太多了,明天再试试吧!

提交

我们会在第一时间安排职业规划师联系您!

您也可以联系我们的职业规划师咨询:

小职老师的微信号:z_zhizuobiao
小职老师的微信号:z_zhizuobiao

版权所有 职坐标-一站式IT培训就业服务领导者 沪ICP备13042190号-4
上海海同信息科技有限公司 Copyright ©2015 www.zhizuobiao.com,All Rights Reserved.
 沪公网安备 31011502005948号    

©2015 www.zhizuobiao.com All Rights Reserved

208小时内训课程