redis的使用

来源:互联网 发布:知乎 手工皮具 编辑:程序博客网 时间:2024/06/05 04:34

-----------------------------------------------------------------------------------------------------------------------------------
windows7安装redis方法:
1、下载Redis的压缩包
https://github.com/dmajkic/redis/downloads


    redis-2.4.5-win32-win64.zip — Redis-2.4.5 - Windows binaries (win32 and x64 included)
    601KB · Uploaded on 29 Dec 2011


下载完后将其解压放在自己要放的目录下
解压后的目录

如果你是32位的话就进32bit的文件夹,64位就进64bit文件夹.

文件夹进去后会看到一下的几个文件

redis-benchmark.exe: 性能测试 模拟N个客户端发送set,get请求
redis-check-aof.exe:更新日志检查
redis-check-dump.exe:本地数据库检查
redis-server.exe:服务程序

开启服务
打开dos命令栏,进入到redis的目录下面,输入以下命令:
redis-server.exe redis.conf
开启成功




设置密码redis.conf配置文件搜索“requirepass foobared”,foobared 替换成你的密码

-----------------------------------------------------------------------------------------------------------------------------------
使用Java操作Redis需要jedis-2.1.0.jar,下载地址:http://files.cnblogs.com/liuling/jedis-2.1.0.jar.zip
如果需要使用Redis连接池的话,还需commons-pool-1.5.4.jar,下载地址:http://files.cnblogs.com/liuling/commons-pool-1.5.4.jar.zip

jedis-2.1.0.jar
commons-pool-1.5.4.jar
0 0
原创粉丝点击