1、下载软件:

  wget wget http://download.redis.io/releases/redis-2.8.7.tar.gz

2、解压软件并编译安装:

  tar -zxvf redis-2.8.7.tar.gz

  mv redis-2.8.7.tar.gz redis

  cd redis

  make&&make install

  等待编译一端时间即可(如果您的机器上没有c++编译环境,可以通过yum安装 gcc ,命令:yum -y install gcc)

  cd src

  启动redis-server:./redis-server  ../redis.conf

  启动会发送警告:

  [16403] 12 Dec 21:55:32.830 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add   'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.

  安装提示,解决上述问题。默认的情况下,redis监听6379端口。

  3、测试使用redis  #使用 telnet

  

[likehua@localhost local]$ telnet localhost 6379
Trying ::1...
Connected to localhost.
Escape character is '^]'.
set likehua likehua
+OK
get likehua
$7
likehua

  4、使用redis-benchmark对redis可以进行简单的性能测试。

  

 [likehua@localhost src]$ ./redis-benchmark -h localhost -p 6379 -c 1000 -n 100000
====== PING_INLINE ======
100000 requests completed in 2.03 seconds
1000 parallel clients
3 bytes payload
keep alive: 1 0.00% <= 8 milliseconds
0.04% <= 9 milliseconds
66.42% <= 10 milliseconds
88.10% <= 11 milliseconds
91.29% <= 12 milliseconds
93.57% <= 13 milliseconds
96.30% <= 14 milliseconds
98.13% <= 15 milliseconds
98.78% <= 16 milliseconds
99.37% <= 17 milliseconds
99.77% <= 18 milliseconds
99.93% <= 19 milliseconds
99.97% <= 20 milliseconds
100.00% <= 20 milliseconds
49333.99 requests per second ====== PING_BULK ======
100000 requests completed in 1.98 seconds
1000 parallel clients
3 bytes payload
keep alive: 1 0.00% <= 6 milliseconds
0.01% <= 7 milliseconds
0.15% <= 8 milliseconds
15.79% <= 9 milliseconds
58.19% <= 10 milliseconds
92.03% <= 11 milliseconds
96.30% <= 12 milliseconds
98.24% <= 13 milliseconds
98.90% <= 14 milliseconds
99.30% <= 15 milliseconds
99.63% <= 16 milliseconds
99.99% <= 17 milliseconds
100.00% <= 17 milliseconds
50581.69 requests per second ====== SET ======
100000 requests completed in 2.00 seconds
1000 parallel clients
3 bytes payload
keep alive: 1 0.00% <= 7 milliseconds
0.24% <= 8 milliseconds
6.78% <= 9 milliseconds
62.14% <= 10 milliseconds
88.33% <= 11 milliseconds
93.36% <= 12 milliseconds
96.28% <= 13 milliseconds
97.19% <= 14 milliseconds
98.11% <= 15 milliseconds
98.58% <= 16 milliseconds
98.91% <= 17 milliseconds
99.49% <= 18 milliseconds
99.84% <= 19 milliseconds
100.00% <= 19 milliseconds
49900.20 requests per second ====== GET ======
100000 requests completed in 1.97 seconds
1000 parallel clients
3 bytes payload
keep alive: 1 0.00% <= 5 milliseconds
0.01% <= 6 milliseconds
0.24% <= 7 milliseconds
9.30% <= 8 milliseconds
35.68% <= 9 milliseconds
53.22% <= 10 milliseconds
80.98% <= 11 milliseconds
95.27% <= 12 milliseconds
97.05% <= 13 milliseconds
98.47% <= 14 milliseconds
99.40% <= 15 milliseconds
99.76% <= 16 milliseconds
99.94% <= 17 milliseconds
100.00% <= 17 milliseconds
50813.01 requests per second ====== INCR ======
100000 requests completed in 2.01 seconds
1000 parallel clients
3 bytes payload
keep alive: 1 0.00% <= 6 milliseconds
0.03% <= 7 milliseconds
0.26% <= 8 milliseconds
10.85% <= 9 milliseconds
51.33% <= 10 milliseconds
86.53% <= 11 milliseconds
91.05% <= 12 milliseconds
93.84% <= 13 milliseconds
97.30% <= 14 milliseconds
99.09% <= 15 milliseconds
99.78% <= 16 milliseconds
99.93% <= 17 milliseconds
100.00% <= 17 milliseconds
49825.61 requests per second ====== LPUSH ======
100000 requests completed in 1.98 seconds
1000 parallel clients
3 bytes payload
keep alive: 1 0.00% <= 6 milliseconds
0.77% <= 7 milliseconds
2.36% <= 8 milliseconds
11.40% <= 9 milliseconds
53.46% <= 10 milliseconds
90.92% <= 11 milliseconds
96.49% <= 12 milliseconds
98.51% <= 13 milliseconds
99.33% <= 14 milliseconds
99.82% <= 15 milliseconds
99.91% <= 16 milliseconds
100.00% <= 17 milliseconds
100.00% <= 17 milliseconds
50479.56 requests per second ====== LPOP ======
100000 requests completed in 1.97 seconds
1000 parallel clients
3 bytes payload
keep alive: 1 0.00% <= 6 milliseconds
1.08% <= 7 milliseconds
8.16% <= 8 milliseconds
22.76% <= 9 milliseconds
54.23% <= 10 milliseconds
86.55% <= 11 milliseconds
96.52% <= 12 milliseconds
98.67% <= 13 milliseconds
99.56% <= 14 milliseconds
99.83% <= 15 milliseconds
99.92% <= 16 milliseconds
100.00% <= 16 milliseconds
50735.67 requests per second ====== SADD ======
100000 requests completed in 2.01 seconds
1000 parallel clients
3 bytes payload
keep alive: 1 0.00% <= 6 milliseconds
0.00% <= 7 milliseconds
0.20% <= 8 milliseconds
3.06% <= 9 milliseconds
74.43% <= 10 milliseconds
91.78% <= 11 milliseconds
95.16% <= 12 milliseconds
96.61% <= 13 milliseconds
97.22% <= 14 milliseconds
98.35% <= 15 milliseconds
99.45% <= 16 milliseconds
100.00% <= 16 milliseconds
49751.24 requests per second ====== SPOP ======
100000 requests completed in 1.98 seconds
1000 parallel clients
3 bytes payload
keep alive: 1 0.00% <= 6 milliseconds
0.25% <= 7 milliseconds
9.22% <= 8 milliseconds
27.89% <= 9 milliseconds
51.53% <= 10 milliseconds
83.58% <= 11 milliseconds
95.62% <= 12 milliseconds
98.06% <= 13 milliseconds
99.22% <= 14 milliseconds
99.83% <= 15 milliseconds
99.86% <= 16 milliseconds
99.90% <= 17 milliseconds
99.93% <= 18 milliseconds
99.97% <= 19 milliseconds
100.00% <= 19 milliseconds
50530.57 requests per second ====== LPUSH (needed to benchmark LRANGE) ======
100000 requests completed in 2.01 seconds
1000 parallel clients
3 bytes payload
keep alive: 1 0.00% <= 6 milliseconds
0.08% <= 7 milliseconds
0.32% <= 8 milliseconds
5.15% <= 9 milliseconds
51.92% <= 10 milliseconds
91.54% <= 11 milliseconds
94.53% <= 12 milliseconds
96.95% <= 13 milliseconds
98.08% <= 14 milliseconds
98.76% <= 15 milliseconds
99.68% <= 16 milliseconds
100.00% <= 16 milliseconds
49652.43 requests per second ====== LRANGE_100 (first 100 elements) ======
100000 requests completed in 4.00 seconds
1000 parallel clients
3 bytes payload
keep alive: 1 0.00% <= 14 milliseconds
4.44% <= 15 milliseconds
23.32% <= 16 milliseconds
26.30% <= 17 milliseconds
27.43% <= 18 milliseconds
28.36% <= 19 milliseconds
28.98% <= 20 milliseconds
32.42% <= 21 milliseconds
74.49% <= 22 milliseconds
89.15% <= 23 milliseconds
95.46% <= 24 milliseconds
95.91% <= 25 milliseconds
96.45% <= 26 milliseconds
97.53% <= 27 milliseconds
98.42% <= 28 milliseconds
98.79% <= 29 milliseconds
98.95% <= 30 milliseconds
99.15% <= 31 milliseconds
99.30% <= 32 milliseconds
99.42% <= 33 milliseconds
99.53% <= 34 milliseconds
99.60% <= 35 milliseconds
99.67% <= 36 milliseconds
99.77% <= 37 milliseconds
99.94% <= 38 milliseconds
100.00% <= 38 milliseconds
25006.25 requests per second ====== LRANGE_300 (first 300 elements) ======
100000 requests completed in 6.69 seconds
1000 parallel clients
3 bytes payload
keep alive: 1 0.00% <= 16 milliseconds
0.01% <= 17 milliseconds
0.04% <= 18 milliseconds
0.08% <= 19 milliseconds
0.11% <= 20 milliseconds
0.15% <= 21 milliseconds
0.18% <= 22 milliseconds
0.22% <= 23 milliseconds
0.24% <= 24 milliseconds
0.26% <= 25 milliseconds
0.29% <= 26 milliseconds
2.09% <= 27 milliseconds
8.86% <= 28 milliseconds
21.91% <= 29 milliseconds
32.42% <= 30 milliseconds
47.12% <= 31 milliseconds
57.70% <= 32 milliseconds
64.38% <= 33 milliseconds
68.73% <= 34 milliseconds
71.52% <= 35 milliseconds
73.66% <= 36 milliseconds
75.44% <= 37 milliseconds
77.48% <= 38 milliseconds
79.79% <= 39 milliseconds
81.49% <= 40 milliseconds
83.05% <= 41 milliseconds
84.96% <= 42 milliseconds
86.70% <= 43 milliseconds
88.68% <= 44 milliseconds
93.08% <= 45 milliseconds
95.99% <= 46 milliseconds
99.41% <= 47 milliseconds
99.47% <= 48 milliseconds
99.54% <= 49 milliseconds
99.59% <= 50 milliseconds
99.65% <= 51 milliseconds
99.72% <= 52 milliseconds
99.78% <= 53 milliseconds
99.84% <= 54 milliseconds
99.88% <= 55 milliseconds
99.90% <= 56 milliseconds
99.93% <= 57 milliseconds
99.96% <= 58 milliseconds
99.99% <= 59 milliseconds
100.00% <= 59 milliseconds
14949.92 requests per second ====== LRANGE_500 (first 450 elements) ======
100000 requests completed in 8.71 seconds
1000 parallel clients
3 bytes payload
keep alive: 1 0.00% <= 20 milliseconds
0.02% <= 21 milliseconds
0.07% <= 22 milliseconds
0.10% <= 23 milliseconds
0.13% <= 24 milliseconds
0.16% <= 25 milliseconds
0.17% <= 26 milliseconds
0.18% <= 27 milliseconds
0.20% <= 28 milliseconds
0.21% <= 29 milliseconds
0.22% <= 30 milliseconds
0.23% <= 31 milliseconds
0.26% <= 32 milliseconds
0.34% <= 33 milliseconds
0.63% <= 34 milliseconds
3.99% <= 35 milliseconds
7.57% <= 36 milliseconds
10.77% <= 37 milliseconds
13.87% <= 38 milliseconds
16.86% <= 39 milliseconds
24.72% <= 40 milliseconds
40.82% <= 41 milliseconds
49.31% <= 42 milliseconds
54.46% <= 43 milliseconds
60.03% <= 44 milliseconds
65.25% <= 45 milliseconds
70.38% <= 46 milliseconds
74.43% <= 47 milliseconds
78.07% <= 48 milliseconds
81.36% <= 49 milliseconds
84.61% <= 50 milliseconds
87.36% <= 51 milliseconds
89.99% <= 52 milliseconds
92.09% <= 53 milliseconds
94.16% <= 54 milliseconds
95.79% <= 55 milliseconds
96.93% <= 56 milliseconds
97.84% <= 57 milliseconds
98.52% <= 58 milliseconds
98.91% <= 59 milliseconds
99.26% <= 60 milliseconds
99.47% <= 61 milliseconds
99.51% <= 62 milliseconds
99.53% <= 63 milliseconds
99.55% <= 64 milliseconds
99.57% <= 65 milliseconds
99.61% <= 66 milliseconds
99.65% <= 67 milliseconds
99.69% <= 68 milliseconds
99.73% <= 69 milliseconds
99.78% <= 70 milliseconds
99.83% <= 71 milliseconds
99.86% <= 72 milliseconds
99.89% <= 73 milliseconds
99.91% <= 74 milliseconds
99.93% <= 75 milliseconds
99.95% <= 76 milliseconds
99.96% <= 77 milliseconds
99.98% <= 78 milliseconds
100.00% <= 78 milliseconds
11479.74 requests per second ====== LRANGE_600 (first 600 elements) ======
100000 requests completed in 11.03 seconds
1000 parallel clients
3 bytes payload
keep alive: 1 0.00% <= 19 milliseconds
0.01% <= 20 milliseconds
0.03% <= 21 milliseconds
0.04% <= 22 milliseconds
0.05% <= 23 milliseconds
0.07% <= 24 milliseconds
0.08% <= 25 milliseconds
0.09% <= 26 milliseconds
0.10% <= 27 milliseconds
0.12% <= 28 milliseconds
0.12% <= 29 milliseconds
0.14% <= 30 milliseconds
0.16% <= 31 milliseconds
0.20% <= 32 milliseconds
0.23% <= 33 milliseconds
0.27% <= 34 milliseconds
0.29% <= 35 milliseconds
0.32% <= 36 milliseconds
0.36% <= 37 milliseconds
0.39% <= 38 milliseconds
0.43% <= 39 milliseconds
0.47% <= 40 milliseconds
0.50% <= 41 milliseconds
0.53% <= 42 milliseconds
0.58% <= 43 milliseconds
0.74% <= 44 milliseconds
1.40% <= 45 milliseconds
4.51% <= 46 milliseconds
8.98% <= 47 milliseconds
13.34% <= 48 milliseconds
18.11% <= 49 milliseconds
23.27% <= 50 milliseconds
29.19% <= 51 milliseconds
34.92% <= 52 milliseconds
41.34% <= 53 milliseconds
48.28% <= 54 milliseconds
55.34% <= 55 milliseconds
62.15% <= 56 milliseconds
67.49% <= 57 milliseconds
71.73% <= 58 milliseconds
75.33% <= 59 milliseconds
78.47% <= 60 milliseconds
81.46% <= 61 milliseconds
84.14% <= 62 milliseconds
86.82% <= 63 milliseconds
89.05% <= 64 milliseconds
91.05% <= 65 milliseconds
93.09% <= 66 milliseconds
94.56% <= 67 milliseconds
95.60% <= 68 milliseconds
96.47% <= 69 milliseconds
97.07% <= 70 milliseconds
97.55% <= 71 milliseconds
97.98% <= 72 milliseconds
98.32% <= 73 milliseconds
98.57% <= 74 milliseconds
98.68% <= 75 milliseconds
98.82% <= 76 milliseconds
98.91% <= 77 milliseconds
99.02% <= 78 milliseconds
99.04% <= 79 milliseconds
99.05% <= 80 milliseconds
99.07% <= 81 milliseconds
99.09% <= 82 milliseconds
99.10% <= 83 milliseconds
99.10% <= 84 milliseconds
99.11% <= 85 milliseconds
99.12% <= 86 milliseconds
99.13% <= 87 milliseconds
99.14% <= 88 milliseconds
99.16% <= 89 milliseconds
99.17% <= 90 milliseconds
99.18% <= 91 milliseconds
99.20% <= 92 milliseconds
99.21% <= 93 milliseconds
99.23% <= 94 milliseconds
99.25% <= 95 milliseconds
99.27% <= 96 milliseconds
99.29% <= 97 milliseconds
99.30% <= 98 milliseconds
99.33% <= 99 milliseconds
99.36% <= 100 milliseconds
99.39% <= 101 milliseconds
99.41% <= 102 milliseconds
99.43% <= 103 milliseconds
99.46% <= 104 milliseconds
99.49% <= 105 milliseconds
99.51% <= 106 milliseconds
99.54% <= 107 milliseconds
99.56% <= 108 milliseconds
99.58% <= 109 milliseconds
99.61% <= 110 milliseconds
99.64% <= 111 milliseconds
99.66% <= 112 milliseconds
99.68% <= 113 milliseconds
99.71% <= 114 milliseconds
99.73% <= 115 milliseconds
99.76% <= 116 milliseconds
99.78% <= 117 milliseconds
99.79% <= 118 milliseconds
99.80% <= 119 milliseconds
99.81% <= 120 milliseconds
99.82% <= 121 milliseconds
99.83% <= 122 milliseconds
99.85% <= 123 milliseconds
99.86% <= 124 milliseconds
99.87% <= 125 milliseconds
99.88% <= 126 milliseconds
99.90% <= 127 milliseconds
99.92% <= 128 milliseconds
99.93% <= 129 milliseconds
99.94% <= 130 milliseconds
99.94% <= 131 milliseconds
99.94% <= 132 milliseconds
99.95% <= 133 milliseconds
99.95% <= 134 milliseconds
99.95% <= 135 milliseconds
99.95% <= 136 milliseconds
99.95% <= 137 milliseconds
99.96% <= 138 milliseconds
99.96% <= 139 milliseconds
99.96% <= 140 milliseconds
99.96% <= 141 milliseconds
99.96% <= 142 milliseconds
99.97% <= 143 milliseconds
99.97% <= 144 milliseconds
99.97% <= 145 milliseconds
99.99% <= 146 milliseconds
100.00% <= 146 milliseconds
9067.83 requests per second ====== MSET (10 keys) ======
100000 requests completed in 2.31 seconds
1000 parallel clients
3 bytes payload
keep alive: 1 0.00% <= 9 milliseconds
0.16% <= 10 milliseconds
0.33% <= 11 milliseconds
0.58% <= 12 milliseconds
1.01% <= 13 milliseconds
1.33% <= 14 milliseconds
2.03% <= 15 milliseconds
2.50% <= 16 milliseconds
3.43% <= 17 milliseconds
4.79% <= 18 milliseconds
6.51% <= 19 milliseconds
20.35% <= 20 milliseconds
58.54% <= 21 milliseconds
69.83% <= 22 milliseconds
76.45% <= 23 milliseconds
80.71% <= 24 milliseconds
84.42% <= 25 milliseconds
88.26% <= 26 milliseconds
91.26% <= 27 milliseconds
92.21% <= 28 milliseconds
93.89% <= 29 milliseconds
95.65% <= 30 milliseconds
96.55% <= 31 milliseconds
96.96% <= 32 milliseconds
97.36% <= 33 milliseconds
97.61% <= 34 milliseconds
98.07% <= 35 milliseconds
98.18% <= 36 milliseconds
98.47% <= 37 milliseconds
98.84% <= 38 milliseconds
99.02% <= 39 milliseconds
99.45% <= 40 milliseconds
99.63% <= 41 milliseconds
99.83% <= 42 milliseconds
99.94% <= 47 milliseconds
99.97% <= 63 milliseconds
100.00% <= 63 milliseconds
43215.21 requests per second

  如果不知道怎么使用redis-benchmark就使用redis-benchmark -help命令,它会告诉你它所有的本领!通过,上面的简单性能测试,你会发现redis简直是性能怪兽!这个数字可是在我的一台普通PC机器上测试的!貌似,比公司的数字大很多,具体原因以后分析。

  

CentOS 7 安装Redis 2.8.7的更多相关文章

  1. Centos 7 安装redis,修改配置文件不生效、外网不能访问。

    前提: 在用Centos 7 安装 redis 时,遇上一下几个问题 ,记录下 . 1.修改配置文件,按官网步骤启动,不生效. 2.外网无法访问redis. 步骤: 1.打开centos 虚拟机 ,按 ...

  2. Linux(Centos)之安装Redis及注意事项

    1.redis简单说明 a.在前面我简单的说过redis封装成共用类的实现,地址如下:http://www.cnblogs.com/hanyinglong/p/Redis.html. b.redis是 ...

  3. CentOS 编译安装 Redis (实测 笔记 Centos 7.3 + redis 3.2.8)

    环境: 系统硬件:vmware vsphere (CPU:2*4核,内存2G,双网卡) 系统版本:CentOS-7.0-1406-x86_64-DVD.iso 安装步骤: 1.准备 1.1 显示系统版 ...

  4. centOS 中安装 Redis

    之前安装过了 jdk,mysql,tomcat,这次安装 Redis,最开始是将 redis 安装在 windows 下 run 的,这时安装在 Linux 里面试试. 1 . 首先得安装 c环境,用 ...

  5. centos下安装redis/mysql等基础环境

    1.修改语言 阿里云的ECS默认语言是:en_US.UTF-8,需要改成zh_CN.UTF-8 修改方法:vim /etc/locale.conf,然后重启. 查看方法:echo $LANG 2.安装 ...

  6. CentOS下安装Redis及Redis的PHP扩展

    1.安装Redis 1.1 如果没有安装wget,安装wget yum install wget 1.2 在http://redis.io/download页面查看redis版本,并下载安装 wget ...

  7. Centos下安装Redis

    转自:http://nnzhp.cn/article/9/ 遇到问题,安装后并启动,redis-cli报错:Could not connect to Redis at 127.0.0.1:6379: ...

  8. centOS上安装redis

    1.安装tcl支持 yum install tcl 2.安装redis我们以最新的2.8.9为例 $ wget http://download.redis.io/releases/redis-2.8. ...

  9. 【转】centOS上安装redis+phpredis2.2.4扩展

    原文链接:http://www.cnblogs.com/xsi640/p/3756130.html 我原来的安装方式:http://www.cnblogs.com/wuling129/p/464738 ...

  10. CentOS 7安装redis及php扩展

    安装remi源 # wget http://rpms.famillecollet.com/enterprise/remi-release-7.rpm # rpm -Uvh remi-release-7 ...

随机推荐

  1. 菜鸟成长进阶之——fiddler使用总结

     作为一个猪拱性能的程序猿,不会使用fiddler来协助自己分析问题是万万不能的.还记得刚入职的时候老大提过的几个必须要熟练使用的工具中第一个就是fiddler.虽然接触了快一年了,但是还是一知半解的 ...

  2. 【C#进阶系列】01 CLR的执行模型——一个Hello World的故事

    好吧,废话少说,先上一章Hello World图: 我们有了一个Hello world程序,如此之简单,再加上我今天没有用汉字编程o(>﹏<)o,所以一切很简单明了. 故事开始: 编译: ...

  3. YEdit

    YEdit YEdit is a YAML editor for Eclipse. See the wiki for more details Installation Use the Eclipse ...

  4. 变废为宝,将Discuz废弃的cache机制引入到memory体系中

    Discuz的source/class/cache目录,代表着相应的缓存机制,但实际上废弃很多年了. Discuz用Memory代表了缓存,里面内置了memcache等多种缓存驱动. 但很多人的开发环 ...

  5. DistributedCache小记

    一.DistributedCache简介 DistributedCache是hadoop框架提供的一种机制,可以将job指定的文件,在job执行前,先行分发到task执行的机器上,并有相关机制对cac ...

  6. eclipse新建maven项目(1)

    首先看一下eclipse版本,我用的是最新版Mars2. 下载地址自行搜索关键字:“eclipse官网”即可,注意下版本,32bit or 64bit. maven插件以及svn等相关插件安装设置问题 ...

  7. IOC容器中bean的生命周期

    一.Bean的生命周期 Spring IOC容器可以管理Bean的生命周期,允许在Bean生命周期的特定点执行定制的任务. Spring IOC容器对Bean的生命周期进行管理的过程如下: (1).通 ...

  8. 轻量级SaaS在线作图工具ProcessOn

    俗话说“一图胜千言”,在办公应用领域,流程图是一个非常好的表现企业业务流程或工作岗位规范等内容的展现形式,比如去给客户做调研,回来后都要描述出客户的关键业务流程,谁.什么时候.在什么地方.负责什么事情 ...

  9. Smartforms常见问题

    分类: 1.使用SFSY-FORMPAGES显示总页数的时候,如果页数大于9,将会在前10页显示成星号* 解决: 有时候这样做完之后,星号*是没有了,但是字体会有颠倒或者重叠的现象. 如果出了这个问题 ...

  10. How to copy files between sites using JavaScript REST in Office365 / SharePoint 2013

    http://techmikael.blogspot.in/2013/07/how-to-copy-files-between-sites-using.html I'm currently playi ...