Redis 安装,主从配置及Sentinel配置自动Failover


1、安装redis

--------------------------------------------------------------------------------

首页地址:http://redis.io/
下载地址:http://download.redis.io/ 下载最新的源码包(当前最新稳定版2.6.16)
#wget http://download.redis.io/releases/redis-2.6.16.tar.gz
#tar xzf redis-2.6.16.tar.gz
#cd redis-2.6.16
#make
#make install
#cp redis.conf /etc/

--------------------------------------------------------------------------------
2、运行

--------------------------------------------------------------------------------
#redis-server /etc/redis.conf & (加载配置文件并后台运行)

#redis-cli (命令行工具)

--------------------------------------------------------------------------------
3、测试

--------------------------------------------------------------------------------
# redis-benchmark --help 获取帮助信息,其中包含压力测试命令样例

Examples:
Run the benchmark with the default configuration against 127.0.0.1:6379:
$ redis-benchmark

Fill 127.0.0.1:6379 with about 1 million keys only using the SET test:
$ redis-benchmark -t set -n 1000000 -r 100000000

[root@php1 ~]# redis-benchmark -t set -c 20 -n 1000000 -r 100000000
====== SET ======
1000000 requests completed in 8.92 seconds
20 parallel clients
3 bytes payload
keep alive: 1


100.00% <= 0 milliseconds
112095.06 requests per second

更多详情见请继续阅读下一页的精彩内容

 

推荐阅读:

Redis集群明细文档

Ubuntu 12.10下安装Redis(图文详解)+ Jedis连接Redis

Redis系列-安装部署维护篇

CentOS 6.3安装Redis

Redis 的详细介绍:请点这里
Redis 的下载地址:请点这里

  • 1
  • 2
  • 3
  • 下一页

相关内容