redis是一个开源的高级key-value存储系统
可用来存储字符串、哈希结构、链表、集合,所以经常使用来作数据结构服务器redisredis和memcached相比:
1.redis是用来存储数据的,而memcached是用来作缓存的
2.redis存储的数据是有结构的,而memcached存储的数据只有“字符串”一种类型缓存redis官网:https://redis.io/服务器
所用环境:CentOS7数据结构
wget http://download.redis.io/releases/redis-4.0.2.tar.gz
tar -zxvf redis-4.0.2.tar.gz
cd redis-4.0.2
make PREFIX=/usr/local/redis install
注: PREFIX要大写memcached
make test
此时,可能出现need tcl >8.4这种状况,执行:测试
yum install tcl
cp /path/redis.conf /usr/local/redis
./path/to/redis/bin/redis-server ./path/to/conf-file 例:[root@localhost redis]# ./bin/redis-server ./redis.conf
/path/to/redis/bin/redis-cli [-h localhost -p 6379 ]
修改redis配置文件:daemonize yes