Redis介绍以及安装(Linux)
来源:互联网 发布:电子菜单设计软件 编辑:程序博客网 时间:2024/06/15 03:36
redis是当前比较热门的NOSQL系统之一,它是一个key-value存储系统。和Memcached类似,但很大程度补偿了memcached的不足,它支持存储的value类型相对更多,包括string、list、set、zset和hash。这些数据类型都支持push/pop、add/remove及取交集并集和差集及更丰富的操作。在此基础上,redis支持各种不同方式的排序。Redis数据都是缓存在计算机内存中,并且会周期性的把更新的数据写入磁盘或者把修改操作写入追加的记录文件。
redis官网地址:http://www.redis.io/
最新版本:2.8.3
在Linux下安装Redis非常简单,具体步骤如下(官网有说明):
1、下载源码,解压缩后编译源码。
$ wget http://download.redis.io/releases/redis-2.8.3.tar.gz$ tar xzf redis-2.8.3.tar.gz$ cd redis-2.8.3$ make
2、编译完成后,在Src目录下,有四个可执行文件redis-server、redis-benchmark、redis-cli和redis.conf。然后拷贝到一个目录下。
mkdir /usr/rediscp redis-server /usr/rediscp redis-benchmark /usr/rediscp redis-cli /usr/redis
cd ..cp redis.conf /usr/rediscd /usr/redis
3、启动Redis服务。
$ redis-server redis.conf
启动界面:很卡哇伊哦
[root@localhost redis-3.0.2]# redis-server redis.conf9152:M 10 Jun 23:06:09.930 * Increased maximum number of open files to 10032 (it was originally set to 1024). _._ _.-``__ ''-._ _.-`` `. `_. ''-._ Redis 3.0.2 (00000000/0) 64 bit .-`` .-```. ```\/ _.,_ ''-._ ( ' , .-` | `, ) Running in standalone mode |`-._`-...-` __...-.``-._|'` _.-'| Port: 6379 | `-._ `._ / _.-' | PID: 9152 `-._ `-._ `-./ _.-' _.-' |`-._`-._ `-.__.-' _.-'_.-'| | `-._`-._ _.-'_.-' | http://redis.io `-._ `-._`-.__.-'_.-' _.-' |`-._`-._ `-.__.-' _.-'_.-'| | `-._`-._ _.-'_.-' | `-._ `-._`-.__.-'_.-' _.-' `-._ `-.__.-' _.-' `-._ _.-' `-.__.-' 9152:M 10 Jun 23:06:09.932 # Server started, Redis version 3.0.29152:M 10 Jun 23:06:09.932 # 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.9152:M 10 Jun 23:06:09.932 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.9152:M 10 Jun 23:06:09.933 * The server is now ready to accept connections on port 6379
4、然后用客户端测试一下是否启动成功。
$ redis-cliredis> set foo barOKredis> get foo"bar"
0 0
- Redis介绍以及安装(Linux)
- Redis介绍以及安装(Linux)
- Redis介绍以及安装(Linux)
- Redis介绍以及安装(Linux)
- Redis介绍以及安装(Linux)
- Redis介绍以及安装(Linux)
- Redis介绍以及安装(Linux)
- Redis介绍以及安装(Linux)
- Redis介绍以及安装(Linux)
- Redis--介绍以及安装(Linux环境)
- Redis介绍以及安装(Linux)
- Redis介绍以及安装(Linux)
- Redis介绍以及安装(Linux)
- Redis介绍以及安装(Linux)
- Redis介绍以及安装(Linux)
- Redis介绍以及安装(Linux)
- Redis介绍以及安装(Linux)
- Redis介绍以及安装(Linux)
- 查看opengl版本,android源码
- php插件
- Genymotion 问题
- 读《平凡的世界》后感 (二)
- 利用coregraphics画WWDC2015的icon
- Redis介绍以及安装(Linux)
- Makefile详解(自己觉得重新看一次学了好多东西,红色字)
- memset对非字符串数组初始化
- 求一个全排列函数
- Queue And ConcurrentQueue in .NET
- 二叉树的深度
- 八皇后
- 观察者模式
- Activity生命周期