About Redis
Redis is a key-value storage System , the official site Http://redis.io
1. similar to memcached, but supports data persistence
2. support for more value types , in addition to string (string), also support hash, lists (linked list), sets (collection) and sorted sets (ordered collection) several data types
The 3.redis uses two file formats: full-volume data (RDB) and incremental request (AOF). The full data format is to write the in-memory data to disk for the next read of the file to load. The incremental request file serializes the in-memory data into an operation request for reading the file for replay to get the data
4.redis storage is divided into memory storage, disk storage and log file three parts
Redis Installation-Download installation configuration
1.wget https://codeload.github.com/antirez/redis/tar.gz/2.8.21
2.MV 2.8.21 redis-2.8.21.tar.gz
3.tar ZXVF redis-2.8.21.tar.gz
4.CD redis-2.8.21
5.Yum install-y gcc epel-release; Yum install-y jemalloc-devel
6. Make If an error occurs, run the following command: #不用编译, direct make
7.CD Deps; Make Hiredis lua jemalloc linenoise; CD.; Make
8. When makeprefix=/usr/local/redis install #make Install, specify the installation path
9.mkdir/usr/local/redis/etc #创建配置文件目录并下载配置文件
10.wget Http://www.apelearn.com/study_v2/.redis_conf-O/usr/local/redis/etc/redis.conf 2>/dev/null
Redis Installation – Startup script #下载启动脚本
1.wget Http://www.apelearn.com/study_v2/.redis_init-O/etc/init.d/redis 2>/dev/null
2.useradd-s/sbin/nologin Redis
3.mkdir/usr/local/redis/var #存放pid等文件
4.chmod 777/usr/local/redis/var
5.chmod 755/etc/init.d/redis
6.chkconfig--add Redis
7.chkconfig Redis on
8.service Redis Start
1.7-redis Introduction and Installation