1、centos默认的安装源在官方centos.org上,而redis在第三方的yum源里,因此没法安装,非官方的yum推荐用fedora的epel仓库。固然也可经过配置 /etc/yum.repos.d/CentOS-Base.repo文件增长yum源。html
2、下载并安装epelredis
[root@localhost ~]# find / -name "redis*"centos
/var/lib/redis服务器
/var/run/redis并发
/var/log/rediside
/etc/rc.d/init.d/redis工具
/etc/logrotate.d/redis性能
/etc/redis.conf测试
/usr/share/doc/redis-2.4.10
/usr/bin/redis-check-dump :用于本地数据库检查;检查file.rdb 文件
/usr/bin/redis-check-aof :更新日志检查;检查file.aof 文件
/usr/bin/redis-cli :Redis命令行操做工具;也能够用telnet根据其纯文本协议来操做
/usr/bin/redis-benchmark :Redis性能测试工具,测试Redis在你的系统及你的配置下的读写性能
/usr/sbin/redis-server :Redis服务器的daemon启动程序
[root@localhost ~]#redis-benchmark -h localhost -p 6379 -c 100 -n 100000
100个并发链接,100000个请求,检测host为localhost 端口为6379的redis服务器性能
[root@localhost ~]#redis-cli -h localhost -p 6379 monitor
Dump all the received requests in real time;
监控host为localhost,端口为6380,redis的链接及读写操做
[root@localhost ~]#redis-cli -h localhost -p 6379 info
Provide information and statistics about the server
提供host为localhost,端口为6380,redis服务的统计信息