zoukankan      html  css  js  c++  java
  • windows下redis安装

    windows下redis安装
     

    1,redis官方下载地址:https://redis.io/download,redis 64位下载地址:https://github.com/ServiceStack/redis-windows,本人测试使用的是redis-64.3.0.503版本。

    2,解压redis-64.3.0.503.zip,解压后的文件结构如下:

    3,修改redis.windows.conf文件,设置maxmemory 大小 

    设置redis密码 ,默认无密码

    4,启动redis: 命令行  redis-server.exe redis.windows.conf,如果不制定配置文件,那么默认是不需要密码的

    测试,成功安装: 

     

    5,将redis加入到windows的服务中

    安装命令: redis-server.exe --service-install redis.windows.conf --loglevel verbose 使用命令,安装成功,如图所以:

    常用的redis服务命令。

    卸载服务:redis-server --service-uninstall

    开启服务:redis-server --service-start

    停止服务:redis-server --service-stop

    重命名服务:redis-server --service-name name

    重命名服务,需要写在前三个参数之后,例如:

    The following would install and start three separate instances of Redis as a service:   
    以下将会安装并启动三个不同的Redis实例作服务:
    
    redis-server --service-install --service-name redisService1 --port 10001
    
    redis-server --service-start --service-name redisService1
    
    redis-server --service-install --service-name redisService2 --port 10002
    
    redis-server --service-start --service-name redisService2
    
    redis-server --service-install --service-name redisService3 --port 10003
    
    redis-server --service-start --service-name redisService3
    

    四:测试

    启动服务

    redis-server --service-start

    客户端

    命令:

    精简模式:
    redis-cli.exe
    指定模式:
    redis-cli.exe -h 127.0.0.1 -p 6379 -a requirepass
    (-h 服务器地址  -p 指定端口号 -a 连接数据库的密码[可以在redis.windows.conf中配置],默认无密码)

    测试读写数据

    安装测试成功。

    五:Redis桌面管理工具

    推荐使用的桌面管理工具:

    Redis Desktop Manager

    下载地址:
    https://redisdesktop.com/download
  • 相关阅读:
    idea spring boot 1.x junit单元测试
    linux oracle/jdk启用大页面
    jdk8之CompletableFuture与CompletionService
    gc日志深入解析-覆盖CMS、并行GC、G1、ZGC、openj9
    h2 web console使用
    LockSupport工具类详解
    反射、Unsafe、直接调用性能大比拼
    spring boot druid动态多数据源监控集成
    Linux网络
    org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection总结
  • 原文地址:https://www.cnblogs.com/niewd/p/12161309.html
Copyright © 2011-2022 走看看