First, Redis Introduction
Redis is one of the most popular NoSQL systems today, and it is a key-value storage system. Similar to memcache, but largely compensates for the lack of memcache, which supports storing more value types, including string, list, set, Zset, and hash. These data types support Push/pop, Add/remove, and intersection sets and differences, and richer operations. Based on this, Redis supports sorting in a variety of different ways.
Like Memcache, Redis data is cached in the computer's memory, except that memcache can only cache data in memory and not automatically write to the hard disk periodically, which means that a power outage or restart, memory emptying, and data loss. So Memcache's application scenario is for caching data that does not need to be persisted. The difference between redis is that it periodically writes the updated data to the disk or writes the modified operation to the appended record file, which makes the data persistent.
#redis官网: http://www.redis.cn/
#下载解压redis
wget http://download.redis.io/releases/redis-3.2.4.tar.gz
TAR-ZXF redis-3.2.4.tar.gz
#编译安装
Make
CD src
Make install
#为了方便管理, move the Conf configuration file and common commands in the Redis file to a unified file
Mkdir-p/usr/local/redis/bin
Mkdir-p/usr/local/redis/etc
Mv/data/tool/redis-3.2.4/redis.conf/usr/local/redis/ett
cd/data/tool/redis-3.2.4/src/
MV mkreleasehdr.sh Redis-benchmark Redis-cli redis-server/usr/local/redis/bin/
#将daemonize属性改为yes (indicates the need to run in the background)
Sed-i ' s/daemonize no/daemonize yes/g '/usr/local/redis/etc/redis.conf
#开发远程连接
Sed-i ' s/bind 127.0.0.1/bind 0.0.0.0/g '/usr/local/redis/etc/redis.conf
#启动redis服务, specify the Startup service profile: redis-server/usr/local/redis/etc/redis.conf
#检查启动进程: Ps-ef | grep Redis
#启动客户端:/USR/LOCAL/REDIS/BIN/REDIS-CLI
#关闭redis服务: Pkill redis-server
Redis Database Installation Configuration