Linux下安装Redis服务
http://redis.io/download
https://github.com/antirez/redis
http://www.oschina.net/p/redis
#安装配置
wget http://download.redis.io/releases/redis-2.8.12.tar.gz
tar xzf redis-2.8.12.tar.gz
cd redis-2.8.12
make
redis-server /etc/redis.conf
#启动redis服务
[root@localhost opt]# redis-server /opt/software/redis-2.8.12/redis.conf
[26721] 24 Jun 15:13:49.440 * Increased maximum number of open files to 10032 (it was originally set to 1024).
_._
_.-``__ ''-._
_.-`` `. `_. ''-._ Redis 2.8.12 (00000000/0) 64 bit
.-`` .-```. ```\/ _.,_ ''-._
( ' , .-` | `, ) Running in stand alone mode
|`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
| `-._ `._ / _.-' | PID: 26721
`-._ `-._ `-./ _.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' | http://redis.io
`-._ `-._`-.__.-'_.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' |
`-._ `-._`-.__.-'_.-' _.-'
`-._ `-.__.-' _.-'
`-._ _.-'
`-.__.-'[26721] 24 Jun 15:13:49.441 # Server started, Redis version 2.8.12
[26721] 24 Jun 15:13:49.441 # 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.
[26721] 24 Jun 15:13:49.441 * The server is now ready to accept connections on port 6379
se
[1]+ Stopped redis-server /opt/software/redis-2.8.12/redis.conf
[root@localhost opt]# ps -ef | grep redis
root 26721 22675 0 15:13 pts/1 00:00:00 redis-server *:6379
root 27106 22675 0 15:21 pts/1 00:00:00 grep redis
#查看服务
ps -ef | grep redis
#测试服务
127.0.0.1:6379> set test haha
OK
127.0.0.1:6379> get test
"haha"
#关闭redis服务
redis-cli shutdown
#客户端
https://github.com/xetorthio/jedis
https://github.com/taobao/tedis
#其他命令
redis-server ,redis-cli,redis-benchmark,redis-stat,作用如下:
redis-server Redis服务器的daemon启动程序
redis-cli Redis命令行操作工具。当然,你也可以用telnet根据其纯文本协议来操作
redis-benchmark Redis性能测试工具,测试Redis在你的系统及你的配置下的读写性能
redis-stat Redis状态检测工具,可以检测Redis当前状态参数及延迟状况
Linux 下 Redis 安装详解
http://www.oschina.net/question/12_18065
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 周边上新:园子的第一款马克杯温暖上架
· Open-Sora 2.0 重磅开源!
· .NET周刊【3月第1期 2025-03-02】
· 分享 3 个 .NET 开源的文件压缩处理库,助力快速实现文件压缩解压功能!
· [AI/GPT/综述] AI Agent的设计模式综述