Chinaunix首页 | 论坛 | 博客
  • 博客访问: 6548183
  • 博文数量: 1005
  • 博客积分: 8199
  • 博客等级: 中将
  • 技术积分: 13071
  • 用 户 组: 普通用户
  • 注册时间: 2010-05-25 20:19
个人简介

脚踏实地、勇往直前!

文章分类

全部博文(1005)

文章存档

2020年(2)

2019年(93)

2018年(208)

2017年(81)

2016年(49)

2015年(50)

2014年(170)

2013年(52)

2012年(177)

2011年(93)

2010年(30)

分类: HADOOP

2015-03-05 10:45:06

redis版本:4.0.6

1.安装
[root@pxc01 soft]#tar –zxvf redis-4.0.6.tar.gz
[root@pxc01 soft]# cp -R ./redis-4.0.6 /opt/
[root@pxc01 opt]# cd redis-4.0.6
[root@pxc01 redis-4.0.6]# make
[root@pxc01 redis-4.0.6]# make test
没有问题会提示如下输出:
\o/ All tests passed without errors!


Cleanup: may take some time... OK
make[1]: Leaving directory `/opt/redis-4.0.6/src'


安装到指定的目录,默认是安装在/usr/bin目录
[root@pxc01 redis-4.0.6]# cd src
[root@pxc01 src]# make PREFIX=/home/hxl/redis install

2.创建相应目录
[root@pxc01 opt]# cd redis-4.0.6/
[root@pxc01 redis-4.0.6]# mkdir conf  ##配置文件目录
[root@pxc01 redis-4.0.6]# mkdir log   ##日志文件目录
[root@pxc01 redis-4.0.6]# mkdir run   ##运行的pid文件目录
[root@pxc01 redis-4.0.6]# mkdir data   ##快照和AOF文件目录


3.启动redis
/home/hxl/redis/bin/redis-server /home/hxl/redis/conf/8379.conf


配置参数例子:

  1. daemonize yes
  2. pidfile /home/hxl/redis/run/redis-8379.pid
  3. port 8379
  4. tcp-backlog 511
  5. timeout 0
  6. tcp-keepalive 0
  7. loglevel notice
  8. logfile "/home/hxl/redis/log/redis-8379.log"
  9. databases 16
  10. save 900 1
  11. save 300 10
  12. save 60 10000
  13. stop-writes-on-bgsave-error yes
  14. rdbcompression yes
  15. rdbchecksum yes
  16. dbfilename dump-8379.rdb
  17. dir /opt/single_redis-4.0.6/rdb
  18. slave-serve-stale-data yes
  19. slave-read-only yes
  20. repl-diskless-sync no
  21. repl-diskless-sync-delay 5
  22. repl-disable-tcp-nodelay no
  23. slave-priority 100
  24. appendonly yes
  25. appendfilename "redis-8379.aof"
  26. appendfsync everysec
  27. no-appendfsync-on-rewrite no
  28. auto-aof-rewrite-percentage 100
  29. auto-aof-rewrite-min-size 64mb
  30. aof-load-truncated yes
  31. lua-time-limit 5000
  32. slowlog-log-slower-than 10000
  33. slowlog-max-len 128
  34. latency-monitor-threshold 0
  35. notify-keyspace-events ""
  36. hash-max-ziplist-entries 512
  37. hash-max-ziplist-value 64
  38. list-max-ziplist-entries 512
  39. list-max-ziplist-value 64
  40. set-max-intset-entries 512
  41. zset-max-ziplist-entries 128
  42. zset-max-ziplist-value 64
  43. hll-sparse-max-bytes 3000
  44. activerehashing yes
  45. client-output-buffer-limit normal 0 0 0
  46. client-output-buffer-limit slave 256mb 64mb 60
  47. client-output-buffer-limit pubsub 32mb 8mb 60
  48. hz 10
  49. aof-rewrite-incremental-fsync yes
  50. # Generated by CONFIG REWRITE
  51. #masterauth "richinfo123"
  52. #requirepass "richinfo123"
  53. protected-mode no



-- The End --
阅读(5368) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~