redis

[url=http://www.redis.io/]Redis官方网址[/url]
[url=http://www.redis.cn/]Redis中文网[/url]

1、linux 安装redis 服务.([url=http://www.redis.cn/download.html]下载最新稳定版[/url])
下载、解压、安装,下载页面,有例子。

配置成linux 开机自启:
修改redis.conf 文件中的相关行;
vim /usr/local/redis-2.8.13/redis.conf


#以守护进程方式运行
#daemonize no改为 [color=red]daemonize yes[/color]

#修改dir ./为绝对路径,
./ redis #改为/usr/local/
[img]http://dl2.iteye.com/upload/attachment/0101/5380/1202de38-76d5-31e2-a718-0326cfea096a.png[/img]


#修改appendonly为yes

#指定是否在每次更新操作后进行日志记录,
appendonly no 改为 [color=red]appendonly yes[/color]


将程序弄成linux 开机自启,其实就是在/etc/rc.local 文件中加相应命令行。可以用
echo "/usr/local/redis-2.8.13/src/redis-server /usr/local/redis-2.8.13/redis.conf" >> /etc/rc.local
这句执行的结果是:
[img]http://dl2.iteye.com/upload/attachment/0101/5340/4a898d86-fe8a-3250-a367-1a1066b59e8d.png[/img]




2、windows 安装使用
[url=https://github.com/MSOpenTech/redis]windows 平台[/url]下的[url=https://github.com/MSOpenTech/redis/releases]安装包版本列表[/url]

[url=http://blog.csdn.net/renfufei/article/details/38474435]windows 下的安装及使用教程[/url]

jar 包问题

3、[url=http://www.tuicool.com/articles/EFnaUz]redis作为tomcat默认的session存储器[/url]

使用过程中[url=http://www.oschina.net/question/815618_194320?sort=time]jar 包问题[/url]

环境是: win7 64bit + jdk1.7 + tomcat7 + redis2.8.17 + nginx1.6.2
JAR 包:jedis-2.2.1.jar + commons-pool-1.6.jar + tomcat-redis-session-manager-1.2-tomcat-7.jar
tomcat 终于可以启动了,但换个版本 jedis-2.6.2.jar + commons-pool2-2.3.jar 就启动不了。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值